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

736 commits

Author SHA1 Message Date
Michael Keller
01e0c95810
Merge pull request #7952 from jirif/vbat_digits
Show only 3 significant digits in vbat OSD element
2019-04-16 00:17:23 +12:00
blckmn
4cb1f6509c Adding ability to specify a string as an option in the SET / GET setup 2019-04-15 14:52:10 +10:00
jirif
5d30b3f437 Show only 3 significant digits in vbat OSD element 2019-04-14 15:41:44 +02:00
Tony Cabello
d829563179 GPS Rescue procedure can be aborted by moving sticks, with a configurable delay after recovering rx 2019-04-14 14:15:17 +02:00
Michael Keller
e12b802bb1
Merge pull request #7927 from krzysztofmatula/km-odometer
Flight statistics (odometer) added.
2019-04-14 21:49:31 +12:00
Michael Keller
b468b94995
Merge pull request #7924 from mikeller/add_crash_recovery_disarm
Added 'disarm' option to crash recovery.
2019-04-14 21:49:05 +12:00
Michael Keller
c3d828e4b4
Merge pull request #7737 from joelucid/remove_ff
remove smart_feedforward
2019-04-14 21:32:39 +12:00
Krzysztof Matula
a0b410b902 unit tests update 2019-04-06 21:14:17 +02:00
mikeller
760a524027 Fixed tests, added crash indication. 2019-04-05 08:39:23 +13:00
mikeller
e44f75b4a7 Fixed gyro detection for multi gyro setups. 2019-04-04 00:39:55 +13:00
Bruce Luckcuck
138f403204 Fix OSD stats alignment and formatting
Fixes the alignment and formatting of the following stats:
* Max altitude
* Max speed
* Max ESC temperature
2019-03-26 13:37:21 -04:00
Thorsten Laux
11c21368c8 remove smart_feedforward 2019-03-08 06:49:09 +01:00
mikeller
b578801208 Fixed conditional scope.
Fix unit tests.
2019-03-08 12:46:48 +13:00
Michael Keller
d8644789e9
Merge pull request #7684 from ctzsnooze/iterm-reset-setpoint-mode-improvements
iterm_relax setpoint mode update
2019-03-07 03:47:38 +13:00
Michael Keller
2b9880f71b
Merge pull request #7497 from azolyoung/optimization_initialize_logic
add feature & protocolVersion cli setting
2019-03-04 15:11:50 +13:00
azolyoung
fcf784b4a1 add feature & protocolVersion cli setting 2019-03-04 09:16:34 +08:00
mikeller
1c05c7ead6 Added Spektrum SPI driver. 2019-03-03 14:54:38 +13:00
ctzsnooze
0f8c85ad0d Update unit test values for higher relax threshold
Update unit test values for higher relax threshold
2019-03-03 11:34:07 +11:00
mikeller
03dc1a1aee Fixed tests. 2019-02-28 19:52:11 +13:00
ctzsnooze
1d998ea404 iTermRelaxFactor now only attenuates amount added
The original setpoint based iTerm Relax code attenuated the amount of iTerm added per loop by a relax factor based on an HPF of setpoint.
At some point the code was re-factored and the relax factor multiplied the accumulating iterm error itself, such that almost any relax factor below 1.0 would quickly zero out iTerm.
This was bad for racing because when making sustained tight turns, I would abrubtly be zeroed when the setpoint for the starting of some relax was close to the threshold.
This was never the intent of the original proposal, which was for a smoother attenuation of iTerm, and for retention of some accumulation of iTerm during spirals around poles etc.
This PR fixes that error.
It also changes the default threshold up from 30 deg/s to 40 deg/s which better suits racing.
Also included us a form of simple cutoff independence. In the initial form, lowering cutoff would reduce the effectiveness but draw out the duration.  Now cutoff only really affects duration.
Lower cutoff values are better for quads with greater motor delay, faster values are better for quicker quads. For most of my quads a cutoff of 30 works best.
I've also removed newlines.

set to current cutoff maybe fix unit test

default cutoff set to current value

in unit test add itermRelaxSetpointThreshold as float

in unit test add itermRelaxSetpointThreshold as float, because ITERM_RELAX_SETPOINT_THRESHOLD doesn't exist any more

Move itermRelaxFactor limit, remove from fast ram

remove unncessary max, revert unit test changes, restore original defaults.

remove max from debug
restore old defaults and revert unit test changes temporarily to see if will pass unit test with defaults

whoops

lets see if unit test passes when cutoff is 20

lets see if unit test passes when cutoff is 20
2019-02-28 19:51:50 +13:00
mikeller
f8103b8c86 Added DMA mapping (readonly for now), and enabled timer management for all F4 boards.
Converting the universal target as well.

Simplified timer management some.

Added F722 support for good measuer.

Fixed SITL, tests.

Cleanup after rebase.

Added support for all timer consumers and F7.

Fixed 'USE_DMA_SPEC' for F3, some cleanups.
2019-02-28 00:25:43 +13:00
Bruce Luckcuck
30672a37c5 Refactor OSD element display code
Remove the giant `select` block that contained all the code to generate the elements and transition them to individual functions called only when the element is active. Simplifies the code and results in a performance improvement as it's not necessary to fall through the large `select` statement for every element that will be drawn. The individual functions and the element to function mapping are moved to a new `osd_elements.c` file.

Moved the OSD related code files to a new `osd/` directory.

Also pre-analyze the active elements and only process those that are active. This also saves processing as it's not necessary to loop through all 50 or so elements when only a couple are active.

Various other cleanup and removal of stale or unnecessary code.

