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
mikeller
4ef9743d1b Fixed RX / telemetry port sharing for iBus. 2019-10-08 00:05:32 +13:00
Bruce Luckcuck
e1f10b0430 Optimize ledstrip DMA buffer update to reduce task processing time
Previous logic was updating updating the DMA buffer for all possible LED positions (32) regardless of how many were used. Since there are 24 bytes per LED, this performed a lot of unnecessary processing in cases where the user had less than 32 LEDs configured.

Also includes a bug fix in that if the LED count was decreased (like making changed using the Configurator LED tab), the now unused LEDs at the end of the string would remain on at the last color applied. Now they will be properly turned off. The bug was minor as it was resolved by a reboot, but made setup using the Configurator confusing since changes made are reflected when the user clicked the "Save" button (which does not reboot).
2019-09-05 16:10:19 -04:00
mikeller
1c8cfbd241 Extended configuration status to accommodate custom defaults. 2019-09-03 09:57:43 +12:00
mikeller
36dc7306e2 Merge branch 'fix_custom_defaults_addresses' into add_custom_defaults_to_msp 2019-09-01 20:03:57 +12:00
mikeller
772b249a3f Added support for resetting to custom defaults to MSP. 2019-09-01 14:26:57 +12:00
Michael Keller
c33cc100ec
Merge pull request #8759 from TonyBlit/3d_speed
Feature: show 3d speed on the OSD
2019-09-01 01:19:03 +12:00
Tony Cabello
0ddcfc097c Feature: show 3d speed on OSD 2019-08-30 08:21:19 +02:00
SteveCEvans
833e760f05 Split baro processing into a number of phases and use non-blocking deferred I2C accesses 2019-08-26 17:17:31 +01:00
Jakub
588166fa56 Fixed IBUS protocol for AFHDS 3 and latest AFHDS 2a receivers. 2019-08-23 20:08:54 +02:00
mikeller
2c8d197ccb Added support for custom defaults in sector 0. 2019-08-11 21:32:01 +12:00
mikeller
7518ec67f5 Experimental support for on-board custom defaults. 2019-08-11 21:32:01 +12:00
Thorsten Laux
91ad2498ff ff from interpolated setpoint 2019-08-08 09:50:18 +02:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Dominic Clifton
980df1536f Refactored arbitrary gyro and mag alignment.
The original implementation:

* removed the old 'alignment' variable
* did not require 'ALIGN_CUSTOM'
* always used rotation matrix
* had no additional per-pid-loop conditional logic.

Extract currently unused code into tests.
In preparation for either deleting or re-using in validateAndFixConfig.

Fix code style of some old boardalignment code.

De-duplicate vector rotation code.

Now that rotation code is exacted from `alignBoard` and now  doesn't use
`boardRotation` some if it was similar to the code in `rotateV` in
maths.c

Use DECIDEGREES for mag and gyro/acc custom alignments.

Use unnamed structure instead of `values`.

Redefine what 'custom' orientation means.

Move alignment test-only code into the tests.

Ensure gyro/mag custom alignment settings follow the enum variations.

This can't be applied to ALIGN_DEFAULT because, in the case of the MAG,
the default isn't actually known until the gyro is detected, see
`compassDetect`.

OMNIBUSF4/F7 - Don't use ALIGN_DEFAULT in target.h,
common_defaults_post.h does this now.

Comment cleanup.

Delete unused alignment code left from various tests/refactoring
efforts.

* Please do not squash this commit.

Fix SITL build by avoiding structure assignment with anonymous inner
struct.

The error from the build server was as follows:

```./src/main/common/sensor_alignment.c:49:5: error: missing initializer
for field ‘yaw’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
     *sensorAlignment = CUSTOM_ALIGN_CW0_DEG;
     ^
In file included from ./src/main/common/sensor_alignment.c:27:0:
./src/main/common/sensor_alignment.h:80:17: note: ‘yaw’ declared here
         int16_t yaw;
                 ^
```

Cleanup sensor_alignment API.
2019-07-13 11:51:20 +12:00
Dominic Clifton
53167b161f BMP388 - Add support for BMP388 barometer.
BMP388 - Move the static assert.

BMP388 - Build faster when the baro driver is not enabled.

BMP388 - Fix spi init due to changes in master.

BMP388 - Add missing bmp388 unit test files.

BMP388 - Remove debug code.

BMP388 - Prepare EXTI/EOC handling for unified targets.

