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

965 commits

Author SHA1 Message Date
Mathias Rasmussen
87c259a26e Fix use of floating point math functions 2021-12-21 04:18:59 +01:00
haslinghuis
b745eaf284
Merge pull request #11111 from SteveCEvans/cms_slider_ro
Make CMS fields readonly when overridden by a slider and mark with an S
2021-12-21 00:33:59 +01:00
ctzsnooze
aa4f0f7517
Merge pull request #10972 from SteveCEvans/ledstrip_dim
Add ledstrip_brightness to control LED strip brightness by percentage
2021-12-20 10:30:59 +11:00
ctzsnooze
db242cb161
Merge pull request #11033 from SteveCEvans/late_led_strip
Fix peaky task duration estimation
2021-12-20 10:27:05 +11:00
haslinghuis
282e9f6350
Merge pull request #11131 from klutvott123/remove-shared-msp-buffer
Remove shared MSP buffer
2021-12-18 00:29:13 +01:00
Steve Evans
29d221502e Use peak tracking as default for task duration estimation rather than a moving average 2021-12-17 22:09:52 +00:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
Hans Christian Olaussen
5f4ed614f1 Remove shared MSP buffer 2021-12-16 23:42:04 +01:00
Steve Evans
e8bf78178b No space in sizeof() as per Betaflight coding standard 2021-12-15 01:23:34 +00:00
Vladimir Kulbashevsky
222a607e3c MSP_over_CRSF changed with support of MSVv2 and Jumbo 2021-12-13 16:38:41 +02:00
Steve Evans
3de0d384ed Make CMS fields readonly when overridden by a slider and mark with an S 2021-12-12 16:34:02 +00:00
Štěpán Dalecký
40abe65bc0 Fix clang12 support on Linux/MacOS
Add support for clang 13
2021-10-04 22:11:58 +02:00
Steve Evans
fe12e356b9 Add ledstrip_brightness to control LED strip brightness by percentage 2021-09-30 23:21:21 +01:00
Štěpán Dalecký
fcd41eb28b Refactoring of rxFrameTimeUs 2021-09-28 16:06:58 +02:00
Steve Evans
d5f62be013 Trigger gyro SPI DMA reads in EXTI handler if supported and lock gyroTask loop to gyro to eliminate missed updates and jitter 2021-09-28 01:38:18 +13:00
ctzsnooze
99a7479b8c consistent gyro and dterm filter names 2021-09-27 09:12:00 +10:00
J Blackman
019ea9a2e9
Merge pull request #10907 from hydra/bf-debug-pin-fixes-1
Debug pin fixes and improvements.
2021-09-06 14:30:23 +10:00
ctzsnooze
5863015354 ifdef condition consistently applied, field names consistent, pg ID updated 2021-08-30 09:33:12 +10:00
ctzsnooze
28d9d778a6 feedforward transition moved to feedforward.c 2021-08-30 02:07:36 +10:00
Dominic Clifton
06e3eec915 Debug - Fix the NUCLEOH743 target_definition_unittest failure. 2021-08-18 17:11:55 +02:00
Hans Christian Olaussen
6dfb0de636 Fix crsf unit test 2021-07-31 22:00:00 +02:00
Steve Evans
87c8847c13 New SPI API supporting DMA
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc

Drop SPI clock during binding

Remove debug

Add per device SPI DMA enable

Fix sdioPinConfigure() declaration warning

