SondeHub: DFM frame numbers using gps time+sec) as in autorx

pull/87/head
Hansi, dl9rdz 2021-05-30 10:18:08 +02:00
rodzic e368dd50dc
commit ba680295dc
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -3024,7 +3024,9 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
char rs_msg[MSG_SIZE];
char *w;
struct tm ts;
time_t t = s->time;
// For DFM, s->time is data from subframe DAT8 (gps date/hh/mm), and sec is from DAT1 (gps sec/usec)
// For all others, sec should always be 0 and time the exact time in seconds
time_t t = s->time + s->sec;
while (client->available() > 0) {
// data is available from remote server, process it...

Wyświetl plik

@ -1,4 +1,4 @@
const char *version_name = "rdzTTGOsonde";
const char *version_id = "devel20210529";
const char *version_id = "devel20210530";
const int SPIFFS_MAJOR=2;
const int SPIFFS_MINOR=11;

Wyświetl plik

@ -406,7 +406,7 @@ void DFM::decodeDAT(uint8_t *dat)
{
int val = (((uint16_t)dat[4])<<8) + (uint16_t)dat[5];
Serial.print("UTC-msec: "); Serial.print(val);
sonde.si()->sec = val/1000;
sonde.si()->sec = (val+500)/1000;
uint32_t tmp = ((uint32_t)dat[0]<<24) + ((uint32_t)dat[1]<<16) + ((uint32_t)dat[2]<<8) + ((uint32_t)dat[3]);
sonde.si()->sats = bitCount(tmp); // maybe!?!?!?
}