just use it in-place. This saves ~308bytes of memory.
Prior to this there were 4 profiles in ram all the time, the 3 main
profiles and a copy of one of them.
This commit was aided by a side effect of the work done to clean up the
output of the cli dump command since it is now easy to conditionally
apply the changes to the memory addressed used to read/write cli
variables. See 8c3a869251.
gps.c now only has code that deals with gps hardware, state and
messaging.
navigation.c now only has code dealing with flight
navigation/waypoints/home/hold/etc
If a given feature or mode is off the next task is not processed in the
current loop but will be processed during the next loop iteration for
simplification, this allowed the cleanup of return values in other code.
Added documentation.
Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
With an LED strip length of 10, arrange the leds clockwise from 1 to 10
starting with led 1 at the north west (10:30hrs) with led 5 north east
(01:30hrs), led 6 south east and led 10 south west.
When armed or not, moving the roll stick to the left will make the leds
on the left flash, and same for right and also for pitch forwards and
backwards too.
Removed many magic numbers.
Deduplicated code.
Removed unnecessary local variable usage.
The LED Strip is initialised to WHITE briefly on power up so that it's
possible to visually check that all LEDs are functioning correctly -
white uses each individual RGB diode and draws maximum power.
Introduced an API to allow any code to change any or all LED colors
individually. This takes a little ram since an additional buffer is
needed - 3 bytes per LED, in addition to the DMA buffer.
When armed the first half of the strip is green the second half is red.
When disarmed the strip is various shades of red.
When the battery is low the strip will flash.
using different values in different.
The cause was the IMU init code which triggered calculation was never
called after switching profiles - it couldn't be called twice because it
also initialised the compass.
The solution was to decouple compass initialisation from IMU
initialisation and extract the code to recalculate throttle angle scale
to a new method.
The MSP is changed in a way that might provide some backwards
compatibility. The first 4 channels are sent/read as before followed by
the next 4 channels.
If I client ignores extra data received it should be backwards
compatible.
Clients can looks for the new capability bit which indicates the MSP
protocol supports AUX 1-8.