- Remove globals rcData and rcRaw
- Use accesor functions to retrieve RX input data
- Refactor rx.c to use an array of structs instead of multiple arrays
- Drop the RC Preview menu from CMS. Implementing this without
globals requires significant flash and the usefulness of this menu
is questionable. If we get complains, we can add it back later.
Flash usage goes down ~250 bytes due to the removed menu. Final
binary is mostly unaffected, since LTO is able to inline the new
accessor functions in most cases.
As suggested by @hydra. OME_Back and OME_END continue to be valid
items, but we now also have OME_BACK_AND_END which creates a back
entry and indicates the end of the menu, saving an entry. On F3,
this saves 464 bytes of flash.
Add support for direct pointers to readonly values rather than using
intermediate OSD_XXX_t types.
Use direct pointers on all readonly values.
Make sure all intermediate value/step holders are in flash rather
than ram, since they're never modified.
This saves another 352 bytes of RAM (mostly on data, a few on bss).
Use a global array in cms.c to keep track of the dirty elements
that need redrawing. This lets us avoid modifying the entry flags
to keep track of it, so they can now be completely read only. This
in turn lets us also move all the menus to the text section.
This commit saves 6112 bytes of RAM in F3, so we have some room
to play again without resorting to disabling features.
* increase battery voltage resolution to 10mV
* increase battery voltage resolution to 10mV: update VBATT_HYSTERESIS
* increase battery voltage resolution to 10mV: fix telemetry and other places where vbat calculations needs to be divided by 10
* increase battery voltage resolution to 10mV: revert blackbox data to 100mV resolution because modifying the viewer is not trivial
* increase battery voltage resolution to 10mV: change new MSPv2 frame type names to follow convention
* smartport telemetry: remove wrong and now irrelevant comments
* Improve battery monitoring
* improve battery monitoring: fix/simplify the batteryAdcToVoltage function
* improve battery monitoring: Add OSD voltage decimals setting to OSD MISC menu
* improve battery monitoring: clean the batteryConfig struct
* improve battery monitoring: increase batteryConfig PG group version to 1
* improve battery monitoring: change capacity settings type from uin16_t to uint32_t (65Wh is not very large, it is about 6Ah for a 3S Li-Po)
* improve battery monitoring: rename capacity settings
* improve battery monitoring: improve OSD code
* improve battery monitoring: simplified taskUpdateBattery
* improve battery monitoring: use unfiltered vbat to decide if the battery is full
* Add macros for injecting CMS key presses
Useful for testing and debugging
* Add support for CMS elements represented by just a bool function
Function is called for both getting and setting the value. Will
allow simplying the code for several CMS items.
* Use OME_BoolFunc on cms_menu_ledstrip.c
Allows removing a couple of static variables and replacing two
functions with just one.
* Add support for manipulating settings directly in CMS
Allows changing settings without intermediary values/functions,
reducing memory usage. Due to the required code to support this
feature we're using ~250 bytes of flash, but we're saving around
~300 bytes of RAM. However, eventually we should be able to migrate
all CMS code to use the settings API and end up saving flash space.
Also, the memory overhead per memory setting is now way smaller.
* Don't use SETTING_VBAT_* when the target doesn't use the ADC
Fixes build on COLIBRI
* Add support for CMS setting data types
This allows us to format angular rates without introducing a function
pointer for formatting on every CMS setting.
* Remove CMS_INJECTED_KEYS used for debugging
* Fix off-by-one error in setting_get_max() for MODE_LOOKUP values
Maximum value is one less than the number of entries in the table
Attempt to brutally graft BF3.1’s OSD, CMS, DISPLAYPORT, DASHBOARD,
MSP_DISPLAYPORT onto INAV-1.4.
With this first cut, integrated OSD (based on MAX7456) and CMS over the
OSD is working.