In the default configuration the element drawing phase of the OSD task is reduced from ~51us to ~35us - resulting in about a 30% decrease in processing time.
2019-02-21 14:03:25 -05:00
Bruce Luckcuck
02a368a8e7 Fix UNUSED() macro conflict with STM libraries
Added `#if !defined(` blocks around the `UNUSED()` definitions in the libraries to prevent conflicts.
2019-02-18 11:26:03 -05:00
Michael Keller
c73a2787ee
Merge pull request #7567 from fujin/RIP-32kHz-mode
Gyro Sensors: Remove 32kHz gyro sampling mode(s) and associated code
2019-02-14 19:45:14 +13:00
AJ Christensen
4fdee6ec1c Gyro Sensors: Remove 32kHz gyro sampling mode(s) and associated code 2019-02-13 22:41:21 +13:00
Hans Christian Olaussen
b8bfc7ce12 Change Pt1 cutoff from uint16_t to float 2019-02-12 22:34:16 +01:00
Bruce Luckcuck
87b077b59b Fix compiliation for F1 targets
Fix a missing MCU check for ADC devices and reduce the number of profiles/rateprofiles to 2 and 3 respectively to get the config under 2K.
2019-02-09 12:15:31 -05:00
Michael Keller
2c739346c6
Merge pull request #7547 from mikeller/fix_led_extreme_cpu_load
Fixed initialisation problem with LED_STRIP.
2019-02-08 19:55:55 +13:00
mikeller
9f8cafbf8b Fixed initialisation problem with LED_STRIP. 2019-02-08 12:29:57 +13:00
mikeller
b5908f5bab Applied 'USE_ACC' consistently. 2019-02-08 09:51:48 +13:00
Michael Keller
59ea4becb3
Merge pull request #7516 from mikeller/add_automatic_pid_profile_switching
Added battery cell count based automatic PID profile switching.
2019-02-08 09:28:07 +13:00
Michael Keller
9d621aa2c1
Merge pull request #7537 from mikeller/add_ws2811_single_colour_mode
Added single colour mode to WS2811 driver for RAM savings.
2019-02-07 23:54:35 +13:00
mikeller
37d0d402c8 Added single colour mode to WS2811 driver for RAM savings. 2019-02-06 12:04:34 +13:00
Bruce Luckcuck
42af168854 Optimize rc modes activation conditions processing
Analyze the rc modes activation conditions and only process configured entries. Previously the entire possible list was processed even though typically only a handful are configured.

Reduces the RX task processing time by about 25% (~44us to ~33us) with an average setup of 3 modes configured (F405, SBUS). Processing time savings will diminish as the user configures more modes. But typically far fewer than the maximum of 20 will be configured.
2019-02-05 16:05:16 -05:00
mikeller
e121e1e92b Separated LED_STRIP parameter groups, separated out LED_STRIP status mode code. 2019-02-05 08:39:42 +13:00
mikeller
299d96fdc7 Added battery cell count based automatic PID profile switching. 2019-02-04 13:15:43 +13:00
mikeller
4d8bf61d94 Improved CRSF flight mode reporting. 2019-02-02 21:15:32 +13:00
Michael Keller
bbedb60fe2
Merge pull request #7476 from mikeller/add_stick_overlay_symbols
Changed OSD stick overlay to use custom symbols.
2019-01-28 20:17:10 +13:00
mikeller
95eb87b678 Changed OSD stick overlay to use custom symbols. 2019-01-28 00:53:02 +13:00
mikeller
38e1ce04df Reorganised interfaces, putting them where they are used. 2019-01-27 13:38:22 +13:00
Tony Cabello
a0604dd1a5 Reordered Max Altitude and Total Distance in stats screen 2019-01-22 17:08:55 +01:00
Michael Keller
f097df6fbd
Merge pull request #7438 from mikeller/fix_ledstrip_unit_tests
Fixed unit tests using 'ledstrip.c'.
2019-01-22 18:10:56 +13:00
Michael Keller
aaad98ecc3
Merge pull request #7435 from etracer65/use_fabsf_for_floats
Use fabsf() instead of ABS() for floats
2019-01-21 11:34:47 +13:00
mikeller
18496fe745 Fixed unit tests using 'ledstrip.c'. 2019-01-21 01:01:05 +13:00
Bruce Luckcuck
3d671c7134 Use fabsf() instead of ABS() for floats
The ABS() macro doesn't handle -0 floats correctly. Also fabsf() is more efficient.
2019-01-19 14:15:54 -05:00
Bruce Luckcuck
d867aeced3 Move anti-windup iterm reset from rx loop to pid loop
Having the iterm resetting happening in the rx loop causes a sawtooth PID/motor effect while idling since the PID loop is running at a much higher rate and iterm is allowed to grow during this, and then only reset at a much lower rate in the rx loop. This can potentially lead to some oscillation and/or resonance while idling before takeoff as the sawtooth signal can make it through to the motor outputs.
2019-01-19 11:18:24 -05:00
Pieter Kruger
4ec536a317 Add LED profile feature - 4278 2019-01-19 20:23:03 +10:00
Michael Keller
492d1f323e
Merge pull request #6809 from jflyper/bfdev-spi-transaction
Allow mixed speed and mode on a SPI bus
2019-01-14 09:23:50 +13:00
jflyper
343e9b3a67 Allow mixed speed and mode on a SPI bus by CR1 caching 2019-01-14 03:34:27 +09:00
Michael Keller
7f58ecc77f
Merge pull request #7294 from TonyBlit/gps_rescue_no_mag
Mag heading ignored while GPS Rescue is running
2019-01-13 23:14:06 +13:00