From 11279cd05a254b3899c4c100636394c954852b51 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 24 Nov 2023 17:51:39 +0100 Subject: [PATCH] Fix sensor status calls (#3640) Fix Sensor Status --- src/js/msp/MSPHelper.js | 3 --- src/js/serial_backend.js | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js index 8cb6d491df..095b0952f4 100644 --- a/src/js/msp/MSPHelper.js +++ b/src/js/msp/MSPHelper.js @@ -1,6 +1,5 @@ import '../injected_methods'; import { update_dataflash_global } from "../update_dataflash_global"; -import { sensor_status } from "../sensor_helpers"; import { bit_check, bit_set } from "../bit"; import { i18n } from "../localization"; import { gui_log } from "../gui_log"; @@ -193,7 +192,6 @@ MspHelper.prototype.process_data = function(dataHandler) { FC.CONFIG.mode = data.readU32(); FC.CONFIG.profile = data.readU8(); - sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix); break; case MSPCodes.MSP_STATUS_EX: FC.CONFIG.cycleTime = data.readU16(); @@ -223,7 +221,6 @@ MspHelper.prototype.process_data = function(dataHandler) { FC.CONFIG.cpuTemp = data.readU16(); } - sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix); break; case MSPCodes.MSP_RAW_IMU: diff --git a/src/js/serial_backend.js b/src/js/serial_backend.js index 8517e94fa1..c351a0026b 100644 --- a/src/js/serial_backend.js +++ b/src/js/serial_backend.js @@ -765,9 +765,10 @@ async function update_live_status() { if (have_sensor(FC.CONFIG.activeSensors, 'gps')) { await MSP.promise(MSPCodes.MSP_RAW_GPS); - sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix); } + sensor_status(FC.CONFIG.activeSensors, FC.GPS_DATA.fix); + statuswrapper.show(); } }