Update precision of data sent (#114)

pull/115/head^2
Luke Prior 2021-07-27 21:27:41 +10:00 zatwierdzone przez Hansi, dl9rdz
rodzic 77181d9dad
commit 2a3aba5c70
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -3205,11 +3205,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,
@ -3250,8 +3250,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);