Reduce clock speed during SPI RX initialisation
2021-07-25 12:40:25 +12:00
ctzsnooze
c26428232a msp and other small fixes 2021-05-25 08:29:32 +10:00
Michael Keller
b414be320f
Merge pull request #10727 from ctzsnooze/PT2-PT3-options-for-filters 2021-05-25 01:53:53 +12:00
Steve Evans
3087d10f53 Report task rate/Hz based on execution of whole state machine, not individual states where appropriate 2021-05-20 18:27:27 +01:00
Michael Keller
9f04b506b5
Merge pull request #10687 from SteveCEvans/ledstrip_task_time 2021-05-21 02:11:36 +12:00
Steve Evans
916c3501c5 Fix LEDSTRIP unit test 2021-05-20 00:18:30 +01:00
ctzsnooze
3b62b2e5d4 add PT2 and PT3 lowpass filter options 2021-05-18 09:59:27 +10:00
Michael Keller
55288dc2e1
Merge branch 'master' into tbs/crsfv3 2021-05-18 01:14:38 +12:00
Michael Keller
bcc9ff4f02
Merge pull request #10726 from TonyBlit/osd_sats_none 2021-05-18 00:58:32 +12:00
Michael Keller
dfcd11bd69
Merge pull request #10712 from mikeller/cleanup_matrix_rotation
Cleaned up matrix rotation.
2021-05-18 00:46:04 +12:00
ctzsnooze
636d563abe major rc changes ctzsnooze 2021 2021-05-07 14:40:43 +10:00
Tony Cabello Miguel
56cb320be0 OSD Test for Sats indicator fixed 2021-05-05 15:26:41 +02:00
Tony Cabello Miguel
561b15be70 WIP: Unit test for OSD Sats element 2021-05-05 10:27:03 +02:00
Tony Cabello Miguel
c56d81457f Fixed tests, replaced hyphen with NC 2021-05-05 08:55:50 +02:00
tbs-fpv
fbd01551ff support channel resolution configuration for 0x17 2021-04-28 11:21:30 +08:00
tbs-fpv
4d8845b8da Merge remote-tracking branch 'refs/remotes/official_bf/master'
Conflicts:
	src/main/rx/crsf.c
	src/test/unit/rx_crsf_unittest.cc
2021-04-28 11:15:00 +08:00
Hans Christian Olaussen
3177cb3ec0 Update unit tests 2021-04-26 15:14:59 +02:00
mikeller
55cf26ebbc Cleaned up matrix rotation. 2021-04-26 23:10:00 +12:00
tbs-fpv
565f23074f add unit test for crsfFrameCmdCRC 2021-04-26 17:09:32 +08:00
tbs-fpv
daf6043429 fix unit test build errors 2021-04-08 13:08:43 +08:00
Steve Evans
25fcacf4c5 Split rx processing into three states to eliminate cycle time jitter
Allow tasks with state machines to control which state determines task duration

Fix unit tests
2021-03-27 23:28:41 +00:00
Bruce Luckcuck
b5bf9c2b4c Add a common function used to print formatted floats in the OSD
Updated the OSD element and stats rendering code to use this fuction to print floating point values of varying precisions.

Will make adding OSD element variants that provide different decimal precisions (like voltage, amperage, etc.) easy to implement since all that needs to change is the `decimalPlaces` passed to the function. As an example, see the `osdFormatAltitudeString()` function.

If at some later date a more capable `printf` package is inplemented, then the guts of the `osdPrintFloat()` function could just be simplified while leaving the abstraction in place.
2021-02-17 08:09:52 -05:00
Michael Keller
d2867ef9ce
Merge pull request #10540 from etracer65/osd_warnings_msp
Separate OSD warnings from OSD task and make available via MSP
2021-02-17 07:52:37 +13:00
mikeller
ae4c260d74 Fixed use of an enum type in a parameter group. 2021-02-16 01:49:10 +13:00
Michael Keller
aeb2a4f381
Merge pull request #10516 from etracer65/level_mode_expo
Self-level modes expo
2021-02-14 17:25:16 +13:00
Bruce Luckcuck
84b6730cdd Separate OSD warnings from OSD task and make available via MSP
Provides a properly implemented way for MSP query type OSD implementations (like DJI) to display OSD warnings. Separates the warnings generation from the OSD task and shares common code to make the text available for the OSD and/or via MSP. Eliminates the need to implement hacks and workarounds like using the `CRAFT_NAME` field to display warnings. Since the warnings logic is now separate, the OSD task does not need to be running unlike other hacks.

Adds the `MSP2_GET_OSD_WARNINGS` message formatted as follows:
```
byte  description
0     Display attributes including blink (see displayPortAttr_e in drivers/display.h)
1     Length of warning text
2-n   Warning text characters
```
2021-02-13 14:11:38 -05:00
Michael Keller
29f6dd0c8d
Merge pull request #10417 from bobbycisneros/master 2021-02-08 16:40:54 +13:00
Robert Cisneros
9e5cdbf2be Enable Up/Down reference for artificial horizon in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD.  The arrow direction points in the direction of up or down.

