1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

Drop MSP_STATUS and MSP_STATUS_EX

This commit is contained in:
Pawel Spychalski (DzikuVx) 2022-02-24 11:27:39 +01:00
parent 4426176c4b
commit 473adae418
5 changed files with 26 additions and 76 deletions

View file

@ -107,7 +107,7 @@ var MSPCodes = {
MSP_RC_DEADBAND: 125,
MSP_SENSOR_ALIGNMENT: 126,
MSP_LED_STRIP_MODECOLOR:127,
MSP_STATUS_EX: 150,
MSP_STATUS_EX: 150, // Deprecated, do not use.
MSP_SENSOR_STATUS: 151,
MSP_SET_RAW_RC: 200,

View file

@ -68,27 +68,6 @@ var mspHelper = (function (gui) {
colorCount,
color;
if (!dataHandler.unsupported || dataHandler.unsupported) switch (dataHandler.code) {
case MSPCodes.MSP_STATUS:
console.log('Using deprecated msp command: MSP_STATUS');
CONFIG.cycleTime = data.getUint16(0, true);
CONFIG.i2cError = data.getUint16(2, true);
CONFIG.activeSensors = data.getUint16(4, true);
CONFIG.mode = data.getUint32(6, true);
CONFIG.profile = data.getUint8(10);
gui.updateProfileChange();
gui.updateStatusBar();
break;
case MSPCodes.MSP_STATUS_EX:
CONFIG.cycleTime = data.getUint16(0, true);
CONFIG.i2cError = data.getUint16(2, true);
CONFIG.activeSensors = data.getUint16(4, true);
CONFIG.profile = data.getUint8(10);
CONFIG.cpuload = data.getUint16(11, true);
CONFIG.armingFlags = data.getUint16(13, true);
gui.updateStatusBar();
gui.updateProfileChange();
break;
case MSPCodes.MSPV2_INAV_STATUS:
CONFIG.cycleTime = data.getUint16(offset, true);
offset += 2;
@ -2742,10 +2721,6 @@ var mspHelper = (function (gui) {
MSP.send_message(MSPCodes.MSP_PIDNAMES, false, false, callback);
};
self.loadStatus = function (callback) {
MSP.send_message(MSPCodes.MSP_STATUS, false, false, callback);
};
self.loadFeatures = function (callback) {
MSP.send_message(MSPCodes.MSP_FEATURE, false, false, callback);
};

View file

@ -62,7 +62,7 @@ $(document).ready(function () {
} else {
helper.timeout.add('waiting_for_bootup', function waiting_for_bootup() {
MSP.send_message(MSPCodes.MSP_STATUS, false, false, function () {
MSP.send_message(MSPCodes.MSPV2_INAV_STATUS, false, false, function () {
//noinspection JSUnresolvedVariable
GUI.log(chrome.i18n.getMessage('deviceReady'));
//noinspection JSValidateTypes

View file

@ -1,25 +0,0 @@
'use strict';
var helper = helper || {};
helper.task = (function () {
var publicScope = {},
privateScope = {};
privateScope.getStatusPullInterval = function () {
//TODO use serial connection speed to determine update interval
return 250;
};
publicScope.statusPullStart = function () {
helper.interval.add('status_pull', function () {
MSP.send_message(MSPCodes.MSP_STATUS, false, false, function () {
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
});
}, privateScope.getStatusPullInterval(), true);
};
return publicScope;
})();

View file

@ -53,7 +53,7 @@ TABS.calibration.initialize = function (callback) {
googleAnalytics.sendAppView('Calibration');
}
loadChainer.setChain([
mspHelper.loadStatus,
mspHelper.queryFcStatus,
mspHelper.loadSensorConfig,
mspHelper.loadCalibrationData
]);