From 7568a3537243efa8b16f315a003388795a2d313f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 22 Jul 2024 17:09:46 +0200 Subject: [PATCH] fix build and probably break GPS --- src/gps/GPS.cpp | 28 ------------------- .../Telemetry/EnvironmentTelemetry.cpp | 4 +-- src/platform/nrf52/NRF52Bluetooth.cpp | 4 ++- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 3fac7a56b..9628784d6 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1489,20 +1489,6 @@ bool GPS::lookForTime() #ifdef GNSS_Airoha // add by WayenWeng uint8_t fix = reader.fixQuality(); uint32_t now = millis(); - if (fix > 0) { - if (lastFixStartMsec > 0) { - if ((now - lastFixStartMsec) < GPS_FIX_HOLD_TIME) { - return false; - } else { - clearBuffer(); - } - } else { - lastFixStartMsec = now; - return false; - } - } else { - return false; - } #endif auto ti = reader.time; @@ -1543,20 +1529,6 @@ bool GPS::lookForLocation() if ((config.position.gps_update_interval * 1000) >= (GPS_FIX_HOLD_TIME * 2)) { uint8_t fix = reader.fixQuality(); uint32_t now = millis(); - if (fix > 0) { - if (lastFixStartMsec > 0) { - if ((now - lastFixStartMsec) < GPS_FIX_HOLD_TIME) { - return false; - } else { - clearBuffer(); - } - } else { - lastFixStartMsec = now; - return false; - } - } else { - return false; - } } #endif diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index ca3bb665e..92f90cfdd 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -293,7 +293,7 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m m->which_variant = meshtastic_Telemetry_environment_metrics_tag; #ifdef T1000X_SENSOR_EN // add by WayenWeng - valid = valid && t1000xSensor.getMetrics(&m); + valid = valid && t1000xSensor.getMetrics(m); hasSensor = true; #else if (dfRobotLarkSensor.hasSensor()) { @@ -566,4 +566,4 @@ AdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule return result; } -#endif +#endif \ No newline at end of file diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index 890886b4d..665e1402f 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -16,10 +16,12 @@ static BLECharacteristic logRadio = BLECharacteristic(BLEUuid(LOGRADIO_UUID_16)) static BLEDis bledis; // DIS (Device Information Service) helper class instance static BLEBas blebas; // BAS (Battery Service) helper class instance +#ifndef BLE_DFU_SECURE static BLEDfu bledfu; // DFU software update helper service +#else static BLEDfuSecure bledfusecure; // DFU software update helper service +#endif -static BLEDfu bledfu; // DFU software update helper service // This scratch buffer is used for various bluetooth reads/writes - but it is safe because only one bt operation can be in // process at once // static uint8_t trBytes[_max(_max(_max(_max(ToRadio_size, RadioConfig_size), User_size), MyNodeInfo_size), FromRadio_size)];