Skip to content

Commit

Permalink
Merge pull request #2035 from iNavFlight/dzikuvx-simplify-receiver-tab
Browse files Browse the repository at this point in the history
Receiver and Tuning tab changes
  • Loading branch information
DzikuVx authored May 16, 2024
2 parents b717b2b + eac50a4 commit d3a89d0
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 203 deletions.
54 changes: 54 additions & 0 deletions locale/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,24 @@
"portsFunction_SBUS_OUTPUT": {
"message": "SBus Output"
},
"pidTuning_Other": {
"message": "Other"
},
"pidTuning_Limits": {
"message": "Limits"
},
"pidTuning_HeadingHold_Rate": {
"message": "Heading Hold Rate (°/s)"
},
"pidTuning_Max_Inclination_Angle": {
"message": "Max Inclination Angle"
},
"pidTuning_Max_Roll": {
"message": "Roll (°/10)"
},
"pidTuning_Max_Pitch": {
"message": "Pitch (°/10)"
},
"pidTuning_ShowAllPIDs": {
"message": "Show all PIDs"
},
Expand Down Expand Up @@ -1391,6 +1409,30 @@
"pidTuning_RatesAndExpo": {
"message": "Rates & Expo"
},
"pidTuning_Rates_Stabilized": {
"message": "Stabilized Rates"
},
"pidTuning_Rates_Roll": {
"message": "Roll (°/s)"
},
"pidTuning_Rates_Pitch": {
"message": "Pitch (°/s)"
},
"pidTuning_Rates_Yaw": {
"message": "Yaw (°/s)"
},
"pidTuning_Expo_Stabilized": {
"message": "Stabilized Expo"
},
"pidTuning_Expo_Manual": {
"message": "Manual Expo"
},
"pidTuning_Expo_RollPitch": {
"message": "Roll & Pitch (%)"
},
"pidTuning_Expo_Yaw": {
"message": "Yaw (%)"
},
"pidTuning_RateDynamics": {
"message": "Rate Dynamics"
},
Expand Down Expand Up @@ -1592,6 +1634,18 @@
"pidTuning_LoadedProfile": {
"message": "Loaded Profile: <strong style=\"color: #37a8db\">$1</strong>"
},
"pidTuning_Manual_Rates": {
"message": "Manual Rates"
},
"pidTuning_Manual_Roll": {
"message": "Roll (%)"
},
"pidTuning_Manual_Pitch": {
"message": "Pitch (%)"
},
"pidTuning_Manual_Yaw": {
"message": "Yaw (%)"
},
"pidTuning_gyro_use_dyn_lpf": {
"message": "Dynamic gyro LPF"
},
Expand Down
13 changes: 12 additions & 1 deletion src/css/tabs/pid_tuning.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
.pid-slider-row span,
.pid-switch-row .label {
margin-right: 2em;
width: 120px;
width: 150px;
line-height: 22px;;
}

Expand Down Expand Up @@ -465,4 +465,15 @@

#pid-sliders {
margin-bottom: 1em;
}

.tab-pid_tuning .expo-chart {
margin: 0 0px 0px 0;
width: 200px;
height: 117px;
border: 1px solid silver;
border-radius: 3px;
background-image: url(./../../../images/paper.jpg);
background-size: 200%;
background-position: center;
}
210 changes: 135 additions & 75 deletions tabs/pid_tuning.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ <h2 data-i18n="ezTuneRatePreview"></h2>
<td id="preview-yaw-expo"></td>
</tr>
</table>
<div style="margin-top: 1em;">
<div id="ez_tune_expo_curve" class="expo-chart" style="width: 250px; height: 200px; margin: auto;">
<canvas width="250" height="200"></canvas>
</div>
</div>
</div>

</div>
Expand Down Expand Up @@ -436,82 +441,137 @@ <h3 data-i18n="axisYaw"></h3>
</div>

<div id="subtab-rates" class="subtab__content">
<div class="tab_subtitle" style="margin-top: 1em;" data-i18n="pidTuning_RatesAndExpo"></div>

