1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-17 21:35:33 +03:00

Fixed duplication of 'gyro_to_use'.

This commit is contained in:
mikeller 2019-09-07 23:06:50 +12:00
parent a5a9070f98
commit 7d6effca85
2 changed files with 2 additions and 3 deletions

View file

@ -372,7 +372,6 @@ var FC = {
digitalIdlePercent: 0, digitalIdlePercent: 0,
gyroUse32kHz: 0, gyroUse32kHz: 0,
motorPwmInversion: 0, motorPwmInversion: 0,
gyroToUse: 0,
gyroHighFsr: 0, gyroHighFsr: 0,
gyroMovementCalibThreshold: 0, gyroMovementCalibThreshold: 0,
gyroCalibDuration: 0, gyroCalibDuration: 0,

View file

@ -975,7 +975,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
} }
if (semver.gte(CONFIG.apiVersion, "1.42.0")) { if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
PID_ADVANCED_CONFIG.motorPwmInversion = data.readU8(); PID_ADVANCED_CONFIG.motorPwmInversion = data.readU8();
PID_ADVANCED_CONFIG.gyroToUse = data.readU8(); SENSOR_ALIGNMENT.gyro_to_use = data.readU8(); // We don't want to double up on storing this state
PID_ADVANCED_CONFIG.gyroHighFsr = data.readU8(); PID_ADVANCED_CONFIG.gyroHighFsr = data.readU8();
PID_ADVANCED_CONFIG.gyroMovementCalibThreshold = data.readU8(); PID_ADVANCED_CONFIG.gyroMovementCalibThreshold = data.readU8();
PID_ADVANCED_CONFIG.gyroCalibDuration = data.readU16(); PID_ADVANCED_CONFIG.gyroCalibDuration = data.readU16();
@ -1869,7 +1869,7 @@ MspHelper.prototype.crunch = function(code) {
buffer.push8(gyroUse32kHz); buffer.push8(gyroUse32kHz);
if (semver.gte(CONFIG.apiVersion, "1.42.0")) { if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
buffer.push8(PID_ADVANCED_CONFIG.motorPwmInversion) buffer.push8(PID_ADVANCED_CONFIG.motorPwmInversion)
.push8(PID_ADVANCED_CONFIG.gyroToUse) .push8(SENSOR_ALIGNMENT.gyro_to_use) // We don't want to double up on storing this state
.push8(PID_ADVANCED_CONFIG.gyroHighFsr) .push8(PID_ADVANCED_CONFIG.gyroHighFsr)
.push8(PID_ADVANCED_CONFIG.gyroMovementCalibThreshold) .push8(PID_ADVANCED_CONFIG.gyroMovementCalibThreshold)
.push16(PID_ADVANCED_CONFIG.gyroCalibDuration) .push16(PID_ADVANCED_CONFIG.gyroCalibDuration)