Merge branch 'patch-1' of https://github.com/eben80/rdz_ttgo_sonde into eben80-patch-1

pull/161/head
Hansi, dl9rdz 2021-09-14 22:43:48 +02:00
commit 6043fc4fff
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -1085,7 +1085,7 @@ void addSondeStatusKML(char *ptr, int i)
return;
}
sprintf(ptr + strlen(ptr), "<Placemark id=\"%s\"><name>%s</name><Point><coordinates>%.6f,%.6f,%.0f</coordinates></Point><description>%3.3f MHz, Type: %s, h=%.0fm</description></Placemark>",
sprintf(ptr + strlen(ptr), "<Placemark id=\"%s\"><name>%s</name><Point><altitudeMode>absolute</altitudeMode><coordinates>%.6f,%.6f,%.0f</coordinates></Point><description>%3.3f MHz, Type: %s, h=%.0fm</description></Placemark>",
s->id, s->id,
s->lon, s->lat, s->alt,
s->freq, sondeTypeStr[s->type], s->alt);
@ -3161,6 +3161,9 @@ void sondehub_station_update(WiFiClient *client, struct st_sondehub *conf) {
sprintf(w, "\"uploader_position\": [null,null,null]");
}
w += strlen(w);
} else {
sprintf(w, "\"uploader_position\": [null,null,null]");
w += strlen(w);
}
// otherwise (in SH_LOC_NONE mode) we dont include any position info
@ -3358,8 +3361,7 @@ void sondehub_send_data(WiFiClient * client, SondeInfo * s, struct st_sondehub *
if (chase == SH_LOC_CHASE) {
if (gpsPos.valid && gpsPos.lat != 0 && gpsPos.lon != 0) {
sprintf(w,
"\"uploader_position\": [%.6f,%.6f,%d],"
"\"mobile\": true",
"\"uploader_position\": [%.6f,%.6f,%d]",
gpsPos.lat, gpsPos.lon, gpsPos.alt);
} else {
sprintf(w, "\"uploader_position\": [null,null,null]");
@ -3376,6 +3378,9 @@ void sondehub_send_data(WiFiClient * client, SondeInfo * s, struct st_sondehub *
sprintf(w, "\"uploader_position\": [null,null,null]");
}
w += strlen(w);
} else {
sprintf(w, "\"uploader_position\": [null,null,null]");
w += strlen(w);
}
// otherwise (in SH_LOC_NONE mode) we dont include any position info

Wyświetl plik

@ -121,7 +121,7 @@ mqtt.prefix=rdz_sonde_server/
#-------------------------------#
# Sondehub v2 DB settings
sondehub.active=0
sondehub.chase=2
sondehub.chase=3
sondehub.host=api.v2.sondehub.org
sondehub.callsign=CHANGEME_RDZTTGO
sondehub.lat=