Skip to content

Commit 08cf069

Browse files
authored
support rc_smoothing_rx_smoothed (#761)
* rc_smoothing_rx_smoothed - WIP (this fills the existing field, but not techincally correct) * rc_smoothing_rx_smoothed - working, but is it proper? * rc_smoothing_rx_smoothed - this should be proper. caveat: fails to reset value null when 4.5 pre 4.5-RC1 * rc_smoothing_rx_smoothed - revert html id's * rc_smoothing_rx_smoothed - fix id
1 parent 739f27f commit 08cf069

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,10 +1911,14 @@ <h5 class="modal-title-revision"></h5>
19111911
<!-- list generated here -->
19121912
</select>
19131913
</td>
1914-
<td name="rcSmoothingRxAverage">
1914+
<td name="rcSmoothingRxAverage" id="rcSmoothingRxAverage">
19151915
<label>RX Average (ms)</label>
19161916
<input type="text" step="0.1" min="0"/>
19171917
</td>
1918+
<td name="rcSmoothingRxSmoothed" id="rcSmoothingRxSmoothed">
1919+
<label>RX Smoothed (Hz)</label>
1920+
<input type="text" step="1" min="0"/>
1921+
</td>
19181922
<td name='rcSmoothingDebugAxis'>
19191923
<label>Debug Axis</label>
19201924
<select>

src/flightlog_parser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export function FlightLogParser(logData) {
314314
rc_smoothing_throttle_hz: null, // RC Smoothing manual cutoff for throttle
315315
rc_smoothing_auto_factor_throttle: null, // RC Smoothing cutoff for throttle
316316
rc_smoothing_active_cutoffs_ff_sp_thr: [null, null, null], // RC Smoothing active cutoffs feedforward, setpoint, throttle
317+
rc_smoothing_rx_smoothed: null,
317318
dyn_notch_count: null, // Number of dynamic notches 4.3
318319
rpm_filter_fade_range_hz: null, // Fade range for RPM notch filters in Hz
319320
dyn_idle_p_gain: null,
@@ -650,6 +651,7 @@ export function FlightLogParser(logData) {
650651
case "rc_smoothing_type":
651652
case "rc_smoothing_debug_axis":
652653
case "rc_smoothing_rx_average":
654+
case "rc_smoothing_rx_smoothed":
653655
case "rc_smoothing_mode": // 4.3 rc smoothing stuff
654656
case "rc_smoothing_auto_factor_setpoint":
655657
case "rc_smoothing_auto_factor_throttle":

src/header_dialog.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ export function HeaderDialog(dialog, onSave) {
383383
name: "rc_smoothing_rx_average",
384384
type: FIRMWARE_TYPE_BETAFLIGHT,
385385
min: "3.5.0",
386+
max: "4.4.999",
387+
},
388+
{
389+
name: "rc_smoothing_rx_smoothed",
390+
type: FIRMWARE_TYPE_BETAFLIGHT,
391+
min: "4.5.0",
386392
max: "999.9.9",
387393
},
388394
{
@@ -1560,7 +1566,16 @@ export function HeaderDialog(dialog, onSave) {
15601566

15611567
$(".dshot_bidir_required").toggle(sysConfig.dshot_bidir == 1);
15621568

1563-
setParameter("rcSmoothingRxAverage", sysConfig.rc_smoothing_rx_average, 3);
1569+
if (semver.gte(activeSysConfig.firmwareVersion, "4.5.0")) {
1570+
setParameter("rcSmoothingRxSmoothed", sysConfig.rc_smoothing_rx_smoothed, 0);
1571+
$("#rcSmoothingRxSmoothed").show();
1572+
$("#rcSmoothingRxAverage").hide();
1573+
} else {
1574+
setParameter("rcSmoothingRxAverage", sysConfig.rc_smoothing_rx_average, 3);
1575+
$("#rcSmoothingRxAverage").show();
1576+
$("#rcSmoothingRxSmoothed").hide();
1577+
}
1578+
15641579
renderSelect(
15651580
"rcSmoothingDebugAxis",
15661581
sysConfig.rc_smoothing_debug_axis,

0 commit comments

Comments
 (0)