1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00
Commit graph

179 commits

Author SHA1 Message Date
jflyper
23e18069ff Fix bad range for 3d_deadband_throttle 2018-06-23 09:13:41 +09:00
Thorsten Laux
fefedbd686 attempts to improve relax
attempts to improve relax fix

attempts to improve relax fix

bug fixes

spaces

changed settings and added isAirmodeActive()

fix rebase error
2018-06-08 21:01:46 +12:00
mikeller
a373204d7a Added validation checks for interpolation settings, made throttle boost conditional. 2018-06-05 18:38:57 +12:00
mikeller
9738a1cdd2 Added more options for RC interpolation channel selection. 2018-06-04 22:41:54 +12:00
Bruce Luckcuck
7e18d7c1b9 Make filter type selectable and add BIQUAD
Adds options to select the filter type for both input and derivative.
rc_smoothing_input_type = PT1 | BIQUAD (default is BIQUAD)
rc_smoothing_derivative_type = OFF | PT1 | BIQUAD (default is OFF)
2018-06-03 21:52:15 -04:00
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
mikeller
a9c1f02afb Added RSSI offset to complement RSSI scaling. 2018-06-03 21:45:55 +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
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
011711c0c1
Merge pull request #5998 from Cleric-K/failsafe-mode-switch
Failsafe switch choosable behavior
2018-05-31 23:15:51 +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
Thorsten Laux
bd289121fc absolute control feature 2018-05-30 23:04:26 +02:00
Michael Keller
d330ad519e
Merge pull request #6004 from mikeller/add_esc_sensor_offset
Added offset parameter to ESC sensor current calculation to compensate for non-ESC consumption.
2018-05-30 22:45:50 +12:00
Bruce Luckcuck
2384088855 Requested changes, cleanup and control logic updates
Also added a new parameter acro_trainer_gain to allow adjustments to the limiting strength.
2018-05-29 21:08:19 -04:00
Bruce Luckcuck
9b43839052 Acro trainer
Adds a new angle limiting mode for pilots who are learning to fly in acro mode. Primarily targeted at new LOS acro pilots, but can be used with FPV as well.

The feature is activated with a new mode named "ACRO TRAINER". When the feature is active, the craft will fly in normal acro mode but will limit roll/pitch axes so that they don't exceed the configured angle limit. New pilots can start with a small angle limit and progressively increase as their skills improve.

The accelerometer must be enabled for the feature to be configured and function.

Also the feature will only be active while in acro flight and will disable if ANGLE or HORIZON modes are selected.

For most users all they need to do is simply configure the new mode to be active as desired on the "Modes" tab in the configurator and configure the desired angle limit in the cli.

Configuration parameters:

acro_trainer_angle_limit: (range 10-80) Angle limit in degrees.

acro_trainer_lookahead_ms: (range 10-200) Time in milliseconds that the logic will "look ahead" to help minimize overshoot and bounce-back if the limit is approached at high gyro rates. The default value of 50 should be good for most users. For low powered or unresponsive craft (micros or brushed) it may be helpful to increase this setting if you're seeing substantial overshoot.

acro_trainer_debug_axis: (ROLL, PITCH) The axis that will log information if debugging is active.

To enable debugging:
set debug_mode = ACRO_TRAINER

debug(0) - Current angle
debug(1) - The internal logic state
debug(2) - Modified setpoint
debug(3) - Projected angle based gyro rate and lookahead period
2018-05-29 21:08:16 -04:00
Michael Keller
2fccb2b9b7 Fix from review. 2018-05-30 12:56:30 +12:00
Michael Keller
eecb59db45
Merge pull request #5963 from joelucid/iterm_relax
ITerm relax feature
2018-05-30 09:32:21 +12:00
Cleric-K
e17abc4063 Failsafe switch choosable behavior #5994
The `failsafe_kill_switch` parameter has been renamed to
`failsafe_switch_mode` and it determines what happens
when the Failsafe mode is activated with an AUX switch.
It takes one of three values:
  0 - simulates RC signal loss - thus activates Stage1 failsafe
      (former behavior when kill switch option was OFF)
  1 - disarms immediately
      (former behavior when kill switch option was ON)
  2 - activates the failsafe procedure (Stage2) immediately (new)
2018-05-29 23:28:09 +03:00
mikeller
ab916d16b2 Added beacon config printing. 2018-05-30 01:20:33 +12:00
mikeller
2c3bf6ad2d Removed 'PREFERRED' beeper settings. 2018-05-30 00:50:55 +12:00
mikeller
a0dd12db42 Added option 'disable_rx_loss_dshot_beacon' to stop RX loss Dshot beacon from working. 2018-05-30 00:50:55 +12:00
mikeller
670cd49bd6 Added offset parameter to ESC sensor current calculation to compensate for non-ESC consumption. 2018-05-30 00:38:33 +12:00
AJ Christensen
a63c8b0079 gyro & d-term filters: remove filtering options except biquad/pt1
* through extensive testing prior to the beginning of the RC cycle, we have
  discovered that the simplest combination of filters appears to be up to four
  PT1 filters: two for gyro, and two for d-term.
