From bea9d164869d7849844300d7e7fead00e7fbb743 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sun, 14 Aug 2022 17:50:34 +0200 Subject: [PATCH] Fix auto_profile_cell_count range --- locales/en/messages.json | 36 ++++++++++++++++++++++++++++++++++-- src/js/tabs/pid_tuning.js | 4 ++-- src/tabs/pid_tuning.html | 15 ++++++++++++++- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index 11a87bba..313a5a59 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -3710,7 +3710,39 @@ "message": "Cell Count - for auto Profile switching" }, "pidTuningCellCountHelp": { - "message": "Automatically activates the first profile that has a cell count equal to that of the connected battery." + "message": "Automatically activates the first profile that has a cell count equal to that of the connected battery.

" + }, + "pidTuningCellCountChange": { + "message": "Switch", + "description": "Switch profile if there are no profiles matching cell count" + }, + "pidTuningCellCountStay": { + "message": "Disable", + "description": "Disable cell count for this profile" + }, + "pidTuningCellCount1S": { + "message": "1S" + }, + "pidTuningCellCount2S": { + "message": "2S" + }, + "pidTuningCellCount3S": { + "message": "3S" + }, + "pidTuningCellCount4S": { + "message": "4S" + }, + "pidTuningCellCount5S": { + "message": "5S" + }, + "pidTuningCellCount6S": { + "message": "6S" + }, + "pidTuningCellCount7S": { + "message": "7S" + }, + "pidTuningCellCount8S": { + "message": "8S" }, "pidTuningNonProfileFilterSettings": { "message": "Profile independent Filter Settings" @@ -3797,7 +3829,7 @@ }, "pidTuningSlidersExpertSettingsDetectedNote": { "message": "Note: Slider(s) are disabled because current values are outside the Basic Mode adjustment range. Switch to Expert Mode to make changes", - "desciption": "Slider expert settings detected while in non-expert mode" + "description": "Slider expert settings detected while in non-expert mode" }, "pidTuningSliderLow": { "message": "Low", diff --git a/src/js/tabs/pid_tuning.js b/src/js/tabs/pid_tuning.js index 66221e50..1ee488a6 100644 --- a/src/js/tabs/pid_tuning.js +++ b/src/js/tabs/pid_tuning.js @@ -516,7 +516,7 @@ pid_tuning.initialize = function (callback) { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) { $('.tab-pid_tuning input[name="motorLimit"]').val(FC.ADVANCED_TUNING.motorOutputLimit); - $('.tab-pid_tuning input[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount); + $('.tab-pid_tuning select[name="cellCount"]').val(FC.ADVANCED_TUNING.autoProfileCellCount); $('input[name="idleMinRpm-number"]').val(FC.ADVANCED_TUNING.idleMinRpm).prop('disabled', !FC.MOTOR_CONFIG.use_dshot_telemetry); if (FC.MOTOR_CONFIG.use_dshot_telemetry) { @@ -1308,7 +1308,7 @@ pid_tuning.initialize = function (callback) { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) { FC.FILTER_CONFIG.dyn_notch_max_hz = parseInt($('.pid_filter input[name="dynamicNotchMaxHz"]').val()); FC.ADVANCED_TUNING.motorOutputLimit = parseInt($('.tab-pid_tuning input[name="motorLimit"]').val()); - FC.ADVANCED_TUNING.autoProfileCellCount = parseInt($('.tab-pid_tuning input[name="cellCount"]').val()); + FC.ADVANCED_TUNING.autoProfileCellCount = parseInt($('.tab-pid_tuning select[name="cellCount"]').val()); FC.ADVANCED_TUNING.idleMinRpm = parseInt($('input[name="idleMinRpm-number"]').val()); const selectedRatesType = $('select[id="ratesType"]').val(); // send analytics for rates type diff --git a/src/tabs/pid_tuning.html b/src/tabs/pid_tuning.html index 880dae67..3641e585 100644 --- a/src/tabs/pid_tuning.html +++ b/src/tabs/pid_tuning.html @@ -822,7 +822,20 @@ - +
+ +