Update precision of data sent (#114)

pull/115/head
Luke Prior 2021-07-27 21:27:41 +10:00 zatwierdzone przez GitHub
rodzic e23d8338a6
commit ea865860e6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -3195,11 +3195,11 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
"\"datetime\": \"%04d-%02d-%02dT%02d:%02d:%02d.000Z\","
"\"lat\": %.6f,"
"\"lon\": %.6f,"
"\"alt\": %.2f,"
"\"alt\": %.3f,"
"\"frequency\": %.3f,"
"\"vel_h\": %.1f,"
"\"vel_v\": %.1f,"
"\"heading\": %.1f,"
"\"vel_h\": %.3f,"
"\"vel_v\": %.3f,"
"\"heading\": %.3f,"
"\"sats\": %d,"
"\"rssi\": %.1f,",
version_name, version_id, conf->callsign,
@ -3240,8 +3240,8 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
if (((int)s->temperature != 0) && ((int)s->relativeHumidity != 0)) {
sprintf(w,
"\"temp\": %.2f,"
"\"humidity\": %.2f,",
"\"temp\": %.1f,"
"\"humidity\": %.1f,",
float(s->temperature), float(s->relativeHumidity)
);
w += strlen(w);