From b456b97dda5d7f7d72467de21a2c0250c8361229 Mon Sep 17 00:00:00 2001 From: pkkrusty <79770016+pkkrusty@users.noreply.github.com> Date: Sat, 25 Mar 2023 09:23:58 +0000 Subject: [PATCH] Include fix state in JSON output (#18254) Mirror the webpage display, and make fix status available for triggers and rules. --- tasmota/tasmota_xsns_sensor/xsns_60_GPS.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_60_GPS.ino b/tasmota/tasmota_xsns_sensor/xsns_60_GPS.ino index c170e1b0e..f284418ba 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_60_GPS.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_60_GPS.ino @@ -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 \ No newline at end of file +#endif // USE_GPS