diff --git a/README.md b/README.md index c6a17fa..98e6705 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ Meteomodem | M10 | :heavy_check_mark: | :x: | :x: | Not Sent Meteomodem | M20 | :heavy_check_mark: | :x: | :x: | Not Sent Meteo-Radiy | MP3-H1 (MRZ-H1) | :heavy_check_mark: | :x: | :x: | :x: -SondeHub integration has mainly been tested with RS41 and DFM. MP3-H1 currently lacks decoding -timestamps from telemetry, thus not yet suitable for SondeHub. +SondeHub integration has mainly been tested with RS41 and DFM. Support for other radiosondes that use AFSK modulation is not feasible with the TTGO hardware. diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 272de74..ef89be6 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -58,9 +58,7 @@ WiFiClient client; #define SONDEHUB_STATION_UPDATE_TIME (60*60*1000) // 60 min #define SONDEHUB_MOBILE_STATION_UPDATE_TIME (30*1000) // 30 sec WiFiClient shclient; // Sondehub v2 -unsigned long time_now = 0; unsigned long time_last_update = 0; -unsigned long time_delta = 0; #endif // KISS over TCP for communicating with APRSdroid @@ -2177,14 +2175,9 @@ void loopDecoder() { } #if FEATURE_SONDEHUB if (sonde.config.sondehub.active) { - time_now = millis(); - if (time_now < time_last_update) { - // counter overflow - time_delta = SONDEHUB_STATION_UPDATE_TIME; - } - else { - time_delta = time_now - time_last_update; - } + unsigned long time_now = millis(); + // time_delta will be correct, even if time_now overflows + unsigned long time_delta = time_now - time_last_update; if ((sonde.config.sondehub.chase == 0) && (time_delta >= SONDEHUB_STATION_UPDATE_TIME)) { // 60 min sondehub_station_update(&shclient, &sonde.config.sondehub); time_last_update = time_now;