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:
parent
6ef0046a1d
commit
6cbbaff240
6 changed files with 27 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue