Merge branch 'dl9rdz:devel' into devel

pull/212/head
eben80 2021-09-21 14:37:51 +02:00 zatwierdzone przez GitHub
commit 02eb47bb77
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -3728,12 +3728,18 @@ void sondehub_send_data(WiFiClient * client, SondeInfo * s, struct st_sondehub *
w += strlen(w);
}
// Only send burst timer if RS41 and not 0
if ((realtype == STYPE_RS41) && ((int)s->countKT != 0)) {
// Only send burst timer if RS41 and fresh within the last 51s
if ((realtype == STYPE_RS41) && (s->crefKT > 0) && (s->vframe - s->crefKT < 51)) {
sprintf(w, "\"burst_timer\": %d,", (int)s->countKT);
w += strlen(w);
}
// Only send battery if provided
if (s->batteryVoltage > 0) {
sprintf(w, "\"batt\": %.2f,", s->batteryVoltage);
w += strlen(w);
}
// Only send antenna if provided
if (strlen(conf->antenna) != 0) {
sprintf(w, "\"uploader_antenna\": \"%s\",", conf->antenna);