1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

First step towards adding filter settings in configurator

This commit is contained in:
KiteAnton 2016-06-20 23:17:32 +02:00 committed by U-DESKTOP-12PPI61\boris.bozic
parent 61297fbe1c
commit c9a5294f43
3 changed files with 46 additions and 1 deletions

View file

@ -43,6 +43,11 @@ var MSP_codes = {
MSP_PID_ADVANCED_CONFIG: 90,
MSP_SET_PID_ADVANCED_CONFIG: 91,
MSP_FILTER_CONFIG: 92,
MSP_SET_FILTER_CONFIG: 93,
MSP_ADVANCED_TUNING: 94,
MSP_SET_ADVANCED_TUNING: 95,
// Multiwii MSP commands
MSP_IDENT: 100,
@ -879,6 +884,23 @@ var MSP = {
PID_ADVANCED_CONFIG.fast_pwm_protocol = data.getUint8(offset++, 1);
PID_ADVANCED_CONFIG.motor_pwm_rate = data.getUint16(offset++, 1);
break;
case MSP_codes.MSP_FILTER_CONFIG:
var offset = 0;
FILTER_CONFIG.gyro_soft_lpf_hz = data.getUint8(offset++, 1);
FILTER_CONFIG.dterm_lpf_hz = data.getUint16(offset, 1);
offset += 2;
FILTER_CONFIG.yaw_lpf_hz = data.getUint16(offset, 1);
break;
case MSP_codes.MSP_ADVANCED_TUNING:
var offset = 0;
ADVANCED_TUNING.rollPitchItermIgnoreRate = data.getUint16(offset, 1);
offset += 2;
ADVANCED_TUNING.yawItermIgnoreRate = data.getUint16(offset, 1);
offset += 2;
ADVANCED_TUNING.yaw_p_limit = data.getUint16(offset, 1);
break;
case MSP_codes.MSP_LED_STRIP_CONFIG:
LED_STRIP = [];