diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b42fa5e0..6b9cbee0 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -644,11 +644,17 @@ "configurationMidRcHelp": { "message": "This is the center value for all RC channels. Set this to the value that your transmitter sends when the stick is centered for a channel. To adjust the thrust at throttle mid position, change the 'Trottle MID' value on the PID Tuning tab." }, + "configurationDigitalIdlePercent": { + "message": "Motor Idle Throttle Value (percent)" + }, + "configurationDigitalIdlePercentHelp": { + "message": "This is the 'idle' value in percent of maximum throttle that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Increase the percent value to gain more idle speed." + }, "configurationThrottleMinimum": { - "message": "Minimum Throttle" + "message": "Motor Idle Throttle Value (absolute / percent)" }, "configurationThrottleMinimumHelp": { - "message": "This is the 'idle' value that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Adjust this so the motors run as slow as possible while still running smoothly." + "message": "This is the 'idle' value (absolute / as a percentage of the throttle range) that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Increase the value or to gain more idle speed." }, "configurationThrottleMaximum": { "message": "Maximum Throttle" @@ -1839,6 +1845,15 @@ "configurationPidProcessDenom": { "message": "PID loop frequency" }, + "configurationPidProcessDenomHelp": { + "message": "The maximum frequency for the PID loop is limited by the maximum frequency that updates can be sent by the chosen ESC / motor protocol." + }, + "configurationGyroUse32kHz": { + "message": "Use 32 kHz gyro update frequency instead of 8 kHz" + }, + "configurationGyroUse32kHzHelp": { + "message": "32 kHz gyro update frequency is only possible if the gyro chip supports it (currently MPU6500, MPU9250, and ICM20689 if connected over SPI). If in doubt, consult the specification for your board." + }, "configurationAccHardware": { "message": "Accelerometer" }, diff --git a/js/fc.js b/js/fc.js index f78ccd5d..06990bd9 100644 --- a/js/fc.js +++ b/js/fc.js @@ -256,7 +256,9 @@ var FC = { pid_process_denom: 0, use_unsyncedPwm: 0, fast_pwm_protocol: 0, - motor_pwm_rate: 0 + motor_pwm_rate: 0, + digitalIdlePercent: 0, + gyroUse32kHz: 0 }; FILTER_CONFIG = { @@ -283,7 +285,9 @@ var FC = { toleranceBandReduction: 0, itermThrottleGain: 0, pidMaxVelocity: 0, - pidMaxVelocityYaw: 0 + pidMaxVelocityYaw: 0, + levelAngleLimit: 0, + levelSensitivity: 0 }; SENSOR_CONFIG = { diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 583209d7..063de2b0 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -617,6 +617,13 @@ MspHelper.prototype.process_data = function(dataHandler) { PID_ADVANCED_CONFIG.use_unsyncedPwm = data.readU8(); PID_ADVANCED_CONFIG.fast_pwm_protocol = data.readU8(); PID_ADVANCED_CONFIG.motor_pwm_rate = data.readU16(); + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + PID_ADVANCED_CONFIG.digitalIdlePercent = data.readU16() / 100; + + if (semver.gte(CONFIG.apiVersion, "1.25.0")) { + PID_ADVANCED_CONFIG.gyroUse32kHz = data.readU8(); + } + } break; case MSPCodes.MSP_FILTER_CONFIG: FILTER_CONFIG.gyro_soft_lpf_hz = data.readU8(); @@ -651,6 +658,10 @@ MspHelper.prototype.process_data = function(dataHandler) { ADVANCED_TUNING.pidMaxVelocity = data.readU16(); ADVANCED_TUNING.pidMaxVelocityYaw = data.readU16(); } + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + ADVANCED_TUNING.levelAngleLimit = data.readU8(); + ADVANCED_TUNING.levelSensitivity = data.readU8(); + } break; case MSPCodes.MSP_SENSOR_CONFIG: SENSOR_CONFIG.acc_hardware = data.readU8(); @@ -1130,6 +1141,13 @@ MspHelper.prototype.crunch = function(code) { .push8(PID_ADVANCED_CONFIG.use_unsyncedPwm) .push8(PID_ADVANCED_CONFIG.fast_pwm_protocol) .push16(PID_ADVANCED_CONFIG.motor_pwm_rate); + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + buffer.push16(PID_ADVANCED_CONFIG.digitalIdlePercent * 100); + + if (semver.gte(CONFIG.apiVersion, "1.25.0")) { + buffer.push8(PID_ADVANCED_CONFIG.gyroUse32kHz); + } + } break; case MSPCodes.MSP_SET_FILTER_CONFIG: buffer.push8(FILTER_CONFIG.gyro_soft_lpf_hz) @@ -1160,6 +1178,10 @@ MspHelper.prototype.crunch = function(code) { .push8(ADVANCED_TUNING.itermThrottleGain) .push16(ADVANCED_TUNING.pidMaxVelocity) .push16(ADVANCED_TUNING.pidMaxVelocityYaw); + if (semver.gte(CONFIG.apiVersion, "1.24.0")) { + buffer.push8(ADVANCED_TUNING.levelAngleLimit) + .push8(ADVANCED_TUNING.levelSensitivity); + } } // only supports 1 version pre bf 3.0 else { diff --git a/tabs/configuration.html b/tabs/configuration.html index 16ecc954..d050ab56 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -90,16 +90,28 @@
-