Skip to content

Commit

Permalink
Merge pull request #512 from ctzsnooze/update-for-10723
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeller authored Sep 4, 2021
2 parents 683789f + cc68ffa commit 5b1d16c
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 145 deletions.
172 changes: 97 additions & 75 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -915,17 +915,55 @@ <h5 class="modal-title-craft"></h5>
</table>

<table class="parameter cf">
<thead>
<tr>
<th scope="row" colspan="6">Feedforward</th>
</tr>
</thead>
<tbody>
<tr>
<td name="ptermSRateWeight" class="bf-only">
<label>P-Term
<br>&nbsp;
<td name="feedforwardTransition" class="bf-only">
<label>Transition
<br/>&nbsp;</label>
<input type="number" step="0.01" min="0" max="999" />
</td>
<td name="feedforward_transition" class="bf-only">
<label>Feedforward
<br>Transition
<td name="feedforwardAveraging" class="bf-only">
<label>Averaging
<br/>&nbsp;</label>
<select>
<!~~ list generated here ~~>
</select>
</td>
<td name="feedforwardSmoothing" class="bf-only">
<label>Smoothing
<br/>&nbsp;</label>
<input type="number" step="0" min="0" max="100" />
</td>
<td name="feedforwardJitter" class="bf-only">
<label>Jitter
<br/>&nbsp;</label>
<input type="number" step="0" min="0" max="100" />
</td>
<td name="feedforwardBoost" class="bf-only">
<label>Boost
<br/>&nbsp;</label>
<input type="number" step="0" min="0" max="100" />
</td>
<td name="feedforwardMaxRate" class="bf-only">
<label>MaxRate
<br/>&nbsp;</label>
<input type="number" step="0" min="0" max="100" />
</td>
</tr>
</tbody>
</table>
<table class="parameter cf">
<caption>Misc</caption>
<tbody>
<tr>
<td name="ptermSRateWeight" class="bf-only">
<label>P-Term
<br>&nbsp;
<br/>&nbsp;</label>
<input type="number" step="0.01" min="0" max="999" />
</td>
Expand Down Expand Up @@ -1229,32 +1267,26 @@ <h5 class="modal-title-craft"></h5>
</tr>

<tr class="dyn_filter_required">
<td name='dyn_notch_range'>
<label>Dyn Notch
<br>Range</label>
<select>
<!-- list generated here -->
</select>
</td>
<td name="dyn_notch_width_percent">
<label>Dyn Notch
<br>Width (percent)</label>
<input type="number" step="0.1" min="0" max="999.00" />
<thead>
<tr>
<th scope="row" colspan="4">Dynamic notch filters</th>
</tr>
</thead>
<td name='dynNotchCount'>
<label>Count/Width</label>
<input type="number" step="1" min="0" max="10" />
</td>
<td name='dyn_notch_q'>
<label>Dyn Notch
<br>Q</label>
<input type="number" step="0.01" min="0" max="999.00" />
<td name="dynNotchQ">
<label>Q factor</label>
<input type="number" step="1" min="0" max="999.00" />
</td>
<td name="dyn_notch_min_hz">
<label>Dyn Notch
<br>Min (Hz)</label>
<input type="number" step="0.1" min="0" max="999.00" />
<td name="dynNotchMinHz">
<label>Min (Hz)</label>
<input type="number" step="1" min="0" max="999.00" />
</td>
<td name="dyn_notch_max_hz">
<label>Dyn Notch
<br>Max (Hz)</label>
<input type="number" step="0.1" min="0" max="999.00" />
<td name="dynNotchMaxHz">
<label>>Max (Hz)</label>
<input type="number" step="1" min="0" max="999.00" />
</td>
</tr>

Expand All @@ -1274,6 +1306,11 @@ <h5 class="modal-title-craft"></h5>
<br>Min(Hz)</label>
<input type="number" step="0.01" min="0" max="999.00" />
</td>
<td name='rpm_notch_lpf'>
<label>RPM Notch
<br>Lpf</label>
<input type="number" step="0.01" min="0" max="999.00" />
</td>
</tr>

