1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 12:55:13 +03:00

backend for MSP_POSITION_ESTIMATION_CONFIG

This commit is contained in:
Pawel Spychalski (DzikuVx) 2017-01-23 21:03:29 +01:00
parent 638cf92048
commit 31dad7a826
3 changed files with 48 additions and 0 deletions

View file

@ -900,6 +900,20 @@ var mspHelper = (function (gui) {
console.log('NAV_POSHOLD saved');
break;
case MSPCodes.MSP_POSITION_ESTIMATION_CONFIG:
POSITION_ESTIMATOR.w_z_baro_p = data.getUint16(0, true);
POSITION_ESTIMATOR.w_z_gps_p = data.getUint16(2, true);
POSITION_ESTIMATOR.w_z_gps_v = data.getUint16(4, true);
POSITION_ESTIMATOR.w_xy_gps_p = data.getUint16(6, true);
POSITION_ESTIMATOR.w_xy_gps_v = data.getUint16(8, true);
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_SET_MODE_RANGE:
console.log('Mode range saved');
break;
@ -1219,6 +1233,26 @@ var mspHelper = (function (gui) {
buffer.push(highByte(NAV_POSHOLD.hoverThrottle));
break;
case MSPCodes.MSP_SET_POSITION_ESTIMATION_CONFIG:
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_baro_p));
buffer.push(highByte(POSITION_ESTIMATOR.w_z_baro_p));
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_gps_p));
buffer.push(highByte(POSITION_ESTIMATOR.w_z_gps_p));
buffer.push(lowByte(POSITION_ESTIMATOR.w_z_gps_v));
buffer.push(highByte(POSITION_ESTIMATOR.w_z_gps_v));
buffer.push(lowByte(POSITION_ESTIMATOR.w_xy_gps_p));
buffer.push(highByte(POSITION_ESTIMATOR.w_xy_gps_p));
buffer.push(lowByte(POSITION_ESTIMATOR.w_xy_gps_v));
buffer.push(highByte(POSITION_ESTIMATOR.w_xy_gps_v));
buffer.push(POSITION_ESTIMATOR.gps_min_sats);
buffer.push(POSITION_ESTIMATOR.use_gps_velned);
break;
case MSPCodes.MSP_SET_FILTER_CONFIG:
buffer.push(FILTER_CONFIG.gyroSoftLpfHz);