1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00
Commit graph

11670 commits

Author SHA1 Message Date
MJ666
533235619d Add UART3 to configuration to be used in absense of the SDCard. 2018-05-30 07:23:14 +02:00
MJ666
2fa03df7c4 AlienFlightNG F7 OSD support (AFNG F7 Horus30) 2018-05-30 07:23:12 +02:00
Bruce Luckcuck
ad067ee09a Overshoot logic updates, disable for GPS Rescue, constrain max setpoint
Updates for finalize the flight performance.

Disable if GPS Rescue is active

Constrain the max setpoint calculated by the angle correction logic. To catch border cases where the user activates the feature while inverted and has a high gain which could result in excessively high setpoint rates.

Make sure internal states are reset when feature is activated via mode switch.
2018-05-29 21:08:19 -04: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
Michael Keller
3d24eb1a68
Merge pull request #6005 from jflyper/bfdev-increase-SPI_PREINIT_IPU_COUNT
Increase SPI_PREINIT_IPU_COUNT to accommodate I/O rich boards
2018-05-30 09:28:36 +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
jflyper
6402ebf5b8 Increase SPI_PREINIT_IPU_COUNT 2018-05-30 01:50:54 +09:00
Thorsten Laux
dc929baf75 make itermRelax into enum 2018-05-29 16:40:23 +02:00
borisbstyle
2161c68778
Merge pull request #5975 from fujin/minimize-filter-choices
gyro & d-term filters: remove filtering options except biquad/pt1
2018-05-29 15:56:53 +02: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
e75eaf85ce Fixed tests. 2018-05-30 00:45:45 +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
mikeller
d401e3bbbe Fix usages, scaling. 2018-05-29 23:08:26 +12:00
Michael Keller
b2f7aa3c36
Merge pull request #5999 from etracer65/osd_flash_reduction
Reduce flash usage in OSD element display logic
2018-05-29 13:02:03 +12:00
Michael Keller
9a7c863c3c Make all RSSI sources scalable. 2018-05-29 12:28:05 +12:00
Bruce Luckcuck
012058a9bc Reduce flash usage in OSD element display logic
Saves 132 bytes of flash.
2018-05-28 19:54:47 -04:00
Michael Keller
e0aa43b259
Merge pull request #5991 from mikeller/reset_config_on_pg_changes
Reset the entire config when parameter groups have changed.
2018-05-29 11:12:42 +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
5bdc2ead61 make itermRelax an uint8_t 2018-05-28 16:44:13 +02:00
Thorsten Laux
6239b8258a make itermrelax on yaw optional 2018-05-28 16:41:05 +02:00
Thorsten Laux
7e12e9da18 don't link debug.c to pid unit test 2018-05-28 16:40:09 +02:00
Thorsten Laux
2c02c14a1d debug log only roll and pitch, but separately 2018-05-28 16:40:09 +02:00
Thorsten Laux
5a1d84cdae incorporate style feedback 2018-05-28 16:40:08 +02:00
Thorsten Laux
0086932946 address style requests 2018-05-28 16:39:43 +02:00
Thorsten Laux
e1ff2566c6 make unit tests happy 2018-05-28 16:37:41 +02:00
Thorsten Laux
791c584d81 add debug option DEBUG_ITERM_RELAX 2018-05-28 16:37:41 +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
Michael Keller
2139d8db92
Merge pull request #5997 from mikeller/fix_rg_ssd_f3_overflow
Fixed flash overflow on RG_SSD_F3 and FURYF3OSD.
2018-05-29 00:15:07 +12:00
mikeller
29cd161f71 Removed features from FURYF3OSD too. 2018-05-28 23:24:11 +12:00
Michael Keller
25903ca7bb Fixed flash overflow on RG_SSD_F3. 2018-05-28 13:53:43 +12:00
Michael Keller
e010da0243
Merge pull request #5995 from mikeller/fix_omnibus_overflow
Fixed flash overflow for OMNIBUS.
2018-05-28 12:38:58 +12:00
Michael Keller
a1dc7d091f Fixed flash overflow for OMNIBUS. 2018-05-28 12:02:39 +12:00
Michael Keller
95d725d9f8
Merge pull request #5988 from mikeller/fix_luxv2_race_flash_overflow
Fixed flash overflow in LUXV2_RACE.
2018-05-28 10:47:08 +12:00
Michael Keller
0bb6ab11e4
Merge pull request #5989 from mikeller/cleanup_cli_printing
Cleaned up CLI output generation, added 'cliPrintErrorLinef'.
2018-05-28 10:46:51 +12:00
Michael Keller
4bce480fbd
Merge pull request #5992 from etracer65/stick_disarm_fix
Fix yaw reset and throttle angle correction to be before rc interpolation
2018-05-28 10:40:49 +12:00
Bruce Luckcuck
fc67a40127 Changed subTaskRcCommand() to be FAST_CODE_NOINLINE
Previously the code in subTaskRcCommand() was part of subTaskMainSubprocesses() which is set to FAST_CODE_NOINLINE.  When it was split out into a separate function it inherited FAST_CODE from taskMainPidLoop() which made it get inlined and caused ITCM_RAM overflow.
2018-05-27 10:40:39 -04:00
Bruce Luckcuck
89a1aa7cc6 Fix yaw reset and throttle angle correction to be before rc interpolation
In #5905 the ordering of rc interpolation processing was moved out of subTaskMainSubprocesses() and into a separate subTaskRcCommand() process that ran earlier in the PID loop. Previously the logic to handle stick arming yaw reset was immediately before the rc interpolation logic and after the previous change it ran later in the process and after rc interpolation.

This fix moves the related throttle/yaw processing into the subTaskRcCommand() before rc interpolation to match the ordering that existed previously.  The fixes introduced by #5905 (throttle spikes) are still retained.
2018-05-27 08:16:13 -04:00
Michael Keller
823c761c01
Merge pull request #5986 from mikeller/fix_cli_typo
Fixed typo in CLI.
2018-05-27 23:54:00 +12:00
jflyper
560af0b6ff Add SPI bus configurability 2018-05-27 20:30:06 +09:00
Michael Keller
4ac5bf69a5
Merge pull request #5984 from mikeller/fix_typo
Fixed typo in 'Makefile'.
2018-05-27 21:57:36 +12:00
mikeller
25118867fc Fixed SPRACINGF3OSD. 2018-05-27 21:47:18 +12:00
Michael Keller
0af4789d6d
Merge pull request #5983 from mikeller/add_pid_audio_check
Added check to establish that PID audio is configured.
2018-05-27 21:39:07 +12: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