kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
Update precision of data sent (#114)
rodzic
77181d9dad
commit
2a3aba5c70
|
@ -3205,11 +3205,11 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
|
||||||
"\"datetime\": \"%04d-%02d-%02dT%02d:%02d:%02d.000Z\","
|
"\"datetime\": \"%04d-%02d-%02dT%02d:%02d:%02d.000Z\","
|
||||||
"\"lat\": %.6f,"
|
"\"lat\": %.6f,"
|
||||||
"\"lon\": %.6f,"
|
"\"lon\": %.6f,"
|
||||||
"\"alt\": %.2f,"
|
"\"alt\": %.3f,"
|
||||||
"\"frequency\": %.3f,"
|
"\"frequency\": %.3f,"
|
||||||
"\"vel_h\": %.1f,"
|
"\"vel_h\": %.3f,"
|
||||||
"\"vel_v\": %.1f,"
|
"\"vel_v\": %.3f,"
|
||||||
"\"heading\": %.1f,"
|
"\"heading\": %.3f,"
|
||||||
"\"sats\": %d,"
|
"\"sats\": %d,"
|
||||||
"\"rssi\": %.1f,",
|
"\"rssi\": %.1f,",
|
||||||
version_name, version_id, conf->callsign,
|
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)) {
|
if (((int)s->temperature != 0) && ((int)s->relativeHumidity != 0)) {
|
||||||
sprintf(w,
|
sprintf(w,
|
||||||
"\"temp\": %.2f,"
|
"\"temp\": %.1f,"
|
||||||
"\"humidity\": %.2f,",
|
"\"humidity\": %.1f,",
|
||||||
float(s->temperature), float(s->relativeHumidity)
|
float(s->temperature), float(s->relativeHumidity)
|
||||||
);
|
);
|
||||||
w += strlen(w);
|
w += strlen(w);
|
||||||
|
|
Ładowanie…
Reference in New Issue