Merge pull request #1584 from IvoFPV/piduiov2

Improve PID Tuning tab style and layout
10.7.0-preview
Michael Keller 2019-08-25 13:44:10 +12:00 committed by GitHub
commit e3e79f6e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 572 additions and 583 deletions

View File

@ -1452,7 +1452,10 @@
"message": "<span class=\"message-negative\">Changing PID controller disabled - you can change it via the CLI.</span> You have firmware with API version <span class=\"message-negative\">$1</span>, but this functionality requires <span class=\"message-positive\">$2</span>." "message": "<span class=\"message-negative\">Changing PID controller disabled - you can change it via the CLI.</span> You have firmware with API version <span class=\"message-negative\">$1</span>, but this functionality requires <span class=\"message-positive\">$2</span>."
}, },
"pidTuningSubTabPid": { "pidTuningSubTabPid": {
"message": "PID Settings" "message": "PID Profile Settings"
},
"pidTuningSubTabRates": {
"message": "Rateprofile Settings"
}, },
"pidTuningSubTabFilter": { "pidTuningSubTabFilter": {
"message": "Filter Settings" "message": "Filter Settings"
@ -1467,8 +1470,12 @@
"message": "Profile independent PID Controller Settings" "message": "Profile independent PID Controller Settings"
}, },
"pidTuningAntiGravity": {
"message": "Anti Gravity"
},
"pidTuningAntiGravityMode": { "pidTuningAntiGravityMode": {
"message": "Anti Gravity Mode" "message": "Mode",
"description": "Anti Gravity mode selection parameter"
}, },
"pidTuningAntiGravityModeOptionSmooth": { "pidTuningAntiGravityModeOptionSmooth": {
"message": "Smooth", "message": "Smooth",
@ -1479,30 +1486,22 @@
"description": "One of the modes of anti gravity" "description": "One of the modes of anti gravity"
}, },
"pidTuningAntiGravityGain": { "pidTuningAntiGravityGain": {
"message": "Anti Gravity Gain" "message": "Gain",
"description": "Anti Gravity Gain Parameter"
}, },
"pidTuningAntiGravityThres": { "pidTuningAntiGravityThres": {
"message": "Anti Gravity Threshold" "message": "Threshold",
"description": "Anti Gravity Threshold Parameter"
}, },
"pidTuningDMinHelp": { "pidTuningAntiGravityHelp": {
"message": "D Min provides a way to have a lower level of D in normal flight and a higher level for quick manoeuvres that might cause overshoot, like flips and rolls. It also brings D up during prop wash. The craft will have a dynamic D Term varying from D Min (under normal flight) to the standard D (under fast roll and flips). A value of zero will disable the feature. The Gain determines how strongly D is boosted during quick stick inputs. The Advance speeds up of onset of the boost effect. This can be helpful if you have overshoot with very high rate flips on very responsive quads.", "message": "Anti Gravity boosts the I term when fast throttle changes are detected. Higher gain values provide stability and better attitude hold when you pump the throttle."
"description": "Help message for D Min feature"
}, },
"pidTuningDMin": { "pidTuningDMin": {
"message": "D Min", "message": "D Min",
"description": "Table header of the D Min feature in the PIDs tab" "description": "Table header of the D Min feature in the PIDs tab"
}, },
"pidTuningDMinRoll": { "pidTuningDMinDisabledNote": {
"message": "Roll", "message": "<strong>Note:</strong> D Min feature is disabled and its parameters are hidden. To use D Min please enable it in $t(pidTuningPidSettings.message)."
"description": "Axis to apply D Min feature"
},
"pidTuningDMinPitch": {
"message": "Pitch",
"description": "Axis to apply D Min feature"
},
"pidTuningDMinYaw": {
"message": "Yaw",
"description": "Axis to apply D Min feature"
}, },
"pidTuningDMinGain": { "pidTuningDMinGain": {
"message": "Gain", "message": "Gain",
@ -1510,9 +1509,12 @@
}, },
"pidTuningDMinAdvance": { "pidTuningDMinAdvance": {
"message": "Advance", "message": "Advance",
"description": "Advane of the D Min feature" "description": "Advance of the D Min feature"
},
"pidTuningDMinHelp": {
"message": "D Min provides a way to have a lower level of D in normal flight and a higher level for quick maneuvers that might cause overshoot, like flips and rolls. It also brings D up during prop wash. Gain adjusts how fast D gets up to its maximum value and is based on gyro to determine sharp moves and propwash events. Advance makes D go up earlier by using setpoint instead of gyro to determine sharp moves.",
"description": "D Min feature helpicon message"
}, },
"pidTuningPidSettings": { "pidTuningPidSettings": {
"message": "PID Controller Settings" "message": "PID Controller Settings"
}, },
@ -1654,6 +1656,9 @@
"pidTuningRatesPreview": { "pidTuningRatesPreview": {
"message": "Rates Preview" "message": "Rates Preview"
}, },
"pidTuningRatesTuningHelp": {
"message": "<b>Rates and Expo</b>: Determine your stick feel based on these parameters. Use the graph and live 3D model to find your favourite rate setting."
},
"pidTuningRcExpo": { "pidTuningRcExpo": {
"message": "RC Expo" "message": "RC Expo"
}, },
@ -1663,6 +1668,9 @@
"pidTuningTPABreakPoint": { "pidTuningTPABreakPoint": {
"message": "TPA Breakpoint" "message": "TPA Breakpoint"
}, },
"pidTuningThrottleCurvePreview": {
"message": "Throttle Curve Preview"
},
"pidTuningThrottleLimitType": { "pidTuningThrottleLimitType": {
"message": "Throttle Limit" "message": "Throttle Limit"
}, },
@ -1691,7 +1699,7 @@
"message": "Frequency" "message": "Frequency"
}, },
"pidTuningRatesCurve": { "pidTuningRatesCurve": {
"message": "Rates" "message": "Rates Preview"
}, },
"throttle": { "throttle": {
"message": "Throttle" "message": "Throttle"
@ -3249,7 +3257,8 @@
"message": "Limits the accumulation of I Term when fast movements happen. This helps specially to reduce the bounceback at the end of rolls and other fast movements. You can choose the axes in which this is active, and if the fast movement is detectd using the Gyro or the Setpoint (stick)." "message": "Limits the accumulation of I Term when fast movements happen. This helps specially to reduce the bounceback at the end of rolls and other fast movements. You can choose the axes in which this is active, and if the fast movement is detectd using the Gyro or the Setpoint (stick)."
}, },
"pidTuningItermRelaxAxes": { "pidTuningItermRelaxAxes": {
"message": "Axes:" "message": "Axes",
"description": "Iterm Relax Axes selection"
}, },
"pidTuningItermRelaxAxesOptionRP": { "pidTuningItermRelaxAxesOptionRP": {
"message": "RP" "message": "RP"
@ -3264,7 +3273,8 @@
"message": "RPY (increment only)" "message": "RPY (increment only)"
}, },
"pidTuningItermRelaxType": { "pidTuningItermRelaxType": {
"message": "Type:" "message": "Type",
"description": "Iterm Relax Type selection"
}, },
"pidTuningItermRelaxTypeOptionGyro": { "pidTuningItermRelaxTypeOptionGyro": {
"message": "Gyro" "message": "Gyro"
@ -3273,7 +3283,8 @@
"message": "Setpoint" "message": "Setpoint"
}, },
"pidTuningItermRelaxCutoff": { "pidTuningItermRelaxCutoff": {
"message": "Cutoff:" "message": "Cutoff",
"description": "Cutoff value of the I Term Relax"
}, },
"pidTuningAbsoluteControlGain": { "pidTuningAbsoluteControlGain": {
"message": "Absolute Control" "message": "Absolute Control"
@ -5045,6 +5056,13 @@
"pidTuningRateProfileTip": { "pidTuningRateProfileTip": {
"message": "Up to 3 different rateprofiles per profile can be stored on the flight controller. The rateprofiles include the settings for 'RC Rate', 'Rate', 'RC Expo', 'Throttle', and 'TPA'. Switching between rateprofiles is possible in-flight, by setting up a 3 position switch for 'Rate Profile Selection' on the 'Adjustments' tab." "message": "Up to 3 different rateprofiles per profile can be stored on the flight controller. The rateprofiles include the settings for 'RC Rate', 'Rate', 'RC Expo', 'Throttle', and 'TPA'. Switching between rateprofiles is possible in-flight, by setting up a 3 position switch for 'Rate Profile Selection' on the 'Adjustments' tab."
}, },
"pidTuningRateSetup": {
"message": "Basic/Acro Rates"
},
"pidTuningRateSetupHelp": {
"message": "Adjust these values to set your rates. Use RC Rate to increase maximum rate overall, use Super Rate to have higher rates at the end of the stick travel, use RC Expo to make the middle stick feel smooth.",
"description": "Rate table helpicon message"
},
"pidTuningDelta": { "pidTuningDelta": {
"message": "Derivative Method" "message": "Derivative Method"
}, },
@ -5064,10 +5082,13 @@
"message": "<b>Gyro Soft Filter:</b> Lowpass filter for gyro. Use lower value for more filtering.<br><b>D Term Filter:</b> Lowpass filter for Dterm. Can affect D tuning. Use lower value for more filtering. <br><b>Yaw Filter:</b> Filters yaw output. It can help on setups with noisy yaw axis." "message": "<b>Gyro Soft Filter:</b> Lowpass filter for gyro. Use lower value for more filtering.<br><b>D Term Filter:</b> Lowpass filter for Dterm. Can affect D tuning. Use lower value for more filtering. <br><b>Yaw Filter:</b> Filters yaw output. It can help on setups with noisy yaw axis."
}, },
"pidTuningPidTuningTip": { "pidTuningPidTuningTip": {
"message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Rates and Expo</b>: Determine your stick feel based on these parameters. Use the graph and live 3D model to find your favourite rate setting" "message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise."
}, },
"pidTuningPidTuningTipFeedforward": { "pidTuningPidTuningTipFeedforward": {
"message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Feedforward:</b> Usually the PID controller reacts to the error. The Feedforward anticipates the error based on the stick input, giving responsiveness to the quad.<br><b>Rates and Expo</b>: Determine your stick feel based on these parameters. Use the graph and live 3D model to find your favourite rate setting" "message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Feedforward:</b> Usually the PID controller reacts to the error. The Feedforward anticipates the error based on the stick input, giving responsiveness to the quad."
},
"pidTuningPidTuningTipDMin": {
"message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Feedforward:</b> Usually the PID controller reacts to the error. The Feedforward anticipates the error based on the stick input, giving responsiveness to the quad.<br><b>D Min:</b> D Min provides a way to have a lower level of D in normal flight and a higher level for quick maneuvers that might cause overshoot, like flips and rolls. It also brings D up during prop wash. A value of zero will disable the feature."
}, },
"pidTuningRatesTip": { "pidTuningRatesTip": {
"message": "Play with the rates and see how those affect the stick curve" "message": "Play with the rates and see how those affect the stick curve"

View File

@ -19,7 +19,7 @@
} }
.tab-pid_tuning .cf tr { .tab-pid_tuning .cf tr {
background-color: #393b3a; background-color: #414443;
} }
.tab-pid_tuning .cf th { .tab-pid_tuning .cf th {
@ -40,26 +40,20 @@
color: white; color: white;
} }
.tab-pid_tuning .throttle_curve {
border: 1px solid #9c9c9c;
}
.tab-pid_tuning .throttle table th { .tab-pid_tuning .throttle table th {
border-right: 1px solid #9c9c9c; border-right: 1px solid #9c9c9c;
} }
.tab-pid_tuning .throttle table td { .tab-pid_tuning .throttle table td {
background: #414443;
border-right: 1px solid #9c9c9c; border-right: 1px solid #9c9c9c;
} }
.tab-pid_tuning .throttle table td { .tab-pid_tuning .throttle table td {
background: #414443;
border-right: 1px solid #9c9c9c; border-right: 1px solid #9c9c9c;
} }
.tab-pid_tuning .throttle table tr:nth-child(odd) { .tab-pid_tuning .throttle table tr:nth-child(odd) {
background-color: #393b3a; background-color: #414443;
} }
.tab-pid_tuning .throttle table input { .tab-pid_tuning .throttle table input {
@ -68,14 +62,6 @@
color: white; color: white;
} }
.tab-pid_tuning .rc_curve th {
border-bottom: 1px solid #00000000;
}
.tab-pid_tuning .rate_curve {
border: 1px solid #9c9c9c;
}
.tab-pid_tuning table, .tab-pid_tuning table td { .tab-pid_tuning table, .tab-pid_tuning table td {
border-bottom: 0px solid #9c9c9c; border-bottom: 0px solid #9c9c9c;
} }
@ -104,12 +90,13 @@
} }
.tab-pid_tuning table input,.inputBackground { .tab-pid_tuning table input,.inputBackground {
border: 0px solid #9c9c9c; border: 1px solid #9c9c9c;
background-color: #3a3a3a; background-color: #3a3a3a;
color: white; color: white;
} }
.tab-pid_tuning table select { .tab-pid_tuning table select {
border: 1px solid #9c9c9c;
text-align-last: right; text-align-last: right;
background-color: #3a3a3a; background-color: #3a3a3a;
color: white; color: white;
@ -161,8 +148,8 @@
.pid_mode { .pid_mode {
background-color: #1f1f1f; background-color: #3c3c3c;
border-bottom: 1px solid #1f1f1f; border-bottom: 1px solid #3c3c3c;
color: white; color: white;
} }
@ -211,22 +198,10 @@
border: 1px solid #9c9c9c; border: 1px solid #9c9c9c;
} }
.tab-pid_tuning .rates_preview {
border: 1px solid #9c9c9c;
}
.tab-pid_tuning .pidTuning tr { .tab-pid_tuning .pidTuning tr {
border-bottom: 1px solid #9c9c9c; border-bottom: 1px solid #9c9c9c;
} }
.tab-pid_tuning .rc_curve .cf tr {
border-bottom: 1px solid #9c9c9c;
}
.tab-pid_tuning .rc_curve_bg {
background: #393b3a;
}
.tabarea { .tabarea {
border: 1px solid #9c9c9c; border: 1px solid #9c9c9c;
border-top: 0px solid #9c9c9c; border-top: 0px solid #9c9c9c;
@ -245,3 +220,15 @@
.tab-pid_tuning dialog select { .tab-pid_tuning dialog select {
border: 1px solid #9c9c9c; border: 1px solid #9c9c9c;
} }
.tab-pid_tuning input:disabled,
.tab-pid_tuning .cf input:disabled,
.tab-pid_tuning select:disabled,
.tab-pid_tuning .cf select:disabled {
color: rgb(105, 105, 105);
background-color: #2d2d2d;
}
.tab-pid_tuning table.compensation tr {
border-bottom: 1px solid #6b6b6b;
}

View File

@ -1,21 +1,3 @@
.tab-pid_tuning .tpa th {
background-color: #828885;
padding: 4px;
border-bottom: 1px solid #ccc;
font-weight: bold;
color: white;
text-align: left;
}
.tab-pid_tuning .throttle_limit th {
background-color: #828885;
padding: 4px;
border-bottom: 1px solid #ccc;
font-weight: bold;
color: white;
text-align: left;
}
.tab-pid_tuning .cf tr { .tab-pid_tuning .cf tr {
background-color: #DEDEDE; background-color: #DEDEDE;
} }
@ -24,10 +6,19 @@
border-right: solid 1px silver; border-right: solid 1px silver;
height: 19px; height: 19px;
font-weight: normal; font-weight: normal;
padding: 4px;
color:white;
text-align: left;
background: var(--quietHeader);
}
.tab-pid_tuning .cf th:first-child {
border-top-left-radius: 3px;
} }
.tab-pid_tuning .cf th:last-child { .tab-pid_tuning .cf th:last-child {
border-right: 0px; border-right: 0px;
border-top-right-radius: 3px;
} }
.tab-pid_tuning .cf td:first-child { .tab-pid_tuning .cf td:first-child {
@ -53,153 +44,24 @@
border: 1px solid silver; border: 1px solid silver;
} }
.tab-pid_tuning .throttle_curve {
float: right;
width: 100%;
background-image: var(--paper);
background-size: 200%;
background-position: center;
height: 164px;
}
.tab-pid_tuning .curves { .tab-pid_tuning .curves {
float: left; float: left;
margin-right: 10px; margin-right: 10px;
} }
.tab-pid_tuning .throttle_curve {
float: right;
width: calc(100% - 2px); /* - ( "virtual" margin) */
margin: 0 2px 0px 0;
border: 1px solid silver;
border-radius: 3px;
background-image: var(--paper);
background-size: 200%;
background-position: center;
}
.tab-pid_tuning .throttle {
float: right;
width: 45%;
}
.tab-pid_tuning .throttle table {
border-collapse: collapse;
width: calc(100% - 2px);
}
.tab-pid_tuning .throttle table, .tab-pid_tuning .throttle table th, .tab-pid_tuning .throttle table td {
padding: 4px;
text-align: left;
padding-left: 6px;
}
.tab-pid_tuning .throttle table th {
background: var(--quietHeader);
color: var(--quietText);
border-right: 1px solid silver;
font-weight: normal;
}
.tab-pid_tuning .throttle table th:first-child {
border-top-left-radius: 3px;
}
.tab-pid_tuning .throttle table th:last-child {
border-top-right-radius: 3px;
border-right: 0px;
}
.tab-pid_tuning .throttle table td {
background: #DEDEDE;
border-right: 1px solid silver;
padding: 1px;
}
.tab-pid_tuning .throttle table td:first-child {
border-bottom-left-radius: 3px;
}
.tab-pid_tuning .throttle table td:last-child {
border-bottom-right-radius: 3px;
border-right: 0px;
}
.tab-pid_tuning .throttle {
float: right;
width: 45%;
}
.tab-pid_tuning .throttle table {
border-collapse: collapse;
width: calc(100% - 2px);
}
.tab-pid_tuning .throttle table, .tab-pid_tuning .throttle table th, .tab-pid_tuning .throttle table td {
padding: 4px;
text-align: left;
padding-left: 6px;
}
.tab-pid_tuning .throttle table tr:nth-child(odd) {
background-color: #ececec;
}
.tab-pid_tuning .throttle table input {
width: calc(100% - 8px);
border: 1px solid silver;
border-radius: 3px;
height: 20px;
margin: 3px;
line-height: 20px;
text-align: right;
}
.tab-pid_tuning .tpa th:nth-child(2) {
border-top-left-radius: 3px;
}
.tab-pid_tuning .tpa th:first-child {
border-top-left-radius: 3px;
}
.tab-pid_tuning .tpa th:last-child {
border-top-right-radius: 3px;
}
.tab-pid_tuning .throttle_limit th:nth-child(2) {
border-top-left-radius: 3px;
}
.tab-pid_tuning .throttle_limit th:first-child {
border-top-left-radius: 3px;
}
.tab-pid_tuning .throttle_limit th:last-child {
border-top-right-radius: 3px;
}
.tab-pid_tuning .rc_curve {
float: right;
width: calc(100% - 2px); /* - ( "virtual" margin) */
}
.tab-pid_tuning .rc_curve th {
background-color: var(--quietHeader);
padding: 4px;
border-left: 0px solid #ccc;
border-bottom: 1px solid #ccc;
font-weight: bold;
color: var(--quietText);
text-align: left;
}
.tab-pid_tuning .rc_curve th:first-child {
border-top-left-radius: 3px;
}
.tab-pid_tuning .rc_curve th:last-child {
border-top-right-radius: 3px;
}
.tab-pid_tuning .rate_curve { .tab-pid_tuning .rate_curve {
margin: 0 4px 0px 0;
height: 100%; height: 100%;
min-height: 250px; min-height: 234px;
min-width: 200px; min-width: 200px;
border: 1px solid silver;
border-radius: 3px;
background-image: var(--paper); background-image: var(--paper);
background-size: 200%; background-size: 200%;
background-position: center; background-position: center;
@ -218,7 +80,12 @@
} }
.tab-pid_tuning .gui_box { .tab-pid_tuning .gui_box {
margin-bottom: 0px; margin-bottom: 5px;
display: table;
}
.tab-pid_tuning .subtab-filter .gui_box {
float: none;
} }
.tab-pid_tuning table .inputBackground { .tab-pid_tuning table .inputBackground {
@ -247,10 +114,12 @@
.tab-pid_tuning .pid_titlebar th:first-child { .tab-pid_tuning .pid_titlebar th:first-child {
text-align: left; text-align: left;
border-top-left-radius: 3px;
} }
.tab-pid_tuning .pid_titlebar th:last-child { .tab-pid_tuning .pid_titlebar th:last-child {
border-right: none; border-right: none;
border-top-right-radius: 3px;
} }
.tab-pid_tuning table tr td:first-child { .tab-pid_tuning table tr td:first-child {
@ -279,40 +148,57 @@
} }
.tab-pid_tuning table.compensation tr { .tab-pid_tuning table.compensation tr {
height: 25px; height: 30px;
border-bottom: 1px solid #ccc;
}
.tab-pid_tuning table.compensation tr:last-child {
border-bottom: none;
} }
.tab-pid_tuning table.compensation td { .tab-pid_tuning table.compensation td {
width: 60%;
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
.tab-pid_tuning table.compensation td:first-child { .tab-pid_tuning table.compensation td:first-child {
width: 10%; width: 65px;
text-align: right; text-align: center;
vertical-align: top;
padding-top: 4px;
} }
.tab-pid_tuning table.compensation td:last-child { .tab-pid_tuning table.compensation td:last-child {
width: 30%; width: 100%;
}
.tab-pid_tuning table.compensation .helpicon {
margin-top: 3px
} }
.tab-pid_tuning table.compensation .suboption { .tab-pid_tuning table.compensation .suboption {
margin-left: 4%; margin-left: 2%;
white-space: nowrap; display: flex;
flex-flow: row wrap-reverse;
align-items: center;
padding-bottom: 2px;
} }
.tab-pid_tuning table.compensation .suboption select{ .tab-pid_tuning table.compensation .suboption select {
text-align-last: left; width: 80px;
text-align-last: right;
font-size: 1.1em; font-size: 1.1em;
color: darkslategrey; color: darkslategrey;
padding-left: 5px; box-sizing: border-box;
} }
.tab-pid_tuning table.compensation .suboption input{ .tab-pid_tuning table.compensation .suboption input {
display: inline-block; width: 80px;
width: 45px; box-sizing: border-box;
padding-left: 5px; }
.tab-pid_tuning table.compensation .suboption label {
margin-left: 5px;
} }
.tab-pid_tuning .pidTuningFeatures td { .tab-pid_tuning .pidTuningFeatures td {
@ -362,18 +248,21 @@
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
text-align: right; text-align: right;
border: 0px solid #ccc; border: 1px solid #ccc;
border-radius: 0px; border-radius: 3px;
} }
.tab-pid_tuning .subtab-filter table input { .tab-pid_tuning .subtab-filter table input,
.tab-pid_tuning .subtab-filter table select {
width: 77px; width: 77px;
float: right; float: right;
box-sizing: border-box;
} }
.tab-pid_tuning table select { .tab-pid_tuning table select {
width: 77px;
text-align-last: right; text-align-last: right;
border-radius: 3px;
border: 1px solid #ccc;
} }
.tab-pid_tuning .tab_container { .tab-pid_tuning .tab_container {
@ -393,12 +282,10 @@
.tab-pid_tuning .tab_container td:first-child { .tab-pid_tuning .tab_container td:first-child {
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px;
} }
.tab-pid_tuning .tab_container td:last-child { .tab-pid_tuning .tab_container td:last-child {
border-top-right-radius: 5px; border-top-right-radius: 5px;
border-top-left-radius: 5px;
background-color: #2e2e2e; background-color: #2e2e2e;
} }
@ -441,17 +328,7 @@
} }
.tab-pid_tuning .new_rates { .tab-pid_tuning .new_rates {
text-align: left; text-align: center;
}
.tab-pid_tuning .tpa {
float: right;
width: calc(100% - 2px); /* - ( "virtual" margin) */
}
.tab-pid_tuning .throttle_limit {
float: right;
width: calc(100% - 2px); /* - ( "virtual" margin) */
} }
.tab-pid_tuning .top-buttons { .tab-pid_tuning .top-buttons {
@ -507,6 +384,10 @@
float: left; float: left;
} }
.tab-pid_tuning .pid_mode .helpicon {
margin-top: 0px;
}
.tab-pid_tuning .pid_titlebar { .tab-pid_tuning .pid_titlebar {
color: #fff; color: #fff;
background-color: var(--quietHeader); background-color: var(--quietHeader);
@ -515,6 +396,14 @@
height: 20px; height: 20px;
} }
.tab-pid_tuning .pid_titlebar.needed_by_LEVEL {
border-radius: 0px;
}
.tab-pid_tuning .cf .throttleCurvePreview {
padding: 0px;
}
.pid_roll { .pid_roll {
background-color: #FF8080; background-color: #FF8080;
} }
@ -562,7 +451,7 @@
} }
.tab-pid_tuning .spacer_left { .tab-pid_tuning .spacer_left {
padding-left: 15px; padding-left: 0px;
float: right; float: right;
width: calc(100% - 20px) width: calc(100% - 20px)
} }
@ -637,10 +526,6 @@
padding-left: 0px; padding-left: 0px;
} }
.tab-pid_tuning .tpa-breakpoint {
border-top-left-radius: 0px;
}
.tab-pid_tuning .roll { .tab-pid_tuning .roll {
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
@ -661,7 +546,7 @@
} }
.tab-pid_tuning .topspacer { .tab-pid_tuning .topspacer {
margin-top:15px; margin-top: 5px;
} }
.tab-pid_tuning .bottomarea { .tab-pid_tuning .bottomarea {
@ -675,6 +560,7 @@
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
background-color: #f9f9f9; background-color: #f9f9f9;
height: 20px;
} }
.tab-pid_tuning .profile { .tab-pid_tuning .profile {
@ -731,7 +617,7 @@
.tab-pid_tuning .rates_preview_cell { .tab-pid_tuning .rates_preview_cell {
position: relative; position: relative;
width: 100%; width: 100%;
height: 320px; height: 362px;
} }
.tab-pid_tuning .rates_preview { .tab-pid_tuning .rates_preview {
@ -743,10 +629,6 @@
background-image: var(--paper); background-image: var(--paper);
background-size: 100%; background-size: 100%;
background-position: center; background-position: center;
border: 1px solid silver;
margin-top: -1px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
} }
.tab-pid_tuning .pidTuning td { .tab-pid_tuning .pidTuning td {
@ -770,7 +652,7 @@
} }
.tab-pid_tuning .pidTuning td { .tab-pid_tuning .pidTuning td {
width: 40%; width: 40%;
} }
.tab-pid_tuning .new_rates td:first-child { .tab-pid_tuning .new_rates td:first-child {
@ -782,23 +664,13 @@ width: 40%;
border-bottom-right-radius: 0px; border-bottom-right-radius: 0px;
} }
.tab-pid_tuning .rc_curve .cf tr {
border-bottom: 1px solid silver;
}
.tab-pid_tuning .rc_curve .cf tr td { .tab-pid_tuning .rc_curve .cf tr td {
border: none; padding: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
padding-bottom: 3px;
} }
.tab-pid_tuning .rc_curve_bg { .tab-pid_tuning .rc_curve_bg {
float: left; float: left;
background: #ddd; }
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
.tab-pid_tuning .new_rates_last-child { .tab-pid_tuning .new_rates_last-child {
border-bottom: none; border-bottom: none;
@ -906,3 +778,53 @@ width: 40%;
margin-left: 5px; margin-left: 5px;
width: 120px; width: 120px;
} }
.tab-pid_tuning .subtab-rates {
display: flex;
flex-flow: row wrap;
align-items: flex-start;
justify-content: center;
}
.tab-pid_tuning .subtab-rates .cf_column {
min-width: 380px;
flex: 1;
}
.tab-pid_tuning .subtab-pid {
display: flex;
flex-flow: row wrap;
align-items: flex-start;
justify-content: center;
}
.tab-pid_tuning .subtab-pid .cf_column {
min-width: 470px;
flex: 1;
}
.tab-pid_tuning .subtab-pid .note {
flex: 0 0 100%;
}
.tab-pid_tuning table.filterTable {
table-layout: auto;
}
.tab-pid_tuning table.filterTable td:first-child {
width: 25%;
}
@media only screen and (max-width: 1205px) {
.tab-pid_tuning .subtab-pid .spacer_left {
width: 100%;
}
}
@media only screen and (max-width: 1405px) {
.tab-pid_tuning .subtab-rates .ratePreview.spacer_left {
width: 100%;
}
}

View File

@ -125,21 +125,15 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_filter input[name="dTermNotchCutoff"]').val(FILTER_CONFIG.dterm_notch_cutoff); $('.pid_filter input[name="dTermNotchCutoff"]').val(FILTER_CONFIG.dterm_notch_cutoff);
var dtermSetpointTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]'); var dtermSetpointTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]');
var dtermSetpointTransitionRangeElement = $('input[name="dtermSetpointTransition-range"]');
if (semver.gte(CONFIG.apiVersion, "1.38.0")) { if (semver.gte(CONFIG.apiVersion, "1.38.0")) {
dtermSetpointTransitionNumberElement.attr('min', 0.00); dtermSetpointTransitionNumberElement.attr('min', 0.00);
dtermSetpointTransitionRangeElement.attr('min', 0.00);
} else { } else {
dtermSetpointTransitionNumberElement.attr('min', 0.01); dtermSetpointTransitionNumberElement.attr('min', 0.01);
dtermSetpointTransitionRangeElement.attr('min', 0.01);
} }
dtermSetpointTransitionNumberElement.val(ADVANCED_TUNING.dtermSetpointTransition / 100); dtermSetpointTransitionNumberElement.val(ADVANCED_TUNING.dtermSetpointTransition / 100);
dtermSetpointTransitionRangeElement.val(ADVANCED_TUNING.dtermSetpointTransition / 100);
$('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100); $('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
$('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100)
.trigger('input'); // trigger adjustRangeElement()
} else { } else {
$('.pid_filter .newFilter').hide(); $('.pid_filter .newFilter').hide();
} }
@ -162,6 +156,34 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_filter select[name="dtermLowpassType"]').val(FILTER_CONFIG.dterm_lowpass_type); $('.pid_filter select[name="dtermLowpassType"]').val(FILTER_CONFIG.dterm_lowpass_type);
$('.antigravity input[name="itermThrottleThreshold"]').val(ADVANCED_TUNING.itermThrottleThreshold); $('.antigravity input[name="itermThrottleThreshold"]').val(ADVANCED_TUNING.itermThrottleThreshold);
$('.antigravity input[name="itermAcceleratorGain"]').val(ADVANCED_TUNING.itermAcceleratorGain / 1000); $('.antigravity input[name="itermAcceleratorGain"]').val(ADVANCED_TUNING.itermAcceleratorGain / 1000);
if (FEATURE_CONFIG.features.isEnabled('ANTI_GRAVITY')) {
$('.antigravity').show();
} else {
$('.antigravity').hide();
}
var antiGravitySwitch = $('#antiGravitySwitch');
antiGravitySwitch.prop('checked', ADVANCED_TUNING.itermAcceleratorGain !== 1000);
antiGravitySwitch.change(function() {
var checked = $(this).is(':checked');
if (checked) {
$('.antigravity input[name="itermAcceleratorGain"]').val(Math.max(ADVANCED_TUNING.itermAcceleratorGain / 1000, 1.1));
$('.antigravity .suboption').show();
if (ADVANCED_TUNING.antiGravityMode == 0) {
$('.antigravity .antiGravityThres').hide();
}
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
$('.antigravity .antiGravityMode').show();
} else {
$('.antigravity .antiGravityMode').hide();
}
} else {
$('.antigravity select[id="antiGravityMode"]').val(0);
$('.antigravity input[name="itermAcceleratorGain"]').val(1);
$('.antigravity .suboption').hide();
}
});
antiGravitySwitch.change();
} else { } else {
$('.dtermLowpassType').hide(); $('.dtermLowpassType').hide();
$('.antigravity').hide(); $('.antigravity').hide();
@ -182,11 +204,13 @@ TABS.pid_tuning.initialize = function (callback) {
// We load it again because the limits are now bigger than in 1.16.0 // We load it again because the limits are now bigger than in 1.16.0
$('.pid_filter input[name="gyroLowpassFrequency"]').attr("max","16000"); $('.pid_filter input[name="gyroLowpassFrequency"]').attr("max","16000");
$('.pid_filter input[name="gyroLowpassFrequency"]').val(FILTER_CONFIG.gyro_lowpass_hz); $('.pid_filter input[name="gyroLowpassFrequency"]').val(FILTER_CONFIG.gyro_lowpass_hz);
//removes 5th column which is Feedforward
$('#pid_main .pid_titlebar2 th').attr('colspan', 4);
} else { } else {
$('.gyroLowpass2').hide(); $('.gyroLowpass2').hide();
$('.gyroLowpass2Type').hide(); $('.gyroLowpass2Type').hide();
$('.dtermLowpass2').hide(); $('.dtermLowpass2').hide();
$('#pid_main .pid_titlebar2 th').attr('colspan', 4);
} }
if (semver.gte(CONFIG.apiVersion, "1.40.0")) { if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
@ -210,6 +234,11 @@ TABS.pid_tuning.initialize = function (callback) {
if (checked) { if (checked) {
$('.itermrelax .suboption').show(); $('.itermrelax .suboption').show();
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
$('.itermRelaxCutoff').show();
} else {
$('.itermRelaxCutoff').hide();
}
} else { } else {
$('.itermrelax .suboption').hide(); $('.itermrelax .suboption').hide();
} }
@ -218,41 +247,14 @@ TABS.pid_tuning.initialize = function (callback) {
// Absolute Control // Absolute Control
var absoluteControlGainNumberElement = $('input[name="absoluteControlGain-number"]'); var absoluteControlGainNumberElement = $('input[name="absoluteControlGain-number"]');
var absoluteControlGainRangeElement = $('input[name="absoluteControlGain-range"]');
//Use 'input' event for coupled controls to allow synchronized update
absoluteControlGainNumberElement.on('input', function () {
absoluteControlGainRangeElement.val($(this).val());
});
absoluteControlGainRangeElement.on('input', function () {
absoluteControlGainNumberElement.val($(this).val());
});
absoluteControlGainNumberElement.val(ADVANCED_TUNING.absoluteControlGain).trigger('input'); absoluteControlGainNumberElement.val(ADVANCED_TUNING.absoluteControlGain).trigger('input');
// Throttle Boost // Throttle Boost
var throttleBoostNumberElement = $('input[name="throttleBoost-number"]'); var throttleBoostNumberElement = $('input[name="throttleBoost-number"]');
var throttleBoostRangeElement = $('input[name="throttleBoost-range"]');
//Use 'input' event for coupled controls to allow synchronized update
throttleBoostNumberElement.on('input', function () {
throttleBoostRangeElement.val($(this).val());
});
throttleBoostRangeElement.on('input', function () {
throttleBoostNumberElement.val($(this).val());
});
throttleBoostNumberElement.val(ADVANCED_TUNING.throttleBoost).trigger('input'); throttleBoostNumberElement.val(ADVANCED_TUNING.throttleBoost).trigger('input');
// Acro Trainer // Acro Trainer
var acroTrainerAngleLimitNumberElement = $('input[name="acroTrainerAngleLimit-number"]'); var acroTrainerAngleLimitNumberElement = $('input[name="acroTrainerAngleLimit-number"]');
var acroTrainerAngleLimitRangeElement = $('input[name="acroTrainerAngleLimit-range"]');
//Use 'input' event for coupled controls to allow synchronized update
acroTrainerAngleLimitNumberElement.on('input', function () {
acroTrainerAngleLimitRangeElement.val($(this).val());
});
acroTrainerAngleLimitRangeElement.on('input', function () {
acroTrainerAngleLimitNumberElement.val($(this).val());
});
acroTrainerAngleLimitNumberElement.val(ADVANCED_TUNING.acroTrainerAngleLimit).trigger('input'); acroTrainerAngleLimitNumberElement.val(ADVANCED_TUNING.acroTrainerAngleLimit).trigger('input');
// Yaw D // Yaw D
@ -262,20 +264,10 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_tuning .ROLL input[name="f"]').val(ADVANCED_TUNING.feedforwardRoll); $('.pid_tuning .ROLL input[name="f"]').val(ADVANCED_TUNING.feedforwardRoll);
$('.pid_tuning .PITCH input[name="f"]').val(ADVANCED_TUNING.feedforwardPitch); $('.pid_tuning .PITCH input[name="f"]').val(ADVANCED_TUNING.feedforwardPitch);
$('.pid_tuning .YAW input[name="f"]').val(ADVANCED_TUNING.feedforwardYaw); $('.pid_tuning .YAW input[name="f"]').val(ADVANCED_TUNING.feedforwardYaw);
$('#pid_main .pid_titlebar2 th').attr('colspan', 5);
var feedforwardTransitionNumberElement = $('input[name="feedforwardTransition-number"]'); var feedforwardTransitionNumberElement = $('input[name="feedforwardTransition-number"]');
var feedforwardTransitionRangeElement = $('input[name="feedforwardTransition-range"]');
feedforwardTransitionNumberElement.val(ADVANCED_TUNING.feedforwardTransition / 100); feedforwardTransitionNumberElement.val(ADVANCED_TUNING.feedforwardTransition / 100);
feedforwardTransitionRangeElement.val(ADVANCED_TUNING.feedforwardTransition / 100);
//Use 'input' event for coupled controls to allow synchronized update
feedforwardTransitionNumberElement.on('input', function () {
feedforwardTransitionRangeElement.val($(this).val());
});
feedforwardTransitionRangeElement.on('input', function () {
feedforwardTransitionNumberElement.val($(this).val());
});
$('.helpicon[i18n_title="pidTuningPidTuningTip"]').hide(); $('.helpicon[i18n_title="pidTuningPidTuningTip"]').hide();
@ -284,13 +276,11 @@ TABS.pid_tuning.initialize = function (callback) {
antiGravityModeSelect.change(function () { antiGravityModeSelect.change(function () {
var antiGravityModeValue = $('.antigravity select[id="antiGravityMode"]').val(); var antiGravityModeValue = $('.antigravity select[id="antiGravityMode"]').val();
// Smooth // Smooth removes threshold
if (antiGravityModeValue == 0) { if (antiGravityModeValue == 0) {
$('.antigravity table th:nth-child(3)').hide(); $('.antiGravityThres').hide();
$('.antigravity table td:nth-child(3)').hide();
} else { } else {
$('.antigravity table th:nth-child(3)').show(); $('.antiGravityThres').show();
$('.antigravity table td:nth-child(3)').show();
} }
}); });
@ -307,14 +297,10 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_tuning .YAW input[name="d"]').hide(); $('.pid_tuning .YAW input[name="d"]').hide();
// Feedforward column // Feedforward column
$('#pid_main tr :nth-child(5)').hide(); $('#pid_main tr :nth-child(6)').hide();
$('#pid_main .pid_titlebar2 th').attr("colspan", 8);
$('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').hide(); $('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').hide();
$('#pid-tuning .feedforwardTransition').hide(); $('#pid-tuning .feedforwardTransition').hide();
$('.antigravity table th:first-child').hide();
$('.antigravity table td:first-child').hide();
} }
if (semver.gte(CONFIG.apiVersion, "1.41.0")) { if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
@ -329,14 +315,15 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_filter input[name="dtermLowpassDynMaxFrequency"]').val(FILTER_CONFIG.dterm_lowpass_dyn_max_hz); $('.pid_filter input[name="dtermLowpassDynMaxFrequency"]').val(FILTER_CONFIG.dterm_lowpass_dyn_max_hz);
$('.pid_filter select[name="dtermLowpassDynType"]').val(FILTER_CONFIG.dterm_lowpass_type); $('.pid_filter select[name="dtermLowpassDynType"]').val(FILTER_CONFIG.dterm_lowpass_type);
$('.dminGroup input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll); $('.pid_tuning input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll);
$('.dminGroup input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch); $('.pid_tuning input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch);
$('.dminGroup input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw); $('.pid_tuning input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw);
$('.dminGroup input[name="dMinGain"]').val(ADVANCED_TUNING.dMinGain); $('.dminGroup input[name="dMinGain"]').val(ADVANCED_TUNING.dMinGain);
$('.dminGroup input[name="dMinAdvance"]').val(ADVANCED_TUNING.dMinAdvance); $('.dminGroup input[name="dMinAdvance"]').val(ADVANCED_TUNING.dMinAdvance);
$('input[id="useIntegratedYaw"]').prop('checked', ADVANCED_TUNING.useIntegratedYaw !== 0); $('input[id="useIntegratedYaw"]').prop('checked', ADVANCED_TUNING.useIntegratedYaw !== 0);
//dmin column
$('#pid_main .pid_titlebar2 th').attr('colspan', 6);
} else { } else {
$('.throttle_limit').hide(); $('.throttle_limit').hide();
@ -345,6 +332,9 @@ TABS.pid_tuning.initialize = function (callback) {
$('.dtermLowpass2TypeGroup').hide(); $('.dtermLowpass2TypeGroup').hide();
$('.dminGroup').hide(); $('.dminGroup').hide();
$('.dMinDisabledNote').hide();
//dmin column
$('#pid_main tr :nth-child(5)').hide();
$('.integratedYaw').hide(); $('.integratedYaw').hide();
} }
@ -357,14 +347,16 @@ TABS.pid_tuning.initialize = function (callback) {
} else { } else {
$('.dynamicNotch').hide(); $('.dynamicNotch').hide();
} }
$('.pid_filter select[name="dynamicNotchRange"]').val(FILTER_CONFIG.dyn_notch_range); $('.pid_filter select[name="dynamicNotchRange"]').val(FILTER_CONFIG.dyn_notch_range);
$('.pid_filter input[name="dynamicNotchWidthPercent"]').val(FILTER_CONFIG.dyn_notch_width_percent); $('.pid_filter input[name="dynamicNotchWidthPercent"]').val(FILTER_CONFIG.dyn_notch_width_percent);
$('.pid_filter input[name="dynamicNotchQ"]').val(FILTER_CONFIG.dyn_notch_q); $('.pid_filter input[name="dynamicNotchQ"]').val(FILTER_CONFIG.dyn_notch_q);
$('.pid_filter input[name="dynamicNotchMinHz"]').val(FILTER_CONFIG.dyn_notch_min_hz); $('.pid_filter input[name="dynamicNotchMinHz"]').val(FILTER_CONFIG.dyn_notch_min_hz);
$('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').hide();
} else { } else {
$('.itermRelaxCutoff').hide(); $('.itermRelaxCutoff').hide();
$('.dynamicNotch').hide(); $('.dynamicNotch').hide();
$('.helpicon[i18n_title="pidTuningPidTuningTipDMin"]').hide();
} }
$('input[id="useIntegratedYaw"]').change(function() { $('input[id="useIntegratedYaw"]').change(function() {
@ -385,20 +377,56 @@ TABS.pid_tuning.initialize = function (callback) {
} }
$('.pid_tuning .ROLL input[name="d"]').change(function() { $('.pid_tuning .ROLL input[name="d"]').change(function() {
var dMinElement= $('.dminGroup input[name="dMinRoll"]'); var dMinElement= $('.pid_tuning input[name="dMinRoll"]');
adjustDMin($(this), dMinElement); adjustDMin($(this), dMinElement);
}).change(); }).change();
$('.pid_tuning .PITCH input[name="d"]').change(function() { $('.pid_tuning .PITCH input[name="d"]').change(function() {
var dMinElement= $('.dminGroup input[name="dMinPitch"]'); var dMinElement= $('.pid_tuning input[name="dMinPitch"]');
adjustDMin($(this), dMinElement); adjustDMin($(this), dMinElement);
}).change(); }).change();
$('.pid_tuning .YAW input[name="d"]').change(function() { $('.pid_tuning .YAW input[name="d"]').change(function() {
var dMinElement= $('.dminGroup input[name="dMinYaw"]'); var dMinElement= $('.pid_tuning input[name="dMinYaw"]');
adjustDMin($(this), dMinElement); adjustDMin($(this), dMinElement);
}).change(); }).change();
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
var dMinSwitch = $('#dMinSwitch');
dMinSwitch.prop('checked', ADVANCED_TUNING.dMinRoll > 0 || ADVANCED_TUNING.dMinPitch > 0 || ADVANCED_TUNING.dMinYaw > 0);
dMinSwitch.change(function() {
var checked = $(this).is(':checked');
if (checked) {
if (ADVANCED_TUNING.dMinRoll == 0 && ADVANCED_TUNING.dMinPitch == 0 && ADVANCED_TUNING.dMinYaw == 0) {
$('.pid_tuning input[name="dMinRoll"]').val(Math.round(PIDs[0][2] * 0.57));
$('.pid_tuning input[name="dMinPitch"]').val(Math.round(PIDs[1][2] * 0.57));
$('.pid_tuning input[name="dMinYaw"]').val(Math.round(PIDs[2][2] * 0.57));
} else {
$('.pid_tuning input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll);
$('.pid_tuning input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch);
$('.pid_tuning input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw);
}
$('.dMinDisabledNote').hide();
$('.dminGroup .suboption').show();
$('#pid_main tr :nth-child(5)').show();
$('#pid_main .pid_titlebar2 th').attr('colspan', 6);
$('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').hide();
$('.helpicon[i18n_title="pidTuningPidTuningTipDMin"]').show();
} else {
$('.pid_tuning input[name="dMinRoll"]').val(0);
$('.pid_tuning input[name="dMinPitch"]').val(0);
$('.pid_tuning input[name="dMinYaw"]').val(0);
$('.dminGroup .suboption').hide();
$('.dMinDisabledNote').show();
$('#pid_main tr :nth-child(5)').hide();
$('#pid_main .pid_titlebar2 th').attr('colspan', 5);
$('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').show();
$('.helpicon[i18n_title="pidTuningPidTuningTipDMin"]').hide();
}
});
dMinSwitch.change();
}
$('input[id="gyroNotch1Enabled"]').change(function() { $('input[id="gyroNotch1Enabled"]').change(function() {
var checked = $(this).is(':checked'); var checked = $(this).is(':checked');
var hz = FILTER_CONFIG.gyro_notch_hz > 0 ? FILTER_CONFIG.gyro_notch_hz : FILTER_DEFAULT.gyro_notch_hz; var hz = FILTER_CONFIG.gyro_notch_hz > 0 ? FILTER_CONFIG.gyro_notch_hz : FILTER_DEFAULT.gyro_notch_hz;
@ -652,7 +680,7 @@ TABS.pid_tuning.initialize = function (callback) {
ADVANCED_TUNING.smartFeedforward = $('input[id="smartfeedforward"]').is(':checked') ? 1 : 0; ADVANCED_TUNING.smartFeedforward = $('input[id="smartfeedforward"]').is(':checked') ? 1 : 0;
ADVANCED_TUNING.itermRelax = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxAxes"]').val() : 0; ADVANCED_TUNING.itermRelax = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxAxes"]').val() : 0;
ADVANCED_TUNING.itermRelaxType = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxType"]').val() : 0; ADVANCED_TUNING.itermRelaxType = $('select[id="itermrelaxType"]').val();
ADVANCED_TUNING.itermRelaxCutoff = parseInt($('input[name="itermRelaxCutoff"]').val()); ADVANCED_TUNING.itermRelaxCutoff = parseInt($('input[name="itermRelaxCutoff"]').val());
ADVANCED_TUNING.absoluteControlGain = $('input[name="absoluteControlGain-number"]').val(); ADVANCED_TUNING.absoluteControlGain = $('input[name="absoluteControlGain-number"]').val();
@ -687,9 +715,9 @@ TABS.pid_tuning.initialize = function (callback) {
FILTER_CONFIG.dterm_lowpass_type = $('.pid_filter select[name="dtermLowpassDynType"]').val(); FILTER_CONFIG.dterm_lowpass_type = $('.pid_filter select[name="dtermLowpassDynType"]').val();
} }
ADVANCED_TUNING.dMinRoll = parseInt($('.dminGroup input[name="dMinRoll"]').val()); ADVANCED_TUNING.dMinRoll = parseInt($('.pid_tuning input[name="dMinRoll"]').val());
ADVANCED_TUNING.dMinPitch = parseInt($('.dminGroup input[name="dMinPitch"]').val()); ADVANCED_TUNING.dMinPitch = parseInt($('.pid_tuning input[name="dMinPitch"]').val());
ADVANCED_TUNING.dMinYaw = parseInt($('.dminGroup input[name="dMinYaw"]').val()); ADVANCED_TUNING.dMinYaw = parseInt($('.pid_tuning input[name="dMinYaw"]').val());
ADVANCED_TUNING.dMinGain = parseInt($('.dminGroup input[name="dMinGain"]').val()); ADVANCED_TUNING.dMinGain = parseInt($('.dminGroup input[name="dMinGain"]').val());
ADVANCED_TUNING.dMinAdvance = parseInt($('.dminGroup input[name="dMinAdvance"]').val()); ADVANCED_TUNING.dMinAdvance = parseInt($('.dminGroup input[name="dMinAdvance"]').val());
@ -816,7 +844,6 @@ TABS.pid_tuning.initialize = function (callback) {
if (semver.lt(CONFIG.apiVersion, "1.39.0")) { if (semver.lt(CONFIG.apiVersion, "1.39.0")) {
$('input[name="dtermSetpoint-number"]').attr('max', self.SETPOINT_WEIGHT_RANGE_LEGACY); $('input[name="dtermSetpoint-number"]').attr('max', self.SETPOINT_WEIGHT_RANGE_LEGACY);
$('input[name="dtermSetpoint-range"]').attr('max', self.SETPOINT_WEIGHT_RANGE_LEGACY);
} }
// translate to user-selected language // translate to user-selected language
@ -866,6 +893,16 @@ TABS.pid_tuning.initialize = function (callback) {
$('.tab-pid_tuning .tab_container .pid').on('click', function () { $('.tab-pid_tuning .tab_container .pid').on('click', function () {
$('.tab-pid_tuning .subtab-pid').show(); $('.tab-pid_tuning .subtab-pid').show();
$('.tab-pid_tuning .subtab-rates').hide();
$('.tab-pid_tuning .subtab-filter').hide();
$('.tab-pid_tuning .tab_container td').removeClass('active');
$(this).addClass('active');
});
$('.tab-pid_tuning .tab_container .rates').on('click', function () {
$('.tab-pid_tuning .subtab-rates').show();
$('.tab-pid_tuning .subtab-pid').hide();
$('.tab-pid_tuning .subtab-filter').hide(); $('.tab-pid_tuning .subtab-filter').hide();
$('.tab-pid_tuning .tab_container td').removeClass('active'); $('.tab-pid_tuning .tab_container td').removeClass('active');
@ -875,6 +912,7 @@ TABS.pid_tuning.initialize = function (callback) {
$('.tab-pid_tuning .tab_container .filter').on('click', function () { $('.tab-pid_tuning .tab_container .filter').on('click', function () {
$('.tab-pid_tuning .subtab-filter').show(); $('.tab-pid_tuning .subtab-filter').show();
$('.tab-pid_tuning .subtab-pid').hide(); $('.tab-pid_tuning .subtab-pid').hide();
$('.tab-pid_tuning .subtab-rates').hide();
$('.tab-pid_tuning .tab_container td').removeClass('active'); $('.tab-pid_tuning .tab_container td').removeClass('active');
$(this).addClass('active'); $(this).addClass('active');
@ -998,7 +1036,6 @@ TABS.pid_tuning.initialize = function (callback) {
}); });
var dtermTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]'); var dtermTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]');
var dtermTransitionRangeElement = $('input[name="dtermSetpointTransition-range"]');
var dtermTransitionWarningElement = $('#pid-tuning .dtermSetpointTransitionWarning'); var dtermTransitionWarningElement = $('#pid-tuning .dtermSetpointTransitionWarning');
function checkUpdateDtermTransitionWarning(value) { function checkUpdateDtermTransitionWarning(value) {
@ -1013,36 +1050,8 @@ TABS.pid_tuning.initialize = function (callback) {
//Use 'input' event for coupled controls to allow synchronized update //Use 'input' event for coupled controls to allow synchronized update
dtermTransitionNumberElement.on('input', function () { dtermTransitionNumberElement.on('input', function () {
checkUpdateDtermTransitionWarning($(this).val()); checkUpdateDtermTransitionWarning($(this).val());
dtermTransitionRangeElement.val($(this).val());
});
dtermTransitionRangeElement.on('input', function () {
checkUpdateDtermTransitionWarning($(this).val());
dtermTransitionNumberElement.val($(this).val());
}); });
var dtermNumberElement = $('input[name="dtermSetpoint-number"]');
var dtermRangeElement = $('input[name="dtermSetpoint-range"]');
function adjustRangeElement(value) {
var range = dtermRangeElement.attr('max');
if (value >= self.SETPOINT_WEIGHT_RANGE_LOW && range <= self.SETPOINT_WEIGHT_RANGE_LOW) {
dtermRangeElement.attr('max', self.SETPOINT_WEIGHT_RANGE_HIGH);
} else if (value < self.SETPOINT_WEIGHT_RANGE_LOW && range > self.SETPOINT_WEIGHT_RANGE_LOW) {
dtermRangeElement.attr('max', self.SETPOINT_WEIGHT_RANGE_LOW);
}
}
//Use 'input' event for coupled controls to allow synchronized update
dtermNumberElement.on('input', function () {
var value = $(this).val();
adjustRangeElement(value);
dtermRangeElement.val(value);
});
dtermRangeElement.on('input', function () {
var value = $(this).val();
adjustRangeElement(value);
dtermNumberElement.val(value);
});
} else { } else {
$('.tab-pid_tuning .rate_profile').hide(); $('.tab-pid_tuning .rate_profile').hide();
@ -1477,6 +1486,9 @@ TABS.pid_tuning.initRatesPreview = function () {
this.keepRendering = true; this.keepRendering = true;
this.model = new Model($('.rates_preview'), $('.rates_preview canvas')); this.model = new Model($('.rates_preview'), $('.rates_preview canvas'));
$('.tab-pid_tuning .tab_container .rates').on('click', $.proxy(this.model.resize, this.model));
$('.tab-pid_tuning .tab_container .rates').on('click', $.proxy(this.updateRatesLabels, this));
$(window).on('resize', $.proxy(this.model.resize, this.model)); $(window).on('resize', $.proxy(this.model.resize, this.model));
$(window).on('resize', $.proxy(this.updateRatesLabels, this)); $(window).on('resize', $.proxy(this.updateRatesLabels, this));
}; };

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="cf_column"> <div class="cf_column">
<div class="profile single-field"> <div class="profile single-field">
<div class="helpicon cf_tip" i18n_title="pidTuningProfileTip" style="margin-top: 5px;"></div> <div class="helpicon cf_tip topspacer" i18n_title="pidTuningProfileTip"></div>
<div class="head" i18n="pidTuningProfile"></div> <div class="head" i18n="pidTuningProfile"></div>
<div class="bottomarea"> <div class="bottomarea">
<select name="profile"> <select name="profile">
@ -15,7 +15,7 @@
</div> </div>
</div> </div>
<div class="rate_profile single-field"> <div class="rate_profile single-field">
<div class="helpicon cf_tip" i18n_title="pidTuningRateProfileTip" style="margin-top: 5px;"></div> <div class="helpicon cf_tip topspacer" i18n_title="pidTuningRateProfileTip"></div>
<div class="head" i18n="pidTuningRateProfile"></div> <div class="head" i18n="pidTuningRateProfile"></div>
<div class="bottomarea"> <div class="bottomarea">
<select name="rate_profile"> <select name="rate_profile">
@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div class="controller single-field"> <div class="controller single-field">
<div class="helpicon cf_tip" i18n_title="pidTuningPidControllerTip" style="margin-top: 5px;"></div> <div class="helpicon cf_tip topspacer" i18n_title="pidTuningPidControllerTip"></div>
<div class="head" i18n="pidTuningControllerHead"></div> <div class="head" i18n="pidTuningControllerHead"></div>
<div class="bottomarea"> <div class="bottomarea">
<select name="controller"> <select name="controller">
@ -53,6 +53,9 @@
<td class="pid active"> <td class="pid active">
<a href="#" i18n="pidTuningSubTabPid" /> <a href="#" i18n="pidTuningSubTabPid" />
</td> </td>
<td class="rates">
<a href="#" i18n="pidTuningSubTabRates" />
</td>
<td class="filter"> <td class="filter">
<a href="#" i18n="pidTuningSubTabFilter" /> <a href="#" i18n="pidTuningSubTabFilter" />
</td> </td>
@ -64,26 +67,29 @@
<form name="pid-tuning" id="pid-tuning"> <form name="pid-tuning" id="pid-tuning">
<div class="subtab-pid"> <div class="subtab-pid">
<div class="clear-both"></div> <div class="clear-both"></div>
<div class="cf_column twothird"> <div class="cf_column">
<div class="gui_box grey topspacer" style="margin-top: 0px;"> <div class="note dMinDisabledNote">
<div class="note_spacer">
<p i18n="pidTuningDMinDisabledNote"></p>
</div>
</div>
<div class="gui_box grey">
<table id="pid_main" class="pid_tuning"> <table id="pid_main" class="pid_tuning">
<tr class="pid_titlebar"> <tr class="pid_titlebar">
<th class="name"></th> <th class="name"></th>
<th class="proportional" i18n="pidTuningProportional"></th> <th class="proportional" i18n="pidTuningProportional"></th>
<th class="integral" i18n="pidTuningIntegral"></th> <th class="integral" i18n="pidTuningIntegral"></th>
<th class="derivative" i18n="pidTuningDerivative"></th> <th class="derivative" i18n="pidTuningDerivative"></th>
<th class="dmin" i18n="pidTuningDMin"></th>
<th class="feedforward" i18n="pidTuningFeedforward"></th> <th class="feedforward" i18n="pidTuningFeedforward"></th>
<th class="rc_rate" i18n="pidTuningRcRate"></th>
<th class="rate" i18n="pidTuningRate"></th>
<th class="new_rates maxVel" i18n="pidTuningMaxVel"></th>
<th class="rc_expo" i18n="pidTuningRcExpo"></th>
</tr> </tr>
<tr class="pid_titlebar2"> <tr class="pid_titlebar2">
<th colspan="9"> <th colspan="6">
<div class="pid_mode"> <div class="pid_mode">
<div i18n="pidTuningBasic" style="float:left;"></div> <div i18n="pidTuningBasic" style="float:left;"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningPidTuningTip"></div> <div class="helpicon cf_tip" i18n_title="pidTuningPidTuningTip"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningPidTuningTipFeedforward"></div> <div class="helpicon cf_tip" i18n_title="pidTuningPidTuningTipFeedforward"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningPidTuningTipDMin"></div>
</div> </div>
</th> </th>
</tr> </tr>
@ -93,18 +99,9 @@
<td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="dMinRoll" step="1" min="0" max="100" /></td>
<td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td> <td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td>
<td rowspan="2" class="inputBackground">
<input type="number" name="rc_rate" step="0.01" min="0.01" max="2.55" />
<div class="bracket"></div>
</td>
<td class="roll_rate"><input type="number" name="roll_rate" step="0.01" min="0" max="1.00" /></td>
<td class="roll_pitch_rate" rowspan="2"><input type="number" name="roll_pitch_rate" step="0.01" min="0" max="1.00" /></td>
<td class="new_rates maxAngularVelRoll"></td>
<td rowspan="2" class="inputBackground">
<input type="number" name="rc_expo" step="0.01" min="0" max="1" />
<div class="bracket"></div>
</td>
</tr> </tr>
<tr class="PITCH"> <tr class="PITCH">
<!-- 1 --> <!-- 1 -->
@ -112,11 +109,8 @@
<td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="dMinPitch" step="1" min="0" max="100" /></td>
<td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td> <td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td>
<td><input type="number" name="rc_rate_pitch" step="0.01" min="0.01" max="2.55" /></td>
<td class="pitch_rate"><input type="number" name="pitch_rate" step="0.01" min="0" max="1.00" /></td>
<td class="new_rates maxAngularVelPitch"></td>
<td><input type="number" name="rc_pitch_expo" step="0.01" min="0" max="1" /></td>
</tr> </tr>
<tr class="YAW"> <tr class="YAW">
<!-- 2 --> <!-- 2 -->
@ -124,11 +118,8 @@
<td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="p" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="i" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td> <td class="pid_data"><input type="number" name="d" step="1" min="0" max="200" /></td>
<td class="pid_data"><input type="number" name="dMinYaw" step="1" min="0" max="100" /></td>
<td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td> <td class="pid_data"><input type="number" name="f" step="1" min="0" max="2000" /></td>
<td rowspan="1"><input type="number" name="rc_rate_yaw" step="0.01" min="0.01" max="2.55" /></td>
<td><input type="number" name="yaw_rate" step="0.01" min="0" max="2.55" /></td>
<td class="new_rates maxAngularVelYaw"></td>
<td><input type="number" name="rc_yaw_expo" step="0.01" min="0" max="1" /></td>
</tr> </tr>
<tr class="YAW_JUMP_PREVENTION"> <tr class="YAW_JUMP_PREVENTION">
<td colspan="3"> <td colspan="3">
@ -142,6 +133,8 @@
</tr> </tr>
</table> </table>
</div> </div>
<!-- BARO, MAG, GPS -->
<div id="pid_baro_mag_gps" class="pid_optional needed_by_ALT needed_by_VEL needed_by_MAG needed_by_Pos needed_by_PosR needed_by_NavR gui_box grey topspacer pid_tuning"> <div id="pid_baro_mag_gps" class="pid_optional needed_by_ALT needed_by_VEL needed_by_MAG needed_by_Pos needed_by_PosR needed_by_NavR gui_box grey topspacer pid_tuning">
<table class="pid_titlebar needed_by_ALT needed_by_VEL needed_by_MAG"> <table class="pid_titlebar needed_by_ALT needed_by_VEL needed_by_MAG">
<tr class="needed_by_ALT needed_by_VEL needed_by_MAG"> <tr class="needed_by_ALT needed_by_VEL needed_by_MAG">
@ -263,48 +256,11 @@
</tr> </tr>
</table> </table>
</div> </div>
<div class="dminGroup topspacer tpa">
<table class="cf">
<thead>
<tr>
<th colspan="5">
<span i18n="pidTuningDMin" />
<span class="helpicon cf_tip" i18n_title="pidTuningDMinHelp" />
</th>
</tr>
<tr>
<th i18n="pidTuningDMinRoll" />
<th i18n="pidTuningDMinPitch" />
<th i18n="pidTuningDMinYaw" />
<th i18n="pidTuningDMinGain" />
<th i18n="pidTuningDMinAdvance" />
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="number" name="dMinRoll" step="1" min="0" max="100" />
</td>
<td>
<input type="number" name="dMinPitch" step="1" min="0" max="100" />
</td>
<td>
<input type="number" name="dMinYaw" step="1" min="0" max="100" />
</td>
<td>
<input type="number" name="dMinGain" step="1" min="0" max="100" />
</td>
<td>
<input type="number" name="dMinAdvance" step="1" min="0" max="200" />
</td>
</tr>
</tbody>
</table>
</div> </div>
<div class="gui_box grey topspacer pidTuningFeatures"> <div class="cf_column">
<!-- Pid controller advanced settings -->
<div class="gui_box grey pidTuningFeatures spacer_left">
<table class="pid_titlebar new_rates"> <table class="pid_titlebar new_rates">
<tr> <tr>
<th i18n="pidTuningNonProfilePidSettings"></th> <th i18n="pidTuningNonProfilePidSettings"></th>
@ -316,7 +272,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="gui_box grey topspacer"> <div class="gui_box grey pidControllerAdvancedSettings spacer_left">
<table class="pid_titlebar new_rates"> <table class="pid_titlebar new_rates">
<tr> <tr>
<th i18n="pidTuningPidSettings"></th> <th i18n="pidTuningPidSettings"></th>
@ -339,9 +295,8 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr class="dtermSetpoint" style="height:30px;"> <tr class="dtermSetpoint">
<td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="20"/></td> <td><input type="number" name="dtermSetpoint-number" step="0.01" min="0.00" max="20"/></td>
<td class="slider"><input type="range" name="dtermSetpoint-range" step="0.01" min="0.00" max="20"/></td>
<td> <td>
<div> <div>
<label> <label>
@ -353,7 +308,6 @@
</tr> </tr>
<tr class="dtermSetpointTransition"> <tr class="dtermSetpointTransition">
<td><input type="number" name="dtermSetpointTransition-number" step="0.01" min="0.01" max="1.00"/></td> <td><input type="number" name="dtermSetpointTransition-number" step="0.01" min="0.01" max="1.00"/></td>
<td class="slider"><input type="range" name="dtermSetpointTransition-range" step="0.01" min="0.01" max="1.00"/></td>
<td colspan="1"> <td colspan="1">
<div> <div>
<label> <label>
@ -369,9 +323,8 @@
</td> </td>
</tr> </tr>
<tr class="feedforwardTransition" style="height:30px;"> <tr class="feedforwardTransition">
<td><input type="number" name="feedforwardTransition-number" step="0.01" min="0.00" max="1.00"/></td> <td><input type="number" name="feedforwardTransition-number" step="0.01" min="0.00" max="1.00"/></td>
<td class="slider"><input type="range" name="feedforwardTransition-range" step="0.01" min="0.00" max="1.00"/></td>
<td colspan="1"> <td colspan="1">
<div> <div>
<label> <label>
@ -384,7 +337,6 @@
<tr class="acroTrainerAngleLimit"> <tr class="acroTrainerAngleLimit">
<td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="10" max="80"/></td> <td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="10" max="80"/></td>
<td class="slider"><input type="range" name="acroTrainerAngleLimit-range" step="1" min="10" max="80"/></td>
<td colspan="1"> <td colspan="1">
<div> <div>
<label> <label>
@ -397,7 +349,6 @@
<tr class="throttleBoost"> <tr class="throttleBoost">
<td><input type="number" name="throttleBoost-number" step="1" min="0" max="100"/></td> <td><input type="number" name="throttleBoost-number" step="1" min="0" max="100"/></td>
<td class="slider"><input type="range" name="throttleBoost-range" step="1" min="0" max="100"/></td>
<td colspan="1"> <td colspan="1">
<div> <div>
<label> <label>
@ -410,7 +361,6 @@
<tr class="absoluteControlGain"> <tr class="absoluteControlGain">
<td><input type="number" name="absoluteControlGain-number" step="1" min="0" max="20"/></td> <td><input type="number" name="absoluteControlGain-number" step="1" min="0" max="20"/></td>
<td class="slider"><input type="range" name="absoluteControlGain-range" step="1" min="0" max="20"/></td>
<td colspan="1"> <td colspan="1">
<div> <div>
<label> <label>
@ -457,9 +407,23 @@
</td> </td>
</tr> </tr>
<tr class="integratedYaw">
<td><input type="checkbox" id="useIntegratedYaw" class="toggle" /></td>
<td colspan="2">
<div class="helpicon cf_tip" i18n_title="pidTuningIntegratedYawHelp"></div>
<span>
<label for="useIntegratedYaw">
<span i18n="pidTuningIntegratedYaw" />
</label>
</span>
<span class="spacer_left" id="pidTuningIntegratedYawCaution" i18n="pidTuningIntegratedYawCaution" />
</td>
</tr>
<tr class="itermrelax"> <tr class="itermrelax">
<td><input type="checkbox" id="itermrelax" class="toggle" /></td> <td><input type="checkbox" id="itermrelax" class="toggle" /></td>
<td colspan="2"> <td colspan="2">
<div class="helpicon cf_tip" i18n_title="pidTuningItermRelaxHelp"></div>
<span> <span>
<label for="itermrelax"> <label for="itermrelax">
<span i18n="pidTuningItermRelax" /> <span i18n="pidTuningItermRelax" />
@ -467,107 +431,170 @@
</span> </span>
<span class="suboption"> <span class="suboption">
<label for="itermrelaxAxes">
<span i18n="pidTuningItermRelaxAxes" />
</label>
<select id="itermrelaxAxes"> <select id="itermrelaxAxes">
<option i18n="pidTuningItermRelaxAxesOptionRP" value="1"> <option i18n="pidTuningItermRelaxAxesOptionRP" value="1">
<option i18n="pidTuningItermRelaxAxesOptionRPY" value="2"/> <option i18n="pidTuningItermRelaxAxesOptionRPY" value="2"/>
<option i18n="pidTuningItermRelaxAxesOptionRPInc" value="3"/> <option i18n="pidTuningItermRelaxAxesOptionRPInc" value="3"/>
<option i18n="pidTuningItermRelaxAxesOptionRPYInc" value="4"/> <option i18n="pidTuningItermRelaxAxesOptionRPYInc" value="4"/>
</select> </select>
<label for="itermrelaxAxes">
<span i18n="pidTuningItermRelaxAxes" />
</label>
</span> </span>
<span class="suboption"> <span class="suboption">
<label for="itermrelaxType">
<span i18n="pidTuningItermRelaxType" />
</label>
<select id="itermrelaxType"> <select id="itermrelaxType">
<option i18n="pidTuningItermRelaxTypeOptionGyro" value="0"/> <option i18n="pidTuningItermRelaxTypeOptionGyro" value="0"/>
<option i18n="pidTuningItermRelaxTypeOptionSetpoint" value="1"/> <option i18n="pidTuningItermRelaxTypeOptionSetpoint" value="1"/>
</select> </select>
<label for="itermrelaxType">
<span i18n="pidTuningItermRelaxType" />
</label>
</span> </span>
<span class="itermRelaxCutoff suboption"> <span class="itermRelaxCutoff suboption">
<input type="number" name="itermRelaxCutoff" step="1" min="1" max="100" />
<label for="itermRelaxCutoff"> <label for="itermRelaxCutoff">
<span i18n="pidTuningItermRelaxCutoff" /> <span i18n="pidTuningItermRelaxCutoff" />
</label> </label>
<input type="number" name="itermRelaxCutoff" step="1" min="1" max="100" />
</span> </span>
<div class="helpicon cf_tip" i18n_title="pidTuningItermRelaxHelp"></div>
</td> </td>
</tr> </tr>
<tr class="integratedYaw"> <tr class="dminGroup">
<td><input type="checkbox" id="useIntegratedYaw" class="toggle" /></td> <td><input type="checkbox" id="dMinSwitch" class="toggle" /></td>
<td colspan="2"> <td colspan="3">
<div class="helpicon cf_tip" i18n_title="pidTuningDMinHelp"></div>
<span> <span>
<label for="useIntegratedYaw"> <label for="dminGroup">
<span i18n="pidTuningIntegratedYaw" /> <span i18n="pidTuningDMin" />
</label> </label>
</span> </span>
<span class="suboption" id="pidTuningIntegratedYawCaution" i18n="pidTuningIntegratedYawCaution" /> <span class="suboption">
<input type="number" name="dMinGain" step="1" min="0" max="100" />
<div class="helpicon cf_tip" i18n_title="pidTuningIntegratedYawHelp"></div> <label for="dMinGain">
<span i18n="pidTuningDMinGain" />
</label>
</span>
<span class="suboption">
<input type="number" name="dMinAdvance" step="1" min="0" max="200" />
<label for="dMinAdvance">
<span i18n="pidTuningDMinAdvance" />
</label>
</span>
</td> </td>
</tr> </tr>
</table> <tr class="antigravity">
</div> <td><input type="checkbox" id="antiGravitySwitch" class="toggle" /></td>
<td colspan="3">
<div class="helpicon cf_tip" i18n_title="pidTuningAntiGravityHelp"></div>
<span>
<label for="antiGravity">
<span i18n="pidTuningAntiGravity" />
</label>
</span>
<div class="antigravity topspacer tpa"> <span class="suboption antiGravityMode">
<table class="cf">
<thead>
<tr>
<th i18n="pidTuningAntiGravityMode"></th>
<th i18n="pidTuningAntiGravityGain"></th>
<th i18n="pidTuningAntiGravityThres"></th>
</tr>
</thead>
<tbody>
<tr style="height: 35px;">
<td>
<select id="antiGravityMode"> <select id="antiGravityMode">
<option i18n="pidTuningAntiGravityModeOptionSmooth" value="0"> <option i18n="pidTuningAntiGravityModeOptionSmooth" value="0"/>
<option i18n="pidTuningAntiGravityModeOptionStep" value="1"> <option i18n="pidTuningAntiGravityModeOptionStep" value="1"/>
</select> </select>
</td> <label for="antiGravityMode">
<td> <span i18n="pidTuningAntiGravityMode" />
<input type="number" name="itermAcceleratorGain" step="0.1" min="1" max="30" /> </label>
</td> </span>
<td>
<span class="suboption">
<input type="number" name="itermAcceleratorGain" step="0.1" min="1.1" max="30" />
<label for="antiGravityGain">
<span i18n="pidTuningAntiGravityGain" />
</label>
</span>
<span class="suboption antiGravityThres">
<input type="number" name="itermThrottleThreshold" step="10" min="20" max="1000" /> <input type="number" name="itermThrottleThreshold" step="10" min="20" max="1000" />
<label for="antiGravityThres">
<span i18n="pidTuningAntiGravityThres" />
</label>
</span>
</td> </td>
</tr> </tr>
</tbody> </table>
</div>
</div>
</div>
<!-- RATES SUBTAB -->
<div class="subtab-rates" style="display: none;">
<div class="clear-both"></div>
<div class="cf_column">
<div class="gui_box grey rateSetup">
<table id="rateSetup" class="pid_tuning">
<tr class="pid_titlebar">
<th class="name"></th>
<th class="rc_rate" i18n="pidTuningRcRate"></th>
<th class="rate" i18n="pidTuningRate"></th>
<th class="rc_expo" i18n="pidTuningRcExpo"></th>
<th class="new_rates maxVel" i18n="pidTuningMaxVel"></th>
</tr>
<tr class="pid_titlebar2">
<th colspan="5">
<div class="pid_mode">
<div i18n="pidTuningRateSetup" style="float:left;"></div>
<div class="helpicon cf_tip" i18n_title="pidTuningRatesTuningHelp"></div>
</div>
</th>
</tr>
<tr class="ROLL">
<td class="pid_roll"></td>
<td class="rc_rate">
<input type="number" name="rc_rate" step="0.01" min="0.01" max="2.55" />
</td>
<td class="roll_rate">
<input type="number" name="roll_rate" step="0.01" min="0" max="1.00" />
</td>
<td class="roll_pitch_rate" rowspan="2">
<input type="number" name="roll_pitch_rate" step="0.01" min="0" max="1.00" />
</td>
<td rowspan="2" class="inputBackground">
<input type="number" name="rc_expo" step="0.01" min="0" max="1" />
<div class="bracket"></div>
</td>
<td class="new_rates maxAngularVelRoll"></td>
</tr>
<tr class="PITCH">
<td class="pid_pitch"></td>
<td>
<input type="number" name="rc_rate_pitch" step="0.01" min="0.01" max="2.55" />
</td>
<td class="pitch_rate">
<input type="number" name="pitch_rate" step="0.01" min="0" max="1.00" />
</td>
<td>
<input type="number" name="rc_pitch_expo" step="0.01" min="0" max="1" />
</td>
<td class="new_rates maxAngularVelPitch"></td>
</tr>
<tr class="YAW">
<td class="pid_yaw"></td>
<td rowspan="1">
<input type="number" name="rc_rate_yaw" step="0.01" min="0.01" max="2.55" />
</td>
<td>
<input type="number" name="yaw_rate" step="0.01" min="0" max="2.55" />
</td>
<td>
<input type="number" name="rc_yaw_expo" step="0.01" min="0" max="1" />
</td>
<td class="new_rates maxAngularVelYaw"></td>
</tr>
</table> </table>
</div> </div>
<div class="gui_box grey topspacer"> <div class="gui_box rc_curve">
<table class="pid_titlebar">
<thead>
<tr>
<th i18n="pidTuningRatesPreview"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="rates_preview_cell">
<div class="rates_preview">
<canvas id="canvas"></canvas>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cf_column third_right">
<div class="spacer_left rc_curve">
<div class="rc_curve_bg"> <div class="rc_curve_bg">
<table class="cf rc_curve"> <table class="cf rc_curve">
<thead> <thead>
@ -583,53 +610,20 @@
<tbody> <tbody>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<div class="spacer" style="margin-top: 10px; margin-bottom: 8px;">
<div class="rate_curve" style="position:relative;" > <div class="rate_curve" style="position:relative;" >
<canvas id="rate_curve_layer0" height="120px" style="position:absolute; top: 0; left: 0; z-index: 0; height:100%; width:100%;"></canvas> <canvas id="rate_curve_layer0" height="120px" style="position:absolute; top: 0; left: 0; z-index: 0; height:100%; width:100%;"></canvas>
<canvas id="rate_curve_layer1" height="120px" style="position:absolute; top: 0; left: 0; z-index: 1; height:100%; width:100%;"></canvas> <canvas id="rate_curve_layer1" height="120px" style="position:absolute; top: 0; left: 0; z-index: 1; height:100%; width:100%;"></canvas>
</div> </div>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="spacer_left topspacer throttle">
<table class="cf">
<thead>
<tr>
<th i18n="receiverThrottleMid"></th>
<th i18n="receiverThrottleExpo"></th>
</tr>
</thead>
<tbody>
<tr style="height: 35px;">
<td><input type="number" name="mid" step="0.01" min="0" max="1" /></td>
<td><input type="number" name="expo" step="0.01" min="0" max="1" /></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="spacer_left topspacer throttle">
<table class="cf"> <div class="cf_column">
<thead> <div class="gui_box tpa spacer_left">
<tr>
<th colspan="2" i18n="throttle"></th>
</tr>
</thead>
<tr>
<td colspan="2">
<div class="spacer" style="margin-top: 10px; margin-bottom: 10px;">
<div class="throttle_curve">
<canvas height="120px" style="width: 100%; height: 100%"></canvas>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="spacer_left topspacer tpa">
<table class="cf"> <table class="cf">
<thead> <thead>
<tr> <tr>
@ -638,7 +632,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr style="height: 35px;"> <tr>
<td class="leftzero"><input type="number" name="tpa" step="0.01" min="0" <td class="leftzero"><input type="number" name="tpa" step="0.01" min="0"
max="1.00" /></td> max="1.00" /></td>
<td class="tpa-breakpoint"><input type="number" name="tpa-breakpoint" step="10" min="1000" max="2000" /></td> <td class="tpa-breakpoint"><input type="number" name="tpa-breakpoint" step="10" min="1000" max="2000" /></td>
@ -646,7 +640,8 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="spacer_left topspacer throttle_limit">
<div class="gui_box throttle_limit spacer_left">
<table class="cf"> <table class="cf">
<thead> <thead>
<tr> <tr>
@ -665,7 +660,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr style="height: 35px;"> <tr>
<td> <td>
<select id="throttleLimitType"> <select id="throttleLimitType">
<option i18n="pidTuningThrottleLimitTypeOff" value="0"> <option i18n="pidTuningThrottleLimitTypeOff" value="0">
@ -679,19 +674,73 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="gui_box throttle spacer_left">
<table class="cf">
<thead>
<tr>
<th i18n="receiverThrottleMid"></th>
<th i18n="receiverThrottleExpo"></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="number" name="mid" step="0.01" min="0" max="1" /></td>
<td><input type="number" name="expo" step="0.01" min="0" max="1" /></td>
</tr>
</tbody>
</table>
</div>
<div class="gui_box throttle spacer_left">
<table class="cf">
<thead>
<tr>
<th i18n="pidTuningThrottleCurvePreview" colspan="2"></th>
</tr>
</thead>
<tr>
<td colspan="2" class="throttleCurvePreview">
<div class="throttle_curve">
<canvas height="164px" style="width: 100%; height: 100%"></canvas>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="cf_column">
<div class="gui_box ratePreview grey spacer_left">
<table class="pid_titlebar">
<thead>
<tr>
<th i18n="pidTuningRatesPreview"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="rates_preview_cell">
<div class="rates_preview">
<canvas id="canvas"></canvas>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> </div>
<!-- FILTER SUBTAB --> <!-- FILTER SUBTAB -->
<div class="subtab-filter" style="display: none;"> <div class="subtab-filter" style="display: none;">
<div class="clear-both"></div> <div class="clear-both"></div>
<div class="note topspacer" style="margin-top: 0px;"> <div class="note">
<div class="note_spacer"> <div class="note_spacer">
<p i18n="tuningHelp"></p> <p i18n="tuningHelp"></p>
</div> </div>
</div> </div>
<div class="note topspacer filterWarning" style="margin-top: 0px;"> <div class="note filterWarning">
<div class="note_spacer"> <div class="note_spacer">
<p i18n="filterWarning"></p> <p i18n="filterWarning"></p>
</div> </div>
@ -710,7 +759,7 @@
</tr> </tr>
</table> </table>
<table> <table class="filterTable">
<tr> <tr>
<th colspan="2"> <th colspan="2">
<div class="pid_mode"> <div class="pid_mode">
@ -724,7 +773,7 @@
<td> <td>
<span class="groupSwitchValue"> <span class="groupSwitchValue">
<span class="inputSwitch"><input type="checkbox" id="gyroLowpassDynEnabled" class="toggle" /></span> <span class="inputSwitch"><input type="checkbox" id="gyroLowpassDynEnabled" class="toggle" /></span>
<span class="inputValue"><input type="number" name="gyroLowpassDynMinFrequency" step="1" min="1" max="16000"/></span> <span class="inputValue"><input type="number" name="gyroLowpassDynMinFrequency" step="1" min="1" max="1000"/></span>
</span> </span>
</td> </td>
<td> <td>
@ -738,7 +787,7 @@
<tr class="gyroLowpassDyn"> <tr class="gyroLowpassDyn">
<td> <td>
<span class="inputValue"><input type="number" name="gyroLowpassDynMaxFrequency" step="1" min="1" max="16000"/></span> <span class="inputValue"><input type="number" name="gyroLowpassDynMaxFrequency" step="1" min="1" max="1000"/></span>
</td> </td>
<td> <td>
<div> <div>
@ -965,8 +1014,7 @@
</tr> </tr>
</table> </table>
<table> <table class="filterTable">
<tr> <tr>
<th colspan="2"> <th colspan="2">
<div class="pid_mode"> <div class="pid_mode">
@ -982,7 +1030,7 @@
<td> <td>
<span class="groupSwitchValue"> <span class="groupSwitchValue">
<span class="inputSwitch"><input type="checkbox" id="dtermLowpassDynEnabled" class="toggle" /></span> <span class="inputSwitch"><input type="checkbox" id="dtermLowpassDynEnabled" class="toggle" /></span>
<span class="inputValue"><input type="number" name="dtermLowpassDynMinFrequency" step="1" min="1" max="16000"/></span> <span class="inputValue"><input type="number" name="dtermLowpassDynMinFrequency" step="1" min="1" max="1000"/></span>
</span> </span>
</td> </td>
<td> <td>
@ -996,7 +1044,7 @@
<tr class="dtermLowpassDyn"> <tr class="dtermLowpassDyn">
<td> <td>
<span class="inputValue"><input type="number" name="dtermLowpassDynMaxFrequency" step="1" min="1" max="16000"/></span> <span class="inputValue"><input type="number" name="dtermLowpassDynMaxFrequency" step="1" min="1" max="1000"/></span>
</td> </td>
<td> <td>
<div> <div>
@ -1184,5 +1232,4 @@
<a href="#" class="dialogCopyProfile-cancelbtn regular-button" i18n="dialogCopyProfileClose"></a> <a href="#" class="dialogCopyProfile-cancelbtn regular-button" i18n="dialogCopyProfileClose"></a>
</div> </div>
</dialog> </dialog>
</div> </div>