Skip to content

Commit

Permalink
Fix sensor status calls (betaflight#3640)
Browse files Browse the repository at this point in the history
Fix Sensor Status
  • Loading branch information
haslinghuis authored and chmelevskij committed Apr 27, 2024
1 parent ab6312a commit 3b2ee10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/js/msp/MSPHelper.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion src/js/serial_backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 3b2ee10

Please sign in to comment.