1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00
Commit graph

11634 commits

Author SHA1 Message Date
Bruce Luckcuck
826609e703 Experimental filter-based rc channel smoothing
Adds an additional rc channel smoothing algorithm that can be used in place of the default rc interpolation. Utilizing a filter-based approach the smoothing has lower latency and is immune to loop time jitter that can introduce artifacts.  Additionally a smoothing filter is added to the setpoint derivative used to produce D-term setpoint weight resulting in a smoother effect on D.

The default setting is to use the previous interpolation logic and there are no changes unless the optional method is selected.

Configuration:

rc_smoothing_type: (INTERPOLATION | FILTER) - defaults to INTERPOLATION

rc_smoothing_input_hz: (0-255) - sets the rc channel input filter cutoff in Hz. Default value of 0 will enable auto calculation based on received RX frame rate.

rc_smoothing_derivative_hz: (0-255) - sets the setpoint weight derivative filter cutoff in Hz. Default value of 0 will enable auto calculation based on received RX frame rate.

rc_smoothing_debug_axis: (ROLL | PITCH | YAW | THROTTLE) - determines which axis is logged in the debug fields

Debug logging:

set debug_mode = RC_SMOOTHING

debug(0) = raw un-smoothed rc channel data
debug(1) = raw un-smoothed setpoint derivative
debug(2) = filtered setpoint derivative before applied to setpoint weight
debug(3) = auto-calculated filter cutoff frequency base after sampling the rx frame rate

Notes:

Currently only enabled for F4/F7 due to flash size limitations

Uses the rc_inter_ch parameter to determine which channels are smoothed (same as default interpolation logic)

The auto filter cutoff calculation will set a cutoff frequency of 30Hz for typical SBUS frames (9ms).  11ms Spektrum will calculate to approximately 25Hz. The user can manually enter the filter cutoffs to be used instead of the auto calculation.  The current default calculation was chosen as a good starting point but may be adjusted in the future.

Setting a lower cutoff frequency will result in more smoothing, but also more delay.

