From cf47a01cb0589d4b497fa4fafb0ce66619b93a66 Mon Sep 17 00:00:00 2001 From: Luke Prior <22492406+LukePrior@users.noreply.github.com> Date: Wed, 28 Jul 2021 15:56:42 +1000 Subject: [PATCH] Add the changes back & M20 fix (#115) * Add the changes back * Update version number * Only send sats field if not M20 Co-authored-by: dl9rdz --- RX_FSK/RX_FSK.ino | 8 ++++++-- RX_FSK/version.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 7198383..d33f846 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -3210,16 +3210,20 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co "\"vel_h\": %.3f," "\"vel_v\": %.3f," "\"heading\": %.3f," - "\"sats\": %d," "\"rssi\": %.1f,", version_name, version_id, conf->callsign, timeinfo.tm_year + 1900, timeinfo.tm_mon + 1, timeinfo.tm_mday, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec, manufacturer_string[s->type], s->ser, ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec + s->sec, (float)s->lat, (float)s->lon, (float)s->alt, (float)s->freq, (float)s->hs, (float)s->vs, - (float)s->dir, (int)s->sats, -((float)s->rssi / 2) + (float)s->dir, -((float)s->rssi / 2) ); w += strlen(w); + + if (s->type != STYPE_M20) { + sprintf(w, "\"sats\": %d,", (int)s->sats); + w += strlen(w); + } if ( TYPE_IS_DFM(s->type) || TYPE_IS_METEO(s->type) || s->type == STYPE_MP3H ) { // send frame as gps timestamp for these sonde, identical to autorx diff --git a/RX_FSK/version.h b/RX_FSK/version.h index da06ec7..c6d9c0b 100644 --- a/RX_FSK/version.h +++ b/RX_FSK/version.h @@ -1,4 +1,4 @@ const char *version_name = "rdzTTGOsonde"; -const char *version_id = "devel20210727"; +const char *version_id = "devel20210728"; const int SPIFFS_MAJOR=2; const int SPIFFS_MINOR=11;