* on MR allow airmode to be sticky and activated by throttle threshold
* fix bug
* make airmode activation threshold configurable
* Keep arimore activation flag as state
* Review changes
- 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.
- Replace usages of 25 as a magic number with CHANNEL_RANGE_STEP_WIDTH
- Remove constrain() call from isRangeActive(), since it's not needed
Should slightly improve performance and saves 24 bytes of flash.
- Add 3 new boxes that can be controlled by a switch to toggle
between the default and 3 alternate layouts.
- Add new MSP cmds to retrieve/set the whole layouts, the OSD alarms
and the preferences.
- For now, CMS and settings just see the default layout. This
will be addressed on future commits.
- Define type bitArrayElement_t as uint32_t.
- Add BITARRAY_DECLARE() macro, which declares a bit array given
the number of desired bits, taking care of aligment and rounding
up its size to a multiple of 32.
- Change bit array functions to accept bitarrayElement_t* rather
than void*.
- Replace bit array declarations with BITARRAY_DECLARE() macro
- Add BITARRAY_FIND_FIRST_SET() macro to call bitArrayFindFirstSet()
without explicitely specifying its size.
- Update comments in bitarray.h to reflect these changes.
While the AIRMODE feature is available in the CLI, the current
code only takes BOXAIRMODE into account (triggered by an RC channel).
This PR introduces an isAirmodeActive() function which also returns
true when if the AIRMODE feature has been set, not only when BOXAIRMODE
is active. Checks for IS_RC_MODE_ACTIVE(BOXAIRMODE) have been replaced
by calls to isAirmodeActive().
This will allow adding a simple switch in the configurator, as
reported in https://github.com/iNavFlight/inav-configurator/issues/154.
Eventually, isAirmodeActive() might be modified to always
return true in FW, since there's no reason to disable it in FW
models AFAIK.