Squashed commit of the following:

commit ab21a5e25a74a609f4e4ff50e1e723586f28b141
Author: RaphDaMan <raphael@my107.de>
Date:   Sat Mar 20 16:12:11 2021 +0100

    v0.8 final with ESP32 build fix.
This commit is contained in:
RaphDaMan 2021-03-20 16:20:23 +01:00
parent 587ad9a733
commit cc3b047801
3 changed files with 12 additions and 2 deletions

View File

@ -699,7 +699,7 @@
// #define USE_PROJECTOR_CTRL_OPTOMA // Use codes for OPTOMA // #define USE_PROJECTOR_CTRL_OPTOMA // Use codes for OPTOMA
//#define USE_AS608 // Add support for AS608 optical and R503 capacitive fingerprint sensor (+3k code) //#define USE_AS608 // Add support for AS608 optical and R503 capacitive fingerprint sensor (+3k code)
// #define USE_AS608_MESSAGES // Add verbose error messages (+0k4 code) // #define USE_AS608_MESSAGES // Add verbose error messages (+0k4 code)
//#define USE_TFMINIPLUS // Add suppoer for TFmini Plus (TFmini, TFmini-S) LiDAR modules via UART interface //#define USE_TFMINIPLUS // Add support for TFmini Plus (TFmini, TFmini-S) LiDAR modules via UART interface (+0k8)
// -- Power monitoring sensors -------------------- // -- Power monitoring sensors --------------------
#define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code) #define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code)

View File

@ -330,7 +330,10 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_SSD1351_DC "|" D_SENSOR_SSD1351_DC "|"
D_SENSOR_XPT2046_CS "|" D_SENSOR_XPT2046_CS "|"
D_SENSOR_CSE7761_TX "|" D_SENSOR_CSE7761_RX "|" D_SENSOR_CSE7761_TX "|" D_SENSOR_CSE7761_RX "|"
<<<<<<< HEAD
D_SENSOR_VL53L0X_XSHUT "|" D_SENSOR_VL53L0X_XSHUT "|"
=======
>>>>>>> TFmini+
D_SENSOR_TFMINIPLUS_TX "|" D_SENSOR_TFMINIPLUS_RX "|" D_SENSOR_TFMINIPLUS_TX "|" D_SENSOR_TFMINIPLUS_RX "|"
; ;

View File

@ -105,7 +105,8 @@ void TfmpInit(void)
{ {
if (PinUsed(GPIO_TFMINIPLUS_RX) && PinUsed(GPIO_TFMINIPLUS_TX)) if (PinUsed(GPIO_TFMINIPLUS_RX) && PinUsed(GPIO_TFMINIPLUS_TX))
{ {
TfmpSerial = new TasmotaSerial(Pin(GPIO_TFMINIPLUS_RX), Pin(GPIO_TFMINIPLUS_TX)); #ifdef ESP8266
TfmpSerial = new TasmotaSerial(Pin(GPIO_TFMINIPLUS_RX), Pin(GPIO_TFMINIPLUS_TX), 1);
if (TfmpSerial->begin(BAUDRATE)) if (TfmpSerial->begin(BAUDRATE))
{ {
if (TfmpSerial->hardwareSerial()) if (TfmpSerial->hardwareSerial())
@ -115,6 +116,12 @@ void TfmpInit(void)
tfminiplus_sensor.ready = true; tfminiplus_sensor.ready = true;
TfmpSerial->flush(); TfmpSerial->flush();
} }
#endif // ESP8266
#ifdef ESP32
TfmpSerial = new HardwareSerial(2);
TfmpSerial->begin(BAUDRATE, SERIAL_8N1, Pin(GPIO_TFMINIPLUS_RX), Pin(GPIO_TFMINIPLUS_TX));
TfmpSerial->flush();
#endif // ESP32
} }
} }
} }