BMP388 - enable on unified targets.

BMP388 - Add support to NUCLEOF722.

BMP388 - Add support to NUCLEOH743.

BMP388 - Add BMP388 (via SPI) support to NUCLEOF7

* For some CI visibility on the conditional baro SPI code.

NUCLEOH743 - Add LPS baro for more CI visibility.

Remove whitespace, as requested.

Move barometer `#defines` into the implementations.

Cleanup style of method names in baro drivers.
2019-07-02 08:14:23 +12:00
Michael Keller
6130dc3b9e
Move motorConfig_s and motorDevConfig_s to pg/motor (#8498)
Move motorConfig_s and motorDevConfig_s to pg/motor
2019-06-30 12:59:31 +12:00
jflyper
0e63596abd Move motorConfig_s, motorDevConfig_s and associated PG handling into pg/motor.[ch] 2019-06-29 20:03:54 +09:00
Michael Keller
3695b123d9
Add link quality symbol to OSD (#8494)
Add link quality symbol to OSD
2019-06-28 19:24:35 +12:00
Bruce Luckcuck
b962416333 Remove settings parameter; update to use the new kilometer and miles symbols 2019-06-27 10:14:14 -04:00
Miguel Angel Mulero Martinez
c80c3c4f08 Add link quality symbol to OSD 2019-06-27 09:33:56 +02:00
Bruce Luckcuck
2e9e99ff42 Simplified leading symbol logic and change setting to default to ON 2019-06-25 18:38:27 -04:00
Bruce Luckcuck
865515113e Add dynamic distance formatting for OSD elements
Optionally format distance as meters/kilometers or feet/miles based on overal distance. For metric, distance will be displayed as:

0-999m: display meters
1000-9999m: display as kilometers with 2 decimals (ie. 1.23K)
10000m and above: display as kilometers with 1 decimal (ie. 10.5K)

Similar for imperial units except that will display feet up to 1 mile (5280ft), miles with 2 decimals from 1-9.99 miles, and with 1 decimal over 10 miles.

Configured with `osd_dynamic_distance_units = OFF | ON`. If off (the default) then the behavior is unchanged and the distance will be only displayed in meters or feet depending on the units selection.

There are currently no OSD font symbols for kilometers or miles so "K" and "M" are used at this time.
2019-06-24 19:57:14 -04:00
Michael Keller
7b2bdf304e
Remove blank overwrite in the OSD (#8416)
Remove blank overwrite in the OSD
2019-06-14 00:31:29 +12:00
Dominic Clifton
e83ba0db0e Allow the use of EEPROM_IN_RAM on MCUs.
If the MCU also supports PERSISTENT ram (not erased on a warm boot) it
allows testing of config changes without wearing out your flash.

e.g.

linker script
-------------
comment out __config_start/__config_end

target.c
--------
PERSISTENT uint8_t eepromData[EEPROM_SIZE]; // persistent, so it
survives warm boots.

target.h
--------
extern uint8_t eepromData[EEPROM_SIZE];

SITL actually keeps the EEPROM in a FILE, loaded into RAM using
alternate FLASH_* implementation.
2019-06-12 12:47:51 +02:00
Miguel Angel Mulero Martinez
f759ba75d7 Remove remaining blank overwrite in OSD elements 2019-06-12 08:48:29 +02:00
Michael Keller
d486c47bc1
Removed 'slots' from the adjustment range configuration. (#8369)
Removed 'slots' from the adjustment range configuration.
2019-06-05 18:51:02 +12:00
Michael Keller
32416c7972
Baro fixes 1 (#7711)
Baro fixes 1
2019-06-05 01:07:24 +12:00
mikeller
56f3788cff Fixed tests for adjustment ranges. 2019-06-05 00:56:41 +12:00
mikeller
75b1c0d4ce Removed 'slots' from the adjustment range configuration. 2019-06-05 00:56:37 +12:00
Michael Keller
339621ced3
Move the Altitude alignment left in the OSD (#8339)
Move the Altitude alignment left in the OSD
2019-05-25 22:30:19 +12:00
Michael Keller
5a851d7121
Add unit test for sumd serial rx implementation (#8324)
Add unit test for sumd serial rx implementation
2019-05-25 12:34:30 +12:00
Miguel Angel Mulero Martinez
f27a93b767 Move the Altitude alignment left in the OSD 2019-05-24 09:51:51 +02:00
Michael Keller
e7e65ae00e
Add CMS menu entry level control of forced reboot on changes (#8316)
Add CMS menu entry level control of forced reboot on changes
2019-05-22 22:57:44 +12:00
Johannes Kasberger
5684144cd4 add unittest for sumd serial rx implementation 2019-05-21 21:13:03 +02:00
laz2wiringpi
e9a406f447 Link Quality without Aux
fix indent , move unused
remove premature optimisation
Use prior code for osd element calc
unit test add crsf for scaleCrsfLq
unittest typo
rx 0-100
elements simplify osdElementLinkQuality refactor
share  one 16 bit var
2019-05-20 18:10:37 -04:00
Dominic Clifton
eea9242d7b Baro fixes, cleanups and improvements.
* Add BARO debug mode.
* BMP085 - Fix EOC and XCLR initialisation.
* BMP085 - update previously dead code.
* BMP280 - Move t_fine out of the calibration data, since their usage is mixed.
* BMP280 - Move static_assert closer to definition.
2019-05-20 19:13:11 +02:00
Bruce Luckcuck
9081bd3338 Add CMS menu entry level control of forced reboot on changes
CMS menu items can now be defined with a `REBOOT_REQUIRED` flag. If the user changes flagged elements the the exit/save options will change to `EXIT&REBOOT` and `SAVE&REBOOT` - ensuring that the changed items will be handled properly. This should be used for options where runtime changes either won't take effect (because they are read at boot), or for items that could have unexpected behavior if changed.

Several appropriate menus have been updated to include the flag.

To accomodate the dynamic nature of the save/exit options, the individual options have been removed from the main menu and replaced with a `SAVE/EXIT` submenu. This is the same menu that is presented as the quick-access popup save menu (yaw-right). This menu will adapt to requiring a reboot if any flagged setting is changed. Additionally the `REBOOT_REQD` arming disabled reason will be set (cleared by the reboot).
2019-05-20 12:39:36 -04:00
Bruce Luckcuck
d62a4f4b18 Add tenths of a second OSD timer precision option
Currently the timers support full second and hundredth of a second display precision. This adds a tenth of a second option.
2019-05-17 14:25:30 -04:00
Michael Keller
bb560ebdb8
Extend the scope of BOXPARALYZE to cover stick commands, adjustments, and CMS. (#8161)
Extend the scope of BOXPARALYZE to cover stick commands, adjustments, and CMS.
2019-05-09 14:50:30 +12:00
Bruce Luckcuck
a1135dbbc4 Improve CLI diff output to only include non-empty sections
Eliminates the empty blocks for sections that have no changes from defaults.
2019-05-07 09:48:45 -04:00
Michael Keller
3651bbc03a
Added altitude symbol in OSD. (#8184)
Added altitude symbol in OSD.
2019-05-06 22:49:26 +12:00
Michael Keller
8669896557
USE_CRSF_LINK_STATISTICS Split from pr 8042 (#8180)
USE_CRSF_LINK_STATISTICS Split from pr 8042
2019-05-06 18:56:48 +12:00
mikeller
4fb58b340e Extend the scope of BOXPARALYZE to cover stick commands, adjustments, and CMS. 2019-05-06 01:28:37 +12:00
mikeller
05f5449d04 Made temperature OSD display consistent. 2019-05-05 22:30:07 +12:00
mikeller
bd03951ca4 Added altitude symbol in OSD. 2019-05-05 22:26:53 +12:00
laz2wiringpi
653618d0f6 USE_CRSF_LINK_STATISTICS Split from pr 8042 2019-05-04 22:08:14 -04:00
root
6885d27400 comment out unused symbols, use some symbols
Also turns out the Core Temperature widget is subjected to unit tests
2019-05-01 22:17:56 +00:00
Michael Keller
465779e561
Use PT1 for source frame RSSI filtering (#8013)
Use PT1 for source frame RSSI filtering
2019-04-30 08:55:00 +12:00
Michael Keller
b9fc77db3b
When GPS Rescue is engaged after a Failsafe, pilot has to manually sw… (#7936)
When GPS Rescue is engaged after a Failsafe, pilot has to manually sw…
2019-04-30 08:24:59 +12:00
SteveCEvans
91b6f420fc Use PT1 filter for frame based RSSI using rssi_src_frame_lpf_period when rssi_src_frame_errors = ON 2019-04-28 16:00:18 +01:00