Skip to content

Commit e542d3d

Browse files
authored
Add MSP_STATUS_EX to catch rate profile number (#4565)
1 parent 645f9ae commit e542d3d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/js/tabs/pid_tuning.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pid_tuning.initialize = function (callback) {
7777
)
7878
: true,
7979
)
80+
.then(() => (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47) ? MSP.promise(MSPCodes.MSP_STATUS_EX) : true))
8081
.then(() => MSP.promise(MSPCodes.MSP_SIMPLIFIED_TUNING))
8182
.then(() => MSP.promise(MSPCodes.MSP_ADVANCED_CONFIG))
8283
.then(() => MSP.send_message(MSPCodes.MSP_MIXER_CONFIG, false, false, load_html));
@@ -1699,9 +1700,7 @@ pid_tuning.initialize = function (callback) {
16991700
const expo = parseFloat(throttleExpoE.val()); // Value 0-1
17001701

17011702
// Hover parameter is only available from 1.47 so use mid value for older versions
1702-
const hover = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)
1703-
? parseFloat(throttleHoverE.val())
1704-
: mid;
1703+
const hover = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47) ? parseFloat(throttleHoverE.val()) : mid;
17051704

17061705
const throttleLimitPercent = parseInt(throttleLimitPercentE.val()) / 100; // Value 0-1
17071706
const throttleLimitType = parseInt(throttleLimitTypeE.val());

0 commit comments

Comments
 (0)