Update osd_elements.c

Making the Up/Down OSD reference its own element

Removing the Up/Down reference from the artificial horizon and making a specific element for this feature.  Activation via CLI (for now)

Updates to Up/Down refernce OSD element

Changed the up/down reference so that it is its own separarte element.  The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.

Update cms_menu_osd.c

Updated file to add Up/Down reference selection from OSD menu

Updates to simplify/correct Up/Down OSD element

Simplified/corrected logic and removed arcsine function.  OSD up/down reference is now positionable by the user in the configurator.

Tweaks and codestyle updates

Feedback from Michael Keller

Updates to Up/Down OSD indicator

Created a bounding box of +/- 25 degrees for indicator

Coding style correction

minor correction to match BF coding style

Enable Up/Down reference in OSD

This mod adds an arrow symbol showing the location of the up/down on the OSD.  The arrow direction points in the direction of up or down.

Update osd_elements.c

Making the Up/Down OSD reference its own element

Removing the Up/Down reference from the artificial horizon and making a specific element for this feature.  Activation via CLI (for now)

Updates to Up/Down refernce OSD element

Changed the up/down reference so that it is its own separarte element.  The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.

Updates to simplify/correct Up/Down OSD element

Simplified/corrected logic and removed arcsine function.  OSD up/down reference is now positionable by the user in the configurator.

Tweaks and codestyle updates

Feedback from Michael Keller

Enable Up/Down reference for artificial horizon in OSD

This mod adds an arrow symbol showing the location of the up/down on the OSD.  The arrow direction points in the direction of up or down.

Update osd_elements.c

Making the Up/Down OSD reference its own element

Removing the Up/Down reference from the artificial horizon and making a specific element for this feature.  Activation via CLI (for now)

Updates to Up/Down refernce OSD element

Changed the up/down reference so that it is its own separarte element.  The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.

Updates to simplify/correct Up/Down OSD element

Simplified/corrected logic and removed arcsine function.  OSD up/down reference is now positionable by the user in the configurator.

Tweaks and codestyle updates

Feedback from Michael Keller

Coding style correction

minor correction to match BF coding style

Enable Up/Down reference for artificial horizon in OSD

This mod adds an arrow symbol showing the location of the up/down on the OSD.  The arrow direction points in the direction of up or down.

Update osd_elements.c

Making the Up/Down OSD reference its own element

Removing the Up/Down reference from the artificial horizon and making a specific element for this feature.  Activation via CLI (for now)

Updates to Up/Down refernce OSD element

Changed the up/down reference so that it is its own separarte element.  The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.

Updates to simplify/correct Up/Down OSD element

Simplified/corrected logic and removed arcsine function.  OSD up/down reference is now positionable by the user in the configurator.

Tweaks and codestyle updates

Feedback from Michael Keller

Corrections to unit tests

Corrected unit tests link failing due to not being able to find rMat[3][3]
2021-02-08 16:03:45 +13:00
Bruce Luckcuck
87f322927a Self-level modes expo
Adds angle setpoint roll/pitch expo for self-level modes.

Previously the angle setpoint was a simple linear calculation based on the stick deflection percentage and the angle limit. This makes control very jumpy around center stick and people would often resort to adding expo in their radios to compensate. This then adds the complication of wanting expo in the radio when in self-level but not when in acro - leading to complicated mixes, virtual switches, etc.

This PR adds separate self-level expo settings for roll/pitch so the user can customize the axis behavior. Yaw is excluded because this axis uses normal rates and expo controlling the rotational rate around the yaw axis and not an angle setpoint. The roll/pitch expo can range from 0 (off) to 100 (max) like other RC expo settings. For example:
```
set roll_level_expo = 30
set pitch_level_expo = 40
```
The default values are 0 which disables any expo and behaves as before.

The settings are available in the CMS rate profile menu.
2021-01-25 19:08:43 -05:00