From 1ba3549af12d9cef119717707b757ed8d1591272 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Wed, 17 Apr 2024 18:57:51 +0200 Subject: [PATCH 1/2] EzTune Snappiness --- js/fc.js | 3 ++- js/msp/MSPHelper.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/fc.js b/js/fc.js index 2b819e4a..5c0cda14 100644 --- a/js/fc.js +++ b/js/fc.js @@ -566,7 +566,8 @@ var FC = { stability: null, aggressiveness: null, rate: null, - expo: null + expo: null, + snappiness: null, }; diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 90440071..9ebe2e32 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -1515,6 +1515,7 @@ var mspHelper = (function (gui) { EZ_TUNE.aggressiveness = data.getUint8(7); EZ_TUNE.rate = data.getUint8(8); EZ_TUNE.expo = data.getUint8(9); + EZ_TUNE.snappiness = data.getUint8(10); break; case MSPCodes.MSP2_INAV_EZ_TUNE_SET: @@ -2159,6 +2160,7 @@ var mspHelper = (function (gui) { buffer.push(EZ_TUNE.aggressiveness); buffer.push(EZ_TUNE.rate); buffer.push(EZ_TUNE.expo); + buffer.push(EZ_TUNE.snappiness); break; From a6f7ff3a91844d7729e1c6c5c465034f7f000c2b Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Wed, 17 Apr 2024 18:58:03 +0200 Subject: [PATCH 2/2] Ez Tune snappiness --- _locales/en/messages.json | 6 ++++++ tabs/pid_tuning.html | 10 ++++++++++ tabs/pid_tuning.js | 3 +++ 3 files changed, 19 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6e32f025..0e7a3831 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -5703,6 +5703,12 @@ "ezTuneExpo": { "message": "Expo" }, + "ezTuneSnappiness": { + "message": "Snappiness" + }, + "ezTuneSnappinessTips": { + "message": "Helps to have a snappy stick feeling. Whenever you do a fast stick movement, high Snappiness will accelerate the drone response. Both when you start and stop the manouver. Try different values to find the one that suits you best." + }, "ezTuneFilterHzTips": { "message": "This sets the base cutoff frequency for all INAV gyro and D-term filters. Higher values will result in lower filter delay and better stabilization, but more noise will go through the filters and motors will get hot, UAV might oscillate and be unfyable. Your goal is to increase this value as high as possible before any negative effects appear. Negative effects include: hot motors, audible osciallations, UAV rapidly shaking, UAV gaining altitude by itself. Usual starting points for 'Filter Hz' are: 3-inch props: 90, 5-inch props: 110, 7-inch props: 90, 10-inch props: 75, 12-inch props: 60. Use Blackbox and common sense to find a value that is most suited for your UAV." }, diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index fb52eaf2..04fded18 100644 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -118,6 +118,16 @@ +
+
+
+ +
+ +
+
+
+
diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 9a0df1d2..7b878ad6 100644 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -187,6 +187,8 @@ TABS.pid_tuning.initialize = function (callback) { GUI.sliderize($('#ez_tune_rate'), EZ_TUNE.rate, 0, 200); GUI.sliderize($('#ez_tune_expo'), EZ_TUNE.expo, 0, 200); + GUI.sliderize($('#ez_tune_snappiness'), EZ_TUNE.snappiness, 0, 100); + $('.ez-element').on('updated', function () { updatePreview(); }); @@ -317,6 +319,7 @@ TABS.pid_tuning.initialize = function (callback) { EZ_TUNE.aggressiveness = $('#ez_tune_aggressiveness').val(); EZ_TUNE.rate = $('#ez_tune_rate').val(); EZ_TUNE.expo = $('#ez_tune_expo').val(); + EZ_TUNE.snappiness = $('#ez_tune_snappiness').val(); function send_rc_tuning_changes() { MSP.send_message(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE, mspHelper.crunch(MSPCodes.MSPV2_INAV_SET_RATE_PROFILE), false, saveRateDynamics);