mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 16:25:19 +03:00
Drop MSP_POSITION_ESTIMATION_CONFIG
This commit is contained in:
parent
3f6b820033
commit
d09bbc050c
2 changed files with 0 additions and 102 deletions
|
@ -18,8 +18,6 @@ var MSPCodes = {
|
|||
MSP_CALIBRATION_DATA: 14,
|
||||
MSP_SET_CALIBRATION_DATA: 15,
|
||||
|
||||
MSP_POSITION_ESTIMATION_CONFIG: 16,
|
||||
MSP_SET_POSITION_ESTIMATION_CONFIG: 17,
|
||||
MSP_WP_MISSION_LOAD: 18,
|
||||
MSP_WP_MISSION_SAVE: 19,
|
||||
MSP_WP_GETINFO: 20,
|
||||
|
@ -55,13 +53,9 @@ var MSPCodes = {
|
|||
MSP_SET_LOOP_TIME: 74,
|
||||
MSP_FAILSAFE_CONFIG: 75,
|
||||
MSP_SET_FAILSAFE_CONFIG: 76,
|
||||
MSP_RXFAIL_CONFIG: 77,
|
||||
MSP_SET_RXFAIL_CONFIG: 78,
|
||||
MSP_SDCARD_SUMMARY: 79,
|
||||
MSP_BLACKBOX_CONFIG: 80,
|
||||
MSP_SET_BLACKBOX_CONFIG: 81,
|
||||
MSP_OSD_CONFIG: 84,
|
||||
MSP_SET_OSD_CONFIG: 85,
|
||||
MSP_OSD_CHAR_READ: 86,
|
||||
MSP_OSD_CHAR_WRITE: 87,
|
||||
MSP_VTX_CONFIG: 88,
|
||||
|
|
|
@ -927,21 +927,6 @@ var mspHelper = (function (gui) {
|
|||
offset++;
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_RXFAIL_CONFIG:
|
||||
//noinspection JSUndeclaredVariable
|
||||
RXFAIL_CONFIG = []; // empty the array as new data is coming in
|
||||
|
||||
var channelCount = data.byteLength / 3;
|
||||
|
||||
for (i = 0; offset < data.byteLength && i < channelCount; i++, offset++) {
|
||||
var rxfailChannel = {
|
||||
mode: data.getUint8(offset++),
|
||||
value: data.getUint16(offset++, true)
|
||||
};
|
||||
RXFAIL_CONFIG.push(rxfailChannel);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MSPCodes.MSP_LED_STRIP_CONFIG:
|
||||
//noinspection JSUndeclaredVariable
|
||||
|
@ -1326,20 +1311,6 @@ var mspHelper = (function (gui) {
|
|||
console.log('Calibration data saved');
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_POSITION_ESTIMATION_CONFIG:
|
||||
POSITION_ESTIMATOR.w_z_baro_p = data.getUint16(0, true) / 100;
|
||||
POSITION_ESTIMATOR.w_z_gps_p = data.getUint16(2, true) / 100;
|
||||
POSITION_ESTIMATOR.w_z_gps_v = data.getUint16(4, true) / 100;
|
||||
POSITION_ESTIMATOR.w_xy_gps_p = data.getUint16(6, true) / 100;
|
||||
POSITION_ESTIMATOR.w_xy_gps_v = data.getUint16(8, true) / 100;
|
||||
POSITION_ESTIMATOR.gps_min_sats = data.getUint8(10);
|
||||
POSITION_ESTIMATOR.use_gps_velned = data.getUint8(11);
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG:
|
||||
console.log('POSITION_ESTIMATOR saved');
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_RTH_AND_LAND_CONFIG:
|
||||
RTH_AND_LAND_CONFIG.minRthDistance = data.getUint16(0, true);
|
||||
RTH_AND_LAND_CONFIG.rthClimbFirst = data.getUint8(2);
|
||||
|
@ -1399,17 +1370,9 @@ var mspHelper = (function (gui) {
|
|||
case MSPCodes.MSP_SET_RX_CONFIG:
|
||||
console.log('Rx config saved');
|
||||
break;
|
||||
case MSPCodes.MSP_SET_RXFAIL_CONFIG:
|
||||
console.log('Rxfail config saved');
|
||||
break;
|
||||
case MSPCodes.MSP_SET_FAILSAFE_CONFIG:
|
||||
console.log('Failsafe config saved');
|
||||
break;
|
||||
case MSPCodes.MSP_OSD_CONFIG:
|
||||
break;
|
||||
case MSPCodes.MSP_SET_OSD_CONFIG:
|
||||
console.log('OSD config set');
|
||||
break;
|
||||
case MSPCodes.MSP_OSD_CHAR_READ:
|
||||
break;
|
||||
case MSPCodes.MSP_OSD_CHAR_WRITE:
|
||||
|
@ -2012,26 +1975,6 @@ var mspHelper = (function (gui) {
|
|||
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG:
|
||||
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_baro_p * 100));
|
||||
buffer.push(highByte(POSITION_ESTIMATOR.w_z_baro_p * 100));
|
||||
|
||||
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_gps_p * 100));
|
||||
buffer.push(highByte(POSITION_ESTIMATOR.w_z_gps_p * 100));
|
||||
|
||||
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_gps_v * 100));
|
||||
buffer.push(highByte(POSITION_ESTIMATOR.w_z_gps_v * 100));
|
||||
|
||||
buffer.push(lowByte(POSITION_ESTIMATOR.w_xy_gps_p * 100));
|
||||
buffer.push(highByte(POSITION_ESTIMATOR.w_xy_gps_p * 100));
|
||||
|
||||
buffer.push(lowByte(POSITION_ESTIMATOR.w_xy_gps_v * 100));
|
||||
buffer.push(highByte(POSITION_ESTIMATOR.w_xy_gps_v * 100));
|
||||
|
||||
buffer.push(POSITION_ESTIMATOR.gps_min_sats);
|
||||
buffer.push(POSITION_ESTIMATOR.use_gps_velned);
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_RTH_AND_LAND_CONFIG:
|
||||
buffer.push(lowByte(RTH_AND_LAND_CONFIG.minRthDistance));
|
||||
buffer.push(highByte(RTH_AND_LAND_CONFIG.minRthDistance));
|
||||
|
@ -2582,37 +2525,6 @@ var mspHelper = (function (gui) {
|
|||
});
|
||||
};
|
||||
|
||||
self.sendRxFailConfig = function (onCompleteCallback) {
|
||||
var nextFunction = send_next_rxfail_config;
|
||||
|
||||
var rxFailIndex = 0;
|
||||
|
||||
if (RXFAIL_CONFIG.length == 0) {
|
||||
onCompleteCallback();
|
||||
} else {
|
||||
send_next_rxfail_config();
|
||||
}
|
||||
|
||||
function send_next_rxfail_config() {
|
||||
|
||||
var rxFail = RXFAIL_CONFIG[rxFailIndex];
|
||||
|
||||
var buffer = [];
|
||||
buffer.push(rxFailIndex);
|
||||
buffer.push(rxFail.mode);
|
||||
buffer.push(lowByte(rxFail.value));
|
||||
buffer.push(highByte(rxFail.value));
|
||||
|
||||
// prepare for next iteration
|
||||
rxFailIndex++;
|
||||
if (rxFailIndex == RXFAIL_CONFIG.length) {
|
||||
nextFunction = onCompleteCallback;
|
||||
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_SET_RXFAIL_CONFIG, buffer, false, nextFunction);
|
||||
}
|
||||
};
|
||||
|
||||
self.sendServoMixRules = function (onCompleteCallback) {
|
||||
// TODO implement
|
||||
onCompleteCallback();
|
||||
|
@ -3026,14 +2938,6 @@ var mspHelper = (function (gui) {
|
|||
MSP.send_message(MSPCodes.MSP_SET_NAV_POSHOLD, mspHelper.crunch(MSPCodes.MSP_SET_NAV_POSHOLD), false, callback);
|
||||
};
|
||||
|
||||
self.loadPositionEstimationConfig = function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP_POSITION_ESTIMATION_CONFIG, false, false, callback);
|
||||
};
|
||||
|
||||
self.savePositionEstimationConfig = function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG), false, callback);
|
||||
};
|
||||
|
||||
self.loadCalibrationData = function (callback) {
|
||||
MSP.send_message(MSPCodes.MSP_CALIBRATION_DATA, false, false, callback);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue