File tree Expand file tree Collapse file tree 3 files changed +41
-7
lines changed Expand file tree Collapse file tree 3 files changed +41
-7
lines changed Original file line number Diff line number Diff line change 16861686 "pidTuningAngle" : {
16871687 "message" : " Angle"
16881688 },
1689+ "pidTuningLevelAngleLimit" : {
1690+ "message" : " Angle Limit"
1691+ },
1692+ "pidTuningLevelSensitivity" : {
1693+ "message" : " Sensitivity"
1694+ },
16891695 "pidTuningLevelHelp" : {
16901696 "message" : " The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
16911697 },
Original file line number Diff line number Diff line change 210210 </ table >
211211 </ div >
212212 < div id ="pid_accel " class ="gui_box grey topspacer pid_tuning ">
213- < table class ="pid_titlebar ">
214- < tr >
215- < th class ="third " i18n ="pidTuningName "> </ th >
216- < th class ="third " i18n ="pidTuningStrength " style ="width: 33%; "> </ th >
217- < th class ="third " i18n ="pidTuningTransition " style ="width: 33%; "> </ th >
218- </ tr >
219- </ table >
220213 < table id ="pid_level " class ="pid_tuning ">
221214 < tr >
222215 < th colspan ="3 ">
226219 </ div >
227220 </ th >
228221 </ tr >
222+ </ table >
223+ < table class ="pid_titlebar ">
224+ < tr >
225+ < th class ="third " i18n ="pidTuningName "> </ th >
226+ < th class ="third " i18n ="pidTuningStrength " style ="width: 33%; "> </ th >
227+ < th class ="third " i18n ="pidTuningTransition " style ="width: 33%; "> </ th >
228+ </ tr >
229+ </ table >
230+ < table >
229231 < tr class ="ANGLE ">
230232 <!-- 7 -->
231233 < td class ="third " i18n ="pidTuningAngle "> </ td >
239241 < td class ="third "> < input type ="number " name ="d " step ="1 " min ="0 " max ="255 " /> </ td >
240242 </ tr >
241243 </ table >
244+ < table class ="pid_titlebar pid_sensitivity ">
245+ < tr >
246+ < th class ="third "> </ th >
247+ < th class ="third " i18n ="pidTuningLevelAngleLimit " style ="width: 33%; "> </ th >
248+ < th class ="third " i18n ="pidTuningLevelSensitivity " style ="width: 33%; "> </ th >
249+ </ tr >
250+ </ table >
251+ < table id ="pid_sensitivity " class ="pid_tuning pid_sensitivity ">
252+ < tr >
253+ < td class ="third "> </ td >
254+ < td class ="third "> < input type ="number " name ="angleLimit " step ="1 " min ="10 " max ="200 " /> </ td >
255+ < td class ="third "> < input type ="number " name ="sensitivity " step ="1 " min ="10 " max ="120 " /> </ td >
256+ </ tr >
257+ </ table >
242258 </ div >
243259 < div class ="gui_box grey topspacer pidTuningFeatures ">
244260 < table class ="pid_titlebar new_rates ">
Original file line number Diff line number Diff line change @@ -263,6 +263,13 @@ TABS.pid_tuning.initialize = function (callback) {
263263 } else {
264264 $ ( '.pid_filter .gyroNotch2' ) . hide ( ) ;
265265 }
266+
267+ if ( semver . gte ( CONFIG . apiVersion , "1.24.0" ) ) {
268+ $ ( '.pid_tuning input[name="angleLimit"]' ) . val ( ADVANCED_TUNING . levelAngleLimit ) ;
269+ $ ( '.pid_tuning input[name="sensitivity"]' ) . val ( ADVANCED_TUNING . levelSensitivity ) ;
270+ } else {
271+ $ ( '.pid_sensitivity' ) . hide ( ) ;
272+ }
266273 }
267274
268275 function form_to_pid_and_rc ( ) {
@@ -369,6 +376,10 @@ TABS.pid_tuning.initialize = function (callback) {
369376 }
370377 }
371378
379+ if ( semver . gte ( CONFIG . apiVersion , "1.24.0" ) ) {
380+ ADVANCED_TUNING . levelAngleLimit = parseInt ( $ ( '.pid_tuning input[name="angleLimit"]' ) . val ( ) ) ;
381+ ADVANCED_TUNING . levelSensitivity = parseInt ( $ ( '.pid_tuning input[name="sensitivity"]' ) . val ( ) ) ;
382+ }
372383 }
373384
374385 function showAllPids ( ) {
@@ -383,6 +394,7 @@ TABS.pid_tuning.initialize = function (callback) {
383394 if ( have_sensor ( CONFIG . activeSensors , 'acc' ) ) {
384395 $ ( '#pid_accel' ) . show ( ) ;
385396 $ ( '#pid_level' ) . show ( ) ;
397+ $ ( '#pid_sensitivity' ) . show ( ) ;
386398 }
387399
388400 var showTitle = false ;
You can’t perform that action at this time.
0 commit comments