Include fix state in JSON output (#18254)

Mirror the webpage display, and make fix status available for triggers and rules.
This commit is contained in:
pkkrusty 2023-03-25 09:23:58 +00:00 committed by GitHub
parent 56b3fbe917
commit b456b97dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -827,7 +827,7 @@ void UBXShow(bool json)
uint32_t i = UBX.state.log_interval / 10;
ResponseAppend_P(PSTR("\"fil\":%u,\"int\":%u}"), UBX.mode.filter_noise, i);
} else {
ResponseAppend_P(PSTR("\"lat\":%s,\"lon\":%s,\"alt\":%s,\"hAcc\":%s,\"vAcc\":%s}"), lat, lon, alt, hAcc, vAcc);
ResponseAppend_P(PSTR("\"lat\":%s,\"lon\":%s,\"alt\":%s,\"hAcc\":%s,\"vAcc\":%s,\"fix\":\"%s\"}"), lat, lon, alt, hAcc, vAcc, kGPSFix[UBX.state.gpsFix]);
}
#ifdef USE_FLOG
ResponseAppend_P(PSTR(",\"FLOG\":{\"rec\":%u,\"mode\":%u,\"sec\":%u}"), Flog->recording, Flog->mode, Flog->sectors_left);
@ -927,4 +927,4 @@ bool Xsns60(uint32_t function)
return result;
}
#endif // USE_GPS
#endif // USE_GPS