<div class="clear-both"></div>
<div class="cf_column">
<table class="settings-table settings-table--inav">
<tbody>
<tr class="not-for-ez-tune">
<th class="roll" data-i18n="pidTuning_RollRate"></th>
<td class="roll">
<div class="pidTuning_number"><input id="rate-roll" type="number" class="rate-tpa_input" data-setting="roll_rate" data-unit="decadegps" /></div>
</td>
</tr>
<tr class="not-for-ez-tune">
<th class="pitch" data-i18n="pidTuning_PitchRate"></th>
<td class="pitch">
<div class="pidTuning_number"><input id="rate-pitch" type="number" class="rate-tpa_input" data-setting="pitch_rate" data-unit="decadegps" /></div>
</td>
</tr>
<tr class="not-for-ez-tune">
<th class="yaw" data-i18n="pidTuning_YawRate"></th>
<td class="yaw">
<div class="pidTuning_number"><input id="rate-yaw" type="number" class="rate-tpa_input" data-setting="yaw_rate" data-unit="decadegps" /></div>
</td>
</tr>
<tr class="not-for-ez-tune">
<th data-i18n="pidTuning_RollAndPitchExpo"></th>
<td>
<div class="pidTuning_number"><input type="number" class="rate-tpa_input" data-setting="rc_expo" data-unit="percent" /></div>
</td>
</tr>
<tr class="not-for-ez-tune">
<th data-i18n="pidTuning_YawExpo"></th>
<td>
<div class="pidTuning_number"><input type="number" class="rate-tpa_input" data-setting="rc_yaw_expo" data-unit="percent" /></div>
</td>
</tr>
<tr>
<th data-i18n="pidTuning_MaxRollAngle"></th>
<td>
<div class="pidTuning_number"><input id="maxRollInclination" type="number" class="rate-tpa_input" data-setting="max_angle_inclination_rll" data-unit="decideg-lrg" /></div>
<div for="maxRollInclination" class="helpicon cf_tip" data-i18n_title="pidTuning_MaxRollAngleHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="pidTuning_MaxPitchAngle"></th>
<td>
<div class="pidTuning_number"><input id="maxPitchInclination" type="number" class="rate-tpa_input" data-setting="max_angle_inclination_pit" data-unit="decideg-lrg" /></div>
<div for="maxPitchInclination" class="helpicon cf_tip" data-i18n_title="pidTuning_MaxPitchAngleHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="pidTuning_magHoldYawRate"></th>
<td>
<div class="pidTuning_number"><input id="headingHoldRate" type="number" class="rate-tpa_input" data-setting="heading_hold_rate_limit" data-unit="degps" /></div>
<div for="headingHoldRate" class="helpicon cf_tip" data-i18n_title="pidTuning_MagHoldYawRateHelp"></div>
</td>
</tr>
<tr>
<th class="roll" data-i18n="pidTuning_ManualRollRate"></th>
<td class="roll">
<div class="pidTuning_number"><input id="rate-manual-roll" type="number" class="rate-tpa_input" data-setting="manual_roll_rate" data-unit="percent" /></div>
</td>
</tr>
<tr>
<th class="pitch" data-i18n="pidTuning_ManualPitchRate"></th>
<td class="pitch">
<div class="pidTuning_number"><input id="rate-manual-pitch" type="number" class="rate-tpa_input" data-setting="manual_pitch_rate" data-unit="percent" /></div>
</td>
</tr>
<tr>
<th class="yaw" data-i18n="pidTuning_ManualYawRate"></th>
<td class="yaw">
<div class="pidTuning_number"><input id="rate-manual-yaw" type="number" class="rate-tpa_input" data-setting="manual_yaw_rate" data-unit="percent" /></div>
</td>
</tr>
</tbody>
</table>
<div class="tab_subtitle" style="margin-top: 1em;" data-i18n="pidTuning_RatesAndExpo"></div>

<div class="pid-sliders-axis not-for-ez-tune" data-axis="roll">
<h3 data-i18n="pidTuning_Rates_Stabilized"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Rates_Roll"></span>
<div class="number no-border">
<input id="rate_roll_rate" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Rates_Pitch"></span>
<div class="number no-border">
<input id="rate_pitch_rate" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>

<div class="pid-slider-row">
<span data-i18n="pidTuning_Rates_Yaw"></span>
<div class="number no-border">
<input id="rate_yaw_rate" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
</div>

<div class="pid-sliders-axis not-for-ez-tune" data-axis="pitch">
<div style="float: right">
<div class="pitch_roll_curve expo-chart">
<canvas width="200" height="117"></canvas>
</div>
</div>
<h3 data-i18n="pidTuning_Expo_Stabilized"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Expo_RollPitch"></span>
<div class="number no-border">
<input id="rate_rollpitch_expo" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Expo_Yaw"></span>
<div class="number no-border">
<input id="rate_yaw_expo" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
</div>

<div class="pid-sliders-axis not-for-multirotor" data-axis="yaw">
<h3 data-i18n="pidTuning_Manual_Rates"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Manual_Roll"></span>
<div class="number no-border">
<input id="rate_manual_roll" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Manual_Pitch"></span>
<div class="number no-border">
<input id="rate_manual_pitch" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Manual_Yaw"></span>
<div class="number no-border">
<input id="rate_manual_yaw" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>

</div>

<div class="pid-sliders-axis not-for-multirotor" data-axis="3">
<div style="float: right">
<div class="manual_expo_curve expo-chart">
<canvas width="200" height="117"></canvas>
</div>
</div>
<h3 data-i18n="pidTuning_Expo_Manual"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Expo_RollPitch"></span>
<div class="number no-border">
<input id="manual_rollpitch_expo" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Expo_Yaw"></span>
<div class="number no-border">
<input id="manual_yaw_expo" class="controlProfileHighlightActive" type="number"/>
</div>
<div class="clear-both"></div>
</div>
</div>

<div class="pid-sliders-axis only-for-multirotor" data-axis="3">
<h3 data-i18n="pidTuning_Other"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_HeadingHold_Rate"></span>
<div class="number no-border">
<input id="heading_hold_rate_limit" class="controlProfileHighlightActive rate-tpa_input" data-setting="heading_hold_rate_limit" type="number" data-presentation="range" />
</div>
<div class="clear-both"></div>
</div>
</div>

<div class="tab_subtitle" style="margin-top: 1em;" data-i18n="pidTuning_Limits"></div>

<div class="pid-sliders-axis" data-axis="roll">
<h3 data-i18n="pidTuning_Max_Inclination_Angle"></h3>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Max_Roll"></span>
<div class="number no-border">
<input id="max_angle_inclination_rll" class="controlProfileHighlightActive rate-tpa_input" data-setting="max_angle_inclination_rll" type="number" data-presentation="range" />
</div>
<div class="clear-both"></div>
</div>
<div class="pid-slider-row">
<span data-i18n="pidTuning_Max_Pitch"></span>
<div class="number no-border">
<input id="max_angle_inclination_pit" class="controlProfileHighlightActive rate-tpa_input" data-setting="max_angle_inclination_pit" type="number" data-presentation="range" />
</div>
<div class="clear-both"></div>
</div>
</div>

<div class="clear-both"></div>
Expand Down
Loading

0 comments on commit d3a89d0

Please sign in to comment.