diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 9e1e887..d8165ab 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -3122,7 +3122,8 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co if (*s->ser == 0) return; // Don't send anything without serial number if (((int)s->lat == 0) && ((int)s->lon == 0)) return; // Sometimes these values are zeroes. Don't send those to the sondehub if ((int)s->alt > 50000) return; // If alt is too high don't send to SondeHub - if ((int)s->sats < 4) return; // If not enough sats don't send to SondeHub + // M20 data does not include #sat information + if ( s->type!=STYPE_M20 && (int)s->sats < 4) return; // If not enough sats don't send to SondeHub // If not connected to sondehub, try reconnecting. // TODO: do this outside of main loop diff --git a/RX_FSK/version.h b/RX_FSK/version.h index 5893029..60beae8 100644 --- a/RX_FSK/version.h +++ b/RX_FSK/version.h @@ -1,4 +1,4 @@ const char *version_name = "rdzTTGOsonde"; -const char *version_id = "devel20210630"; +const char *version_id = "devel20210726"; const int SPIFFS_MAJOR=2; const int SPIFFS_MINOR=11; diff --git a/libraries/SondeLib/M10M20.cpp b/libraries/SondeLib/M10M20.cpp index 67d8525..c7e902b 100644 --- a/libraries/SondeLib/M10M20.cpp +++ b/libraries/SondeLib/M10M20.cpp @@ -319,6 +319,7 @@ int M10M20::decodeframeM10(uint8_t *data) { float vn = getint16(data+6)*VMUL; sonde.si()->vs = getint16(data+8) * VMUL; sonde.si()->hs = sqrt(ve*ve+vn*vn); + sonde.si()->sats = data[30]; float dir = atan2(vn, ve)*(1.0/RAD); if(dir<0) dir+=360; sonde.si()->dir = dir;