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

829 commits

Author SHA1 Message Date
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
functionpointer
7cb34205b3 [VTX] vtxTable factory flag and full integration of vtxTable (#8380)
Moved vtxtable frequency mode implementation into `vtx_common.c`.
This makes the implementation available for all vtx types and allows
for some code deduplication (see point below)

Removed band and channel tracking from tramp and rtc6705.
The hardware underlying both only support frequency mode and
the tracking is now done in `vtx_common.c` using the new factory flag.

Deleted vtxStringXXX. to continue supporting builds without
`USE_VTX_TABLE`, new infrastructure was created in
`drivers/vtx_table.c`, which loads fixed tables into vtxTableXXX
when built witout `USE_VTX_TABLE`. Individual vtx implementations no
longer need to load any band/channel tables. They only need to load
their individual power tables when built without `USE_VTX_TABLE`.
Additionally this allows for the next point:

Fully integrated vtxTableXXX and removed the old and no longer needed
indirection of frequency and power tables in `vtxDevice_t`.

Removed VTX_SETTINGS_* constants from `vtx_common.h` and replaced them
with the vtxtable equivalent.

rtc6705 implementation now uses power values from vtxtable instead of
using indices directly. It also stops using index 0. This makes it
consistent with other vtx implementations and is more user configurable.
It also cleans up `telemetry\srxl.c` which had to have a special case for rtc6705.

Finally, frequency entries in the vtxtable can now be marked as empty
by setting their frequency to 0. Betaflight will never allow a blocked
channel to be selected. This is useful for vtxtable index mode
(FACTORY flag set) where manufacturer-defined bands can be truncated
to ensure compliance with local laws and regulations.
2019-06-24 12:28:46 +02: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
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
Dominic Clifton
9177cda6bb TESTS - Allow compilation on Cygwin again.
* -pthread not supported.
* --coverage not supported.
* -lblocksruntime not required.
2019-03-20 18:36:01 +01: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