Fixed duplication of 'gyro_to_use'. (#1629)

Fixed duplication of 'gyro_to_use'.
10.7.0-preview
Michael Keller 2019-09-09 01:09:11 +12:00 committed by GitHub
commit 68d076c714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

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

View File

@ -975,7 +975,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
}
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
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.gyroMovementCalibThreshold = data.readU8();
PID_ADVANCED_CONFIG.gyroCalibDuration = data.readU16();
@ -1873,7 +1873,7 @@ MspHelper.prototype.crunch = function(code) {
buffer.push8(gyroUse32kHz);
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
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.gyroMovementCalibThreshold)
.push16(PID_ADVANCED_CONFIG.gyroCalibDuration)