Skip to content

Commit d2b0665

Browse files
committed
finalise rc_smoothing headers
1 parent f50e427 commit d2b0665

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

js/flightlog_parser.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,10 @@ var FlightLogParser = function(logData) {
265265
vbat_pid_compensation:null, // VBAT PID compensation
266266
rate_limits:[null, null, null], // RC Rate limits
267267
rc_smoothing:null, // RC Control Smoothing
268-
rc_smoothing_type:null, // Type of the RC Smoothing
269268
rc_interpolation:null, // RC Control Interpolation type
270269
rc_interpolation_channels:null, // RC Control Interpotlation channels
271270
rc_interpolation_interval:null, // RC Control Interpolation Interval
272271
rc_smoothing_active_cutoffs:[null,null],// RC Smoothing active cutoffs
273-
rc_smoothing_auto_factor:null, // RC Smoothing auto factor
274272
rc_smoothing_cutoffs:[null, null], // RC Smoothing input and derivative cutoff
275273
rc_smoothing_filter_type:[null,null], // RC Smoothing input and derivative type
276274
rc_smoothing_rx_average:null, // RC Smoothing rx average readed in ms
@@ -372,7 +370,9 @@ var FlightLogParser = function(logData) {
372370
yaw_accel_limit : "yawRateAccelLimit",
373371
yaw_lowpass_hz : "yaw_lpf_hz",
374372
feedforward_transition : "ff_transition",
375-
feedforward_weight : "ff_weight"
373+
feedforward_weight : "ff_weight",
374+
rc_smoothing_auto_factor : "rc_smoothing_auto_factor_setpoint",
375+
rc_smoothing_type : "rc_smoothing_mode"
376376
},
377377

378378
frameTypes,
@@ -588,8 +588,7 @@ var FlightLogParser = function(logData) {
588588
case "gyro_cal_on_first_arm":
589589
case "vbat_pid_compensation":
590590
case "rc_smoothing":
591-
// case "rc_smoothing_auto_factor":
592-
// case "rc_smoothing_type":
591+
case "rc_smoothing_type":
593592
case "rc_smoothing_debug_axis":
594593
case "rc_smoothing_rx_average":
595594
case "rc_smoothing_mode": // 4.3 rc smoothing stuff
@@ -748,6 +747,7 @@ var FlightLogParser = function(logData) {
748747
case "velPID":
749748
case "motorOutput":
750749
case "rate_limits":
750+
case "rc_smoothing_cutoffs":
751751
case "rc_smoothing_active_cutoffs":
752752
case "rc_smoothing_active_cutoffs_ff_sp_thr":
753753
case "gyro_lowpass_dyn_hz":

js/header_dialog.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,10 @@ function HeaderDialog(dialog, onSave) {
6868
{name:'pidSumLimitYaw' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.3.0', max:'999.9.9'},
6969
{name:'rc_smoothing_type' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.4.0', max:'4.2.999'},
7070
{name:'antiGravityMode' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'999.9.9'},
71-
{name:'rc_smoothing_cutoffs_1' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'4.2.999'},
72-
{name:'rc_smoothing_cutoffs_2' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'4.2.999'},
73-
{name:'rc_smoothing_filter_type_1' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'4.2.999'},
74-
{name:'rc_smoothing_filter_type_1' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'4.2.999'},
7571
{name:'rc_smoothing_rx_average' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'999.9.9'},
7672
{name:'rc_smoothing_debug_axis' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'3.5.0', max:'999.9.9'},
7773
{name:'abs_control_gain' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'999.9.9'},
7874
{name:'use_integrated_yaw' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'999.9.9'},
79-
{name:'rc_smoothing_auto_factor' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'4.2.999'},
80-
{name:'rc_smoothing_active_cutoffs_1', type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'4.2.999'},
81-
{name:'rc_smoothing_active_cutoffs_2', type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'4.2.999'},
8275
{name:'rc_interpolation_channels' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.0.0', max:'4.2.999'},
8376
{name:'gyro_rpm_notch_harmonics' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
8477
{name:'gyro_rpm_notch_q' , type:FIRMWARE_TYPE_BETAFLIGHT, min:'4.1.0', max:'999.9.9'},
@@ -653,27 +646,37 @@ function HeaderDialog(dialog, onSave) {
653646

654647
setParameter('rcSmoothingRxAverage' ,sysConfig.rc_smoothing_rx_average, 3);
655648
renderSelect('rcSmoothingDebugAxis' ,sysConfig.rc_smoothing_debug_axis, RC_SMOOTHING_DEBUG_AXIS);
656-
// new in 4.3
657-
if (activeSysConfig.firmwareType == FIRMWARE_TYPE_BETAFLIGHT && semver.gte(activeSysConfig.firmwareVersion, '4.3.0')) {
649+
650+
if (activeSysConfig.firmwareType === FIRMWARE_TYPE_BETAFLIGHT && semver.gte(activeSysConfig.firmwareVersion, '4.3.0')) {
658651
renderSelect('rcSmoothingMode' ,sysConfig.rc_smoothing_mode, RC_SMOOTHING_MODE);
659652
setParameter('rcSmoothingFeedforwardHz' ,sysConfig.rc_smoothing_feedforward_hz, 0);
660-
setParameter('rcSmoothingSetpointHz' ,sysConfig.rc_smoothing_setpoint_hz, 0);
661-
setParameter('rcSmoothingAutoFactorSetpoint',sysConfig.rc_smoothing_auto_factor_setpoint, 0);
653+
setParameter('rcSmoothingSetpointHz' ,sysConfig.rc_smoothing_setpoint_hz, 0);
654+
setParameter('rcSmoothingAutoFactorSetpoint',sysConfig.rc_smoothing_auto_factor_setpoint, 0)
662655
setParameter('rcSmoothingThrottleHz' ,sysConfig.rc_smoothing_throttle_hz, 0);
663656
setParameter('rcSmoothingAutoFactorThrottle',sysConfig.rc_smoothing_auto_factor_throttle, 0);
664657
setParameter('rcSmoothingActiveCutoffsFf' ,sysConfig.rc_smoothing_active_cutoffs_ff_sp_thr[0], 0);
665658
setParameter('rcSmoothingActiveCutoffsSp' ,sysConfig.rc_smoothing_active_cutoffs_ff_sp_thr[1], 0);
666659
setParameter('rcSmoothingActiveCutoffsThr' ,sysConfig.rc_smoothing_active_cutoffs_ff_sp_thr[2], 0);
660+
} else if (activeSysConfig.firmwareType === FIRMWARE_TYPE_BETAFLIGHT && semver.gte(activeSysConfig.firmwareVersion, '3.4.0')) {
661+
renderSelect('rcSmoothingMode' ,sysConfig.rc_smoothing_mode, RC_SMOOTHING_TYPE);
662+
setParameter('rcSmoothingFeedforwardHz' ,sysConfig.rc_smoothing_cutoffs[0], 0);
663+
setParameter('rcSmoothingSetpointHz' ,sysConfig.rc_smoothing_cutoffs[1], 0);
664+
setParameter('rcSmoothingAutoFactorSetpoint',sysConfig.rc_smoothing_auto_factor_setpoint, 0);
665+
setParameter('rcSmoothingThrottleHz' ,sysConfig.rc_smoothing_cutoffs[1], 0);
666+
setParameter('rcSmoothingAutoFactorThrottle',sysConfig.rc_smoothing_auto_factor_setpoint, 0);
667+
setParameter('rcSmoothingActiveCutoffsFf' ,sysConfig.rc_smoothing_active_cutoffs[0], 0);
668+
setParameter('rcSmoothingActiveCutoffsSp' ,sysConfig.rc_smoothing_active_cutoffs[1], 0);
669+
setParameter('rcSmoothingActiveCutoffsThr' ,sysConfig.rc_smoothing_active_cutoffs[1], 0);
667670
} else {
668671
renderSelect('rcSmoothingMode' ,"0", 0);
669672
setParameter('rcSmoothingFeedforwardHz' ,"0", 0);
670673
setParameter('rcSmoothingSetpointHz' ,"0", 0);
671674
setParameter('rcSmoothingAutoFactorSetpoint',"0", 0);
672675
setParameter('rcSmoothingThrottleHz' ,"0", 0);
673676
setParameter('rcSmoothingAutoFactorThrottle',"0", 0);
674-
setParameter('rcSmoothingActiveCutoffsFf' ,sysConfig.rc_smoothing_active_cutoffs[1], 0);
675-
setParameter('rcSmoothingActiveCutoffsSp' ,sysConfig.rc_smoothing_active_cutoffs[0], 0);
676-
setParameter('rcSmoothingActiveCutoffsThr' ,sysConfig.rc_smoothing_active_cutoffs[0], 0);
677+
setParameter('rcSmoothingActiveCutoffsFf' ,"0", 0);
678+
setParameter('rcSmoothingActiveCutoffsSp' ,"0", 0);
679+
setParameter('rcSmoothingActiveCutoffsThr' ,"0", 0);
677680
}
678681

679682
// D_MIN and rate_limits

0 commit comments

Comments
 (0)