* non-cascaded biquad filter plumbing is retained for noisy setups and the
  dynamic notch bandpass, although gyro and d-term variants of the filtering may
  eventually be removed in favor of pt1
* update all related unit tests
2018-05-29 10:54:46 +12:00
Thorsten Laux
6239b8258a make itermrelax on yaw optional 2018-05-28 16:41:05 +02:00
Thorsten Laux
32748a328a ITerm relax feature 2018-05-28 16:37:41 +02:00
Michael Keller
418fd4beaa
Merge pull request #5990 from jflyper/bfdev-create-pg-rxSpiConfig
Add basic SPI RX configurability
2018-05-29 00:17:21 +12:00
jflyper
560af0b6ff Add SPI bus configurability 2018-05-27 20:30:06 +09:00
Michael Keller
a6d667eb48
Merge pull request #5980 from mikeller/add_osd_core_temperature_warning
Added warning for core temperature to OSD.
2018-05-27 21:38:51 +12:00
Michael Keller
5c3599a028
Merge pull request #5962 from joelucid/pid_ff
If P and FF have same sign take larger one
2018-05-27 21:36:23 +12:00
jflyper
1a035aa0f3 Create a pg for rxSpiConfig 2018-05-27 13:13:20 +09:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
mikeller
dbebec5c1e Fixed capitals in parameter names. 2018-05-27 01:32:13 +12:00
mikeller
88b6751c91 Added warning for core temperature to OSD. 2018-05-27 01:28:27 +12:00
mikeller
d535fd6180 Renamed 'gpsRescue' to 'gpsRescueConfig' and moved it into the appropriate location. 2018-05-26 15:28:08 +12:00
Michael Keller
69a80a3bb0
Merge pull request #5965 from loopur/mybranch
Add barometer sensor QMP6988
2018-05-25 15:54:47 +12:00
Thorsten Laux
5aad57c3a7 add smart_feedforward config setting 2018-05-24 21:55:49 +02:00
Michael Keller
71a1a9789a
Merge pull request #5945 from supiiik/master
New calculation method for Dterm setpoint weight
2018-05-24 21:16:55 +12:00
Michael Keller
e605b497e8
Merge pull request #5932 from etracer65/gyro_cal_settings
Make gyro calibration period user configurable and rename moron_threshold
2018-05-24 21:13:47 +12:00
Curtis Bangert
9e78509041 Linear Buffer for CRSF CMS display port 2018-05-23 09:18:34 -04:00
Bruce Luckcuck
8f6f4bf4c4 Make gyro calibration period user configurable and rename moron_threshold
Gryo calibration period can be configured in 1/100 second intervals using `gyro_calib_duration` (default is 125 or 1.25 seconds).

Renamed the `moron_threshold` parameter to `gyro_calib_noise_limit`. Functionally it is unchanged.
2018-05-23 07:14:52 -04:00
supiiik
76e3e7aded dterm_setpoint_weight to uint16_t
dterm_setpoint_weight changet to uint16 with limit 0-2000
2018-05-23 08:39:45 +02:00
s0up
ac6b8088c9 add gps rescue mode 2018-05-20 16:28:17 -07:00
Loopur
495cfb4d07 Add barometer sensor QMP6988 2018-05-18 16:26:07 +08:00
Bruce Luckcuck
0916d117b8 Add OSD warning options as cli parameters
Previously only a single bitmapped parameter was available in the cli but this wasn't very useful as the users would have to understand the bit positions to enable/disable warning options. This change exposes each warning item as a separate parameter.
2018-05-11 20:06:34 -04:00
Michael Keller
7e6ba60d7d
Merge pull request #5831 from etracer65/osd_stats_reorder
Changes to support enhancements to BFC for OSD stats field ordering
2018-05-12 12:00:34 +12:00
s0up
de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
Bruce Luckcuck
5687e66f45 Changes to support enhancements to BFC for OSD stats field ordering
Reorder the stats field enumeration to match the actual on-screen display order. Needed to support changes in the configurator so that it will also disply the selections in the same order.

Going forward if there are any changes to the on-screen display order of the post-flight statistics then the enumeration must be updated to match.
2018-05-08 08:59:27 -04:00
Michael Keller
fa6c993f04
Merge pull request #5847 from mikeller/remove_telemetry_switch
Removed 'tlm_switch', replaced with 'isModeActivationConditionPresent(BOXTELEMETRY)'.
2018-05-08 23:41:16 +12:00
Bruce Luckcuck
905f14d86c Change enabled OSD stats storage to bitmap
Previously the flags controlling the enabled OSD stats were stored as an array of boolean. This change reduces config storage by storing the flags as bits inside a single uint32.
2018-05-07 12:07:25 -04:00