From e19f7f6b64433a622354a024d3861c4751190c01 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sun, 22 Sep 2024 01:12:55 +0200 Subject: [PATCH] fix motor tab representation --- locales/en/messages.json | 4 +-- src/js/tabs/motors.js | 4 ++- src/tabs/motors.html | 70 +++++++++++++++++----------------------- 3 files changed, 34 insertions(+), 44 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index e63b02b935..40ff42a073 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1462,10 +1462,10 @@ "message": "Calibrate Gyro on first arm" }, "configurationDigitalIdlePercent": { - "message": "Motor Idle ( %, static)" + "message": "Motor Idle Percent" }, "configurationDigitalIdlePercentHelp": { - "message": "The 'Motor Idle (static)' value is the percent of maximum throttle that is sent to the ESCs when the throttle at minimum stick position and the craft is armed.

Increase it to gain more idle speed and avoid desyncs. Too high and the craft feels floaty. Too low and the motors can desync or be slow to start up." + "message": "The Motor Idle value sets the idle speed of the motors when throttle is at minimum position.

Dynamic Idle disabled

The lowest throttle value sent to any motor, while armed, as a percentage of full throttle. Increase it to improve motor startup reliability, to avoid desyncs, and to improve PID responsiveness at low throttle.

Too low: the motors may not start up reliably, or desync at the end of a flip or roll or on hard throttle chops.

Too high: the craft may feel 'floaty'.

Dynamic idle enabled

The maximum throttle allowed, after arming, before takeoff. If RPM is less than dyn_idle_min_rpm, or zero, this throttle value will be sent to the motors. When the motors start spinning, throttle is adjusted to maintain the set RPM, but cannot exceed this value until the quad takes off.

Too low: the motors may not start up reliably.

Too high: the craft may shake on the ground before takeoff." }, "configurationMotorPoles": { "message": "Motor poles", diff --git a/src/js/tabs/motors.js b/src/js/tabs/motors.js index a479ff3d5b..da249d5b36 100644 --- a/src/js/tabs/motors.js +++ b/src/js/tabs/motors.js @@ -17,6 +17,8 @@ import { updateTabList } from "../utils/updateTabList"; import { isInt, getMixerImageSrc } from "../utils/common"; import * as d3 from 'd3'; import $ from 'jquery'; +import semver from "semver-min"; +import { API_VERSION_1_47 } from "../data_storage.js"; const motors = { previousDshotBidir: null, @@ -764,7 +766,7 @@ motors.initialize = async function (callback) { $('div.digitalIdlePercent').toggle(protocolConfigured && digitalProtocol); $('div.idleMinRpm').toggle(protocolConfigured && digitalProtocol && FC.MOTOR_CONFIG.use_dshot_telemetry); - if (FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) { + if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_47) && FC.ADVANCED_TUNING.idleMinRpm && FC.MOTOR_CONFIG.use_dshot_telemetry) { $('div.digitalIdlePercent').hide(); } diff --git a/src/tabs/motors.html b/src/tabs/motors.html index 0257a89f52..301df8dcce 100644 --- a/src/tabs/motors.html +++ b/src/tabs/motors.html @@ -93,57 +93,45 @@
- +
+ +
+
-
- -
-
- +
+ +
+
+
+
+ +
+ +
+
- +
+ +
+ +
- +
+ +
+
- +
+ +
+ +