Arduino IDE autoformat

This commit is contained in:
Hansi, dl9rdz 2021-09-22 16:16:32 +02:00
parent d4de05e29b
commit 89ffef6c24
1 changed files with 60 additions and 52 deletions

View File

@ -153,8 +153,14 @@ String processor(const String& var) {
Serial.println(var);
if (var == "MAPCENTER") {
double lat, lon;
if(gpsPos.valid) { lat=gpsPos.lat; lon=gpsPos.lon; }
else { lat = sonde.config.rxlat; lon = sonde.config.rxlon; }
if (gpsPos.valid) {
lat = gpsPos.lat;
lon = gpsPos.lon;
}
else {
lat = sonde.config.rxlat;
lon = sonde.config.rxlon;
}
if ( !isnan(lat) && !isnan(lon) ) {
char p[40];
snprintf(p, 40, "%g,%g", lat, lon);
@ -555,8 +561,8 @@ const char *createLiveJson() {
/*bool b = */nmea.getAltitude(alt);
bool valid = nmea.isValid();
uint8_t hdop = nmea.getHDOP();
if (valid) {
strcat(ptr, ",");
//if (valid) {
// strcat(ptr, ",");
#endif
sprintf(ptr + strlen(ptr), ", \"gps\": {\"lat\": %g, \"lon\": %g, \"alt\": %d, \"sat\": %d, \"speed\": %g, \"dir\": %d, \"hdop\": %d }", gpsPos.lat, gpsPos.lon, gpsPos.alt, gpsPos.sat, gpsPos.speed, gpsPos.course, gpsPos.hdop);
//}
@ -3544,7 +3550,9 @@ void sondehub_reply_handler(WiFiClient *client) {
}
cnt = 0;
}
if(cnt>=MSG_SIZE-1) { cnt=0; }
if (cnt >= MSG_SIZE - 1) {
cnt = 0;
}
}
}
// send import requests if needed