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

10947 commits

Author SHA1 Message Date
Michael Keller
2aeedced6b
Merge pull request #7675 from czchc/set_usb_detect_pin_ipd
set usbDetectPin to input pull down
2019-03-01 20:20:17 +13:00
Dave Huber
fbe42a0646 Updated mode logic to work more intuitively
Any OR macs OR all AND macs required to activate mode
2019-02-28 20:01:42 -06:00
mikeller
1f0ab65c44 Fixed LED_STRIP and TRANSPONDER. 2019-03-01 04:53:32 +13:00
mikeller
060759d9f1 Added STM32F745 unified target. 2019-03-01 04:21:03 +13:00
mikeller
6cacaf00a1 Added STM32F411 unified target. 2019-03-01 03:31:49 +13:00
mikeller
de8f4028e3 Added support for F411, F446, F745, F765.
Added MATEKSYSF411 target config.

Added CRAZYBEEF4FR unified config.
2019-03-01 02:44:23 +13:00
Michael Keller
1507cc880c
Merge pull request #7667 from mikeller/fix_vtx_tramp_warning
Fixed VTX tramp unconfigured warning when VTX tables are not enabled.
2019-03-01 02:07:47 +13:00
Michael Keller
fc9b39ddd7
Merge pull request #7652 from ctzsnooze/itermRelax-Setpoint-Fix
iTermRelaxFactor fixed to only attenuate amount added to I each loop
2019-03-01 01:53:03 +13:00
mikeller
319dd7e109 Fixed 'cliPrintErrorLinef'. 2019-03-01 01:47:48 +13:00
mikeller
e65c0f890e Fixed DMA option index check. 2019-02-28 20:27:04 +13:00
czchc
148ee91b1f set usbDetectPin to input pull down 2019-02-28 14:54:38 +08: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
31425f5171 Made DMA options configurable. 2019-02-28 02:20:43 +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
Michael Keller
6a41cdb914 Temporarily disable SPI transactions for the 4.0 release. 2019-02-27 19:55:51 +13:00
Michael Keller
846888038b
Merge pull request #7664 from mikeller/temporarily_disable_vtx_tables
Temporarily disable VTX tables for the 4.0 release.
2019-02-27 19:53:52 +13:00
Michael Keller
ff28ccc328
Merge pull request #7660 from etracer65/fix_kiwif4_use_acc
Add missing USE_ACC to KIWIF4, KIWIF4V2 and PLUMF4 targets
2019-02-27 06:16:00 +13:00
mikeller
c89ee81fff Fixed VTX tramp unconfigured warning when VTX tables are not enabled. 2019-02-27 06:06:42 +13:00
mikeller
d3745d7e31 Removed 'size' parameter from 'pgResetFunc'. 2019-02-26 22:37:16 +13:00
Michael Keller
dc6aad22c5
Merge pull request #7650 from 4712betaflight/serial-4way-if-v20003
Increase serial-4way-if version number
2019-02-26 14:38:16 +13:00
Michael Keller
56d55c9b8c
Merge pull request #7651 from etracer65/tramp_cms_config_msg_fix
Fix logic for tramp CMS "PLEASE CONFIGURE VTXTABLE" message
2019-02-26 14:38:00 +13:00
Michael Keller
d00fb6d61c Temporarily disable VTX tables for the 4.0 release. 2019-02-26 13:02:00 +13:00
Bruce Luckcuck
fe15ded26b Add missing USE_ACC to KIWIF4, KIWIF4V2 and PLUMF4 targets 2019-02-25 10:07:22 -05:00
Michael Keller
94bf95bf3c
Merge pull request #7646 from etracer65/osd_handle_delayed_gps
Fix OSD active elements init logic to handle items with delayed activation
2019-02-25 19:49:59 +13:00
Michael Keller
93f933f01f Fixed build for gcc 8 (SITL). 2019-02-25 15:34:34 +13:00
Bruce Luckcuck
1fedac2b35 Fix logic for tramp CMS "PLEASE CONFIGURE VTXTABLE" message 2019-02-24 09:43:04 -05:00
4712
a51840ef6f Increase serial-4way-if version number 2019-02-24 12:38:42 +01:00
Michael Keller
b5fba14cb3
Merge pull request #7642 from mikeller/fix_missing_platform_includes
Fix missing 'platform.h' includes in compilation units, and make them stay away.
2019-02-24 22:25:18 +13:00
Michael Keller
40d6c44220
Merge pull request #7641 from etracer65/use_beeper_compile_warnings
Fix compile warnings when USE_BEEPER is not defined
2019-02-24 12:34:06 +13:00
Michael Keller
50a342232a
Merge pull request #7640 from 4712betaflight/serial-4way-if-v20003
Update serial 4way-if to v20003
2019-02-24 12:33:48 +13:00
Michael Keller
496f066394
Merge pull request #7606 from dthubereng/mode-links-and-ranges
Update activation masks with linked mode
2019-02-24 12:26:41 +13:00
Bruce Luckcuck
4a13c48adf Fix OSD active elements init logic to handle delayed items with delayed activation
Track the state of `sensors(SENSOR_GPS)` and rebuild the active OSD element list when it changes. The GPS sensor can have delayed activation or even deactivate if communication is lost with the module.