There currently isn't any support for receivers that change their rx frame rate dynamically.  So for CRSF users wishing to use this alternate smoothing method should change their settings to lock the rx frame rate for now. Support for auto-adjusting to new frame rates in flight will likely be added.
2018-06-03 21:52:01 -04:00
Michael Keller
b21b626e12
Merge pull request #6024 from mikeller/add_filter_msp_and_defaults
Added defaults and MSP support to filter settings.
2018-06-04 11:28:29 +12:00
mikeller
15e9bb1b38 Removed TRANSPONDER support. 2018-06-04 11:25:24 +12:00
mikeller
df06b9b4cb Fixed tests. 2018-06-04 00:23:45 +12:00
mikeller
0c60821a7d Added USE_TRANSPONDER to SPRACINGF3 to match the default features. 2018-06-03 23:27:12 +12:00
Michael Keller
6bac0cd392
Merge pull request #6034 from Smeat/gps_alt_fix
Fix altitude task when using GPS only.
2018-06-03 23:03:07 +12:00
Michael Keller
1640f6179d
Merge pull request #6032 from mikeller/add_rssi_offset
Added RSSI offset to complement RSSI scaling.
2018-06-03 22:59:55 +12:00
mikeller
f32731638d Removed default changes from this pull request. 2018-06-03 22:44:42 +12:00
mikeller
75693fbd5b Added defaults and MSP support to filter settings. 2018-06-03 22:44:42 +12:00
Michael Keller
00a9feb0cd
Merge pull request #6029 from mikeller/fix_dshot_beacon
Fixed Dshot beacon activation conditions.
2018-06-03 22:43:57 +12:00
mikeller
fa24697df6 Make it terminate the string properly. 2018-06-03 22:43:12 +12:00
mikeller
0aba86ccb4 Converted it to fixed width. 2018-06-03 22:40:01 +12:00
mikeller
e30f1fadd9 Fixed OSD altitude display for negative altitude > -1. 2018-06-03 21:46:44 +12:00
mikeller
76a1e81d97 Removed extra parentheses. 2018-06-03 21:45:55 +12:00
mikeller
a9c1f02afb Added RSSI offset to complement RSSI scaling. 2018-06-03 21:45:55 +12:00
Kevin
ba0de59fc1 Fix altitude task when using GPS only. 2018-06-03 11:40:12 +02:00
Michael Keller
c1e88ae7f4
Merge pull request #6030 from mikeller/made_pid_improvements_conditional
Made new PID loop improvements conditional, disabled some for F3 to save flash space.
2018-06-03 21:23:15 +12:00
mikeller
a9b3911e03 Made new PID loop improvements conditional, disabled some for F3 to save flash space. 2018-06-03 17:07:10 +12:00
mikeller
834df547e6 Fixed Dshot beacon activation conditions. 2018-06-03 12:46:48 +12:00
Michael Keller
9d2c7fd105
Merge pull request #6023 from mikeller/fix_profile_dumping
Fixed dumping of profile values in CLI.
2018-06-03 12:18:57 +12:00
mikeller
227c08f94e Added profile / rateprofile info to 'get'. 2018-06-02 22:27:16 +12:00
mikeller
532e8afe61 Fixed dumping of profile values in CLI. 2018-06-02 21:01:22 +12:00
Michael Keller
c0d25b1296
Merge pull request #6014 from mikeller/fix_dshot_beacon_interference
Made Dshot commands work in a non-blocking way.
2018-06-02 11:12:45 +12:00
mikeller
51763a40f9 Made Dshot commands work in a non-blocking way. 2018-06-01 21:56:11 +12:00
Bryce Johnson
0045b36320 Added blocked dshot commands, Added post command delay
Moved the dshotcommand to happen in pwm_output_dshot.
Simplified the timing and repeats to happen on a group basis instead works better for dshotburst
2018-06-01 21:56:11 +12:00
Michael Keller
f37a8184d5
Merge pull request #5891 from mikeller/add_disable_rx_loss_dshot_beacon_option
Implemented 'beacon' command in CLI.
2018-06-01 21:51:57 +12:00
Michael Keller
9f28f87c97
Merge pull request #6013 from mikeller/fix_enum_in_pg
Reordered and optimised pidProfile parameter group.
2018-06-01 14:54:12 +12:00
Michael Keller
42b2e4077f
Merge pull request #5985 from mikeller/add_board_info
Added ability to set and check board info.
2018-06-01 07:50:59 +12:00
Michael Keller
6c9ec2625b
Merge pull request #5960 from mikeller/add_feature_freeze_announcement
Added announcement for feature freeze for 3.4.
2018-06-01 00:51:32 +12:00
mikeller
2ca07f7302 Fixed typo, BETAFLIGHTF3 flash overflow. 2018-06-01 00:48:21 +12:00
Michael Keller
c8184a93f6
Merge pull request #5796 from jamming/kakutef7Test
Kakutef7 IMU change
2018-06-01 00:34:52 +12:00
mikeller
c666fcfa17 Reordered and optimised pidProfile parameter group. 2018-05-31 23:51:31 +12:00
mikeller
cedf2a1b45 Disabled on AIORACERF3 because of flash overflow. 2018-05-31 23:27:50 +12:00
mikeller
f17567491f Fixes from review. 2018-05-31 23:25:03 +12:00
mikeller
467a490a53 Ensured board info is preserved through invalid EEPROM version triggered reset. 2018-05-31 23:25:03 +12:00
mikeller
432f330e60 Fixes from review. 2018-05-31 23:25:03 +12:00
mikeller
b4c44d8a46 Fixed writing of empty signature. 2018-05-31 23:25:03 +12:00
mikeller
0bf4708033 Added support for signing board / serial number. 2018-05-31 23:25:03 +12:00
mikeller
1a2c129306 Fixed build for SPRACINGF3OSD. 2018-05-31 23:25:03 +12:00
mikeller
6131ac1449 Fixed tests. 2018-05-31 23:25:03 +12:00
mikeller
a101a58b68 Added ability to set and check board info. 2018-05-31 23:25:03 +12:00
Michael Keller
011711c0c1
Merge pull request #5998 from Cleric-K/failsafe-mode-switch
Failsafe switch choosable behavior
2018-05-31 23:15:51 +12:00
mikeller
f307bf3134 Fixed build for exotic targets. 2018-05-31 19:43:46 +12:00
Michael Keller
f013debb2d
Merge pull request #6008 from McGiverGim/gps_use_galileo
Add Galileo support to GPS
2018-05-31 19:33:53 +12:00
Miguel Angel Mulero Martinez
f43b36ce19 Add Galileo support to GPS 2018-05-31 08:20:58 +02:00
Michael Keller
ad7a847275
Updates from review. 2018-05-31 13:02:12 +12:00
Michael Keller
21f9e6b8ed
Updates from review. 2018-05-31 13:01:52 +12:00
Michael Keller
855639049c
Updates from review. 2018-05-31 13:00:58 +12:00
Michael Keller
74c824c6b3
Merge pull request #5968 from joelucid/absolute_control
Absolute control
2018-05-31 11:02:06 +12:00
Michael Keller
07dfbd7b62
Merge pull request #6001 from mikeller/make_rssi_scalable
Make all RSSI sources scalable.
2018-05-31 10:59:32 +12:00