</tbody>
Expand Down Expand Up @@ -1685,75 +1722,60 @@ <h5 class="modal-title-craft"></h5>
<th colspan="5">RC Smoothing</th>
</tr>
<tr>
<td name='rc_smoothing_type'>
<label>Type</label>
<td name='rcSmoothingMode'>
<label>On/Off</label>
<select>
<!-- list generated here -->
</select>
</td>
<td name='rc_interpolation'>
<label>Interpolation</label>
<td name="rcSmoothingRxAverage">
<label>RX Average (ms)</label>
<input type="number" step="0.1" min="0"/>
</td>
<td name='rcSmoothingDebugAxis'>
<label>Debug Axis</label>
<select>
<!-- list generated here -->
</select>
</td>
<td name="rc_interpolation_interval">
<label>Interval (ms)</label>
<input type="number" step="0.01" min="0" max="999.00" />
</tr>
<tr>
<td colspan="2" name='rcSmoothingAutoFactorSetpoint'>
<label>Setpoint auto fact</label>
<input type="number" step="1" min="0" max="250" />
</td>
<td name="rc_smoothing_cutoffs_1">
<label>Input Hz</label>
<input type="number" step="1" min="0" max="255" />
</td>
<td name="rc_smoothing_cutoffs_2">
<label>Derivative Hz</label>
<input type="number" step="1" min="0" max="255" />
<td name="rcSmoothingAutoFactorThrottle">
<label>Throttle auto fact</label>
<input type="number" step="1" min="0" max="250" />
</td>
</tr>
<tr>
<td name="rc_smoothing_rx_average">
<label>RX Average (ms)</label>
<input type="number" step="0.1" min="0"/>
</td>
<td name='rc_smoothing_filter_type_1'>
<label>Input Type</label>
<select>
<!-- list generated here -->
</select>
<td name="rcSmoothingSetpointHz">
<label>Setpoint cutoff Hz</label>
<input type="number" step="1" min="0" max="255" />
</td>
<td name='rc_smoothing_filter_type_2'>
<label>Derivative Type</label>
<select>
<!-- list generated here -->
</select>
<td name="rcSmoothingFeedforwardHz">
<label>Feedforward cutoff Hz</label>
<input type="number" step="1" min="0" max="255" />
</td>
<td name="rcSmoothingThrottleHz">
<label>Throttle cutoff Hz</label>
<input type="number" step="1" min="0" max="255" />
</tr>
<tr>
<td name='rc_smoothing_auto_factor'>
<label>Auto factor</label>
<td name='rcSmoothingActiveCutoffsSp'>
<label>Active Cutoff Setpoint</label>
<input type="number" step="1" min="0"/>
</td>
<td name='rc_smoothing_active_cutoffs_1'>
<label>Active Cutoff 1</label>
<td name='rcSmoothingActiveCutoffsFf'>
<label>Active Cutoff FF</label>
<input type="number" step="1" min="0"/>
</td>
<td name='rc_smoothing_active_cutoffs_2'>
<label>Active Cutoff 2</label>
<td name='rcSmoothingActiveCutoffsThr'>
<label>Active Cutoff Throttle</label>
<input type="number" step="1" min="0"/>
</td>
</tr>
<tr>
<td name="rc_interpolation_channels">
<label>Channels</label>
<input type="number" step="1" min="0"/>
</td>
<td name='rc_smoothing_debug_axis'>
<label>Debug Axis</label>
<select>
<!-- list generated here -->
</select>
</td>
</tr>
</tbody>
</table>
<table class="noline" cellpadding="0" cellspacing="0">
Expand Down
20 changes: 16 additions & 4 deletions js/flightlog_fielddefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,15 @@ var
]),

RC_SMOOTHING_DERIVATIVE_TYPE = makeReadOnly([
"OFF",
"PT1",
"BIQUAD"
]),

RC_SMOOTHING_MODE = makeReadOnly([
"OFF",
"ON"
]),

RC_SMOOTHING_DEBUG_AXIS = makeReadOnly([
"ROLL",
"PITCH",
Expand All @@ -251,9 +255,10 @@ var
]),

FILTER_TYPE = makeReadOnly([
"PT1",
"BIQUAD",
"FIR",
"PT1",
"BIQUAD",
"PT2",
"PT3",
]),

DEBUG_MODE = [],
Expand Down Expand Up @@ -457,6 +462,13 @@ var
"FIRST",
"SECOND",
"BOTH",
]),

FF_AVERAGING = makeReadOnly([
"OFF",
"2_POINT",
"3_POINT",
"4_POINT",
]);

function adjustFieldDefsList(firmwareType, firmwareVersion) {
Expand Down
Loading

0 comments on commit 5b1d16c

Please sign in to comment.