Also move the `BOXBLACKBOX` check from the initialization to the runtime element drawing as it can also change in flight.
2019-02-23 18:21:59 -05:00
mikeller
fad7ee3464 Fix missing 'platform.h' includes in compilation units, and make them stay away. 2019-02-23 17:49:25 +13:00
Michael Keller
9bf65ba628
Merge pull request #7638 from jflyper/bfdev-tramp-display-invalid-vtxtable-if-band-or-power-count-is-zero
[VTX, TRAMP] Display a message if band or power count is zero
2019-02-23 16:22:40 +13:00
Michael Keller
44a1dca99c
Merge pull request #7637 from AndersHoglund/spektrum_tm_fix_rpm
Spektrum TM. Fix RPM divide by zero problem.
2019-02-23 13:45:15 +13:00
Michael Keller
f2bbbdb8ca
Merge pull request #7636 from etracer65/use_esc_sensor_dependencies
Fix compilation errors if USE_ESC_SENSOR is not defined
2019-02-23 13:44:41 +13:00
Michael Keller
e22e7e1637
Merge pull request #7635 from mikeller/make_errors_spottable
Make errors in 'diff' / 'dump' easier to spot and parse.
2019-02-23 13:44:20 +13:00
Michael Keller
b1949de21c
Merge pull request #7634 from joelucid/rpm_filter_v3
Fix rpm telemetry pre-filtering
2019-02-23 13:44:01 +13:00
Michael Keller
d86310bea2
Merge pull request #7633 from mikeller/reorder_cli_diff
Put display name in CLI 'diff' in a better position.
2019-02-23 13:43:30 +13:00
Michael Keller
aed1e51cf6
Merge pull request #7632 from mikeller/rename_generic_target_unified_target
Renamed 'GENERIC_TARGET' to 'USE_UNIFIED_TARGET'.
2019-02-23 13:43:02 +13:00
Michael Keller
bd40489492
Merge pull request #7614 from etracer65/optimize_osd_elements_display
Refactor OSD element display code
2019-02-23 13:42:04 +13:00
Bruce Luckcuck
09b5adece4 Fix compile warnings when USE_BEEPER is not defined
If USE_BEEPER is undefined but the BEEPER_PIN or BEEPER_PWM_HZ are defined then there was a compile warning becasue they get redefined in beeper.c.
2019-02-22 16:54:41 -05:00
4712
c7357e06d4 Update serial 4way-if to v20003
Added STM23L431x and STM32G071x MCU.
Increased timeout for flash erase.
2019-02-22 21:55:09 +01:00
jflyper
a66c03cafc Display a message if band or power count is zero 2019-02-22 11:41:33 +09:00
Anders Hoglund
0b4bbaa164 Spektrum TM. Fix RPM divide by zero problem. 2019-02-21 23:27:54 +01:00
Dave Huber
6a67972c6c Updated linked mode processing
Allows links and ranges in a single mode.
Code styling changes.
Add config validation for chained links (not allowed).
2019-02-21 14:45:52 -06:00
mikeller
ac6bbf7e40 Make 'unknown command' appear as an error as well. 2019-02-22 09:02:58 +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
Michael Keller
06d9f54f77
Merge pull request #7627 from hydra/bf-fix-test-cygwin-issue
TESTS - Prevent -pthread and --coverage from creating errors when building using clang on cygwin.
2019-02-22 04:52:59 +13:00