1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 09:45:28 +03:00

GPS icon now reflect fix state (#3377)

* GPS icon now reflect fix state

* Code moved to sensor_helpers.js

* Code moved to sensor_helpers.js

* Minor changes
This commit is contained in:
HThuren 2023-03-13 20:34:17 +01:00 committed by GitHub
parent 6ef0046a1d
commit 6cbbaff240
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 7 deletions

View file

@ -217,7 +217,7 @@ function finishClose(finishedCallback) {
$('div.connect_controls div.connect_state').text(i18n.getMessage('connect'));
// reset active sensor indicators
sensor_status(0);
sensor_status();
if (wasConnected) {
// detach listeners and remove element data
@ -683,6 +683,9 @@ async function update_live_status() {
if (GUI.active_tab !== 'cli' && GUI.active_tab !== 'presets') {
await MSP.promise(MSPCodes.MSP_BOXNAMES);
await getStatus();
if (have_sensor(FC.CONFIG.activeSensors, 'gps')) {
await MSP.promise(MSPCodes.MSP_RAW_GPS);
}
await MSP.promise(MSPCodes.MSP_ANALOG);
const active = ((Date.now() - FC.ANALOG.last_received_timestamp) < 300);
@ -723,6 +726,8 @@ async function update_live_status() {
}
}
sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix);
$(".linkicon").toggleClass('active', active);
statuswrapper.show();