diff --git a/lib/ArduinoNTPd/NTPServer.cpp b/lib/ArduinoNTPd/NTPServer.cpp index a5d0515d0..860ccc79d 100644 --- a/lib/ArduinoNTPd/NTPServer.cpp +++ b/lib/ArduinoNTPd/NTPServer.cpp @@ -87,7 +87,7 @@ bool NtpServer::processOneRequest(uint32_t utc, uint32_t millisecs) packet.swapEndian(); timeServerPort_.beginPacket(timeServerPort_.remoteIP(), timeServerPort_.remotePort()); - timeServerPort_.write(packet.packet(), NtpPacket::PACKET_SIZE); + timeServerPort_.write((const uint8_t *)packet.packet(), NtpPacket::PACKET_SIZE); timeServerPort_.endPacket(); processed = true; diff --git a/platformio_override_esp32.ini b/platformio_override_esp32.ini index 5c4afdafa..babc261cc 100644 --- a/platformio_override_esp32.ini +++ b/platformio_override_esp32.ini @@ -102,4 +102,3 @@ lib_ignore = ILI9488 SSD3115 cc1101 - ArduinoNTPd diff --git a/tasmota/support_flash_log.ino b/tasmota/support_flash_log.ino index 9aa8ecc05..cf64de6d5 100644 --- a/tasmota/support_flash_log.ino +++ b/tasmota/support_flash_log.ino @@ -37,6 +37,7 @@ \*********************************************************************************************/ #ifdef USE_FLOG +#ifdef ESP8266 class FLOG @@ -429,4 +430,5 @@ void FLOG::stopRecording(void){ _initBuffer(); } + #endif // ESP8266 #endif // USE_FLOG \ No newline at end of file diff --git a/tasmota/xsns_60_GPS.ino b/tasmota/xsns_60_GPS.ino index 69b13aedd..966b3a609 100644 --- a/tasmota/xsns_60_GPS.ino +++ b/tasmota/xsns_60_GPS.ino @@ -18,6 +18,10 @@ */ #ifdef USE_GPS +#if defined(ESP32) && defined(USE_FLOG) + #undef USE_FLOG + #warning FLOG deactivated on ESP32 +#endif //ESP32 /*********************************************************************************************\ -------------------------------------------------------------------------------------------- Version Date Action Description @@ -115,6 +119,10 @@ rule3 on tele-FLOG#sec do DisplayText [f0c1l4]SAV:%value% endon on tele-FLOG#r #include "NTPServer.h" #include "NTPPacket.h" +#ifdef ESP32 +#include +#endif + /*********************************************************************************************\ * constants \*********************************************************************************************/ @@ -291,7 +299,11 @@ enum UBXMsgType { #ifdef USE_FLOG FLOG *Flog = nullptr; #endif //USE_FLOG +#ifdef ESP8266 TasmotaSerial *UBXSerial; +#else +HardwareSerial *UBXSerial; +#endif NtpServer timeServer(PortUdp); @@ -351,13 +363,21 @@ void UBXDetect(void) { UBX.mode.init = 0; if ((pin[GPIO_GPS_RX] < 99) && (pin[GPIO_GPS_TX] < 99)) { +#ifdef ESP8266 UBXSerial = new TasmotaSerial(pin[GPIO_GPS_RX], pin[GPIO_GPS_TX], 1, 0, UBX_SERIAL_BUFFER_SIZE); // 64 byte buffer is NOT enough if (UBXSerial->begin(9600)) { +#else + UBXSerial = new HardwareSerial(2); + UBXSerial->begin(9600,SERIAL_8N1,pin[GPIO_GPS_RX], pin[GPIO_GPS_TX]); + { +#endif DEBUG_SENSOR_LOG(PSTR("UBX: started serial")); +#ifdef ESP8266 if (UBXSerial->hardwareSerial()) { ClaimSerial(); DEBUG_SENSOR_LOG(PSTR("UBX: claim HW")); } +#endif } } else {