The test file includes a simple independent implementation of
vector rotation. Each of the following sensor_align_e types are
tested:
* CW0_DEG
* CW90_DEG
* CW180_DEG
* CW270_DEG
* CW0_DEG_FLIP
* CW90_DEG_FLIP
* CW180_DEG_FLIP
* CW270_DEG_FLIP
For each test, three unit vectors and a random vector are tested.
* {1, 0, 0}
* {0, 1, 0}
* {0, 0, 1}
* {R, R, R} (where R is a random number)
The vector under test is rotated using the functions defined in the
test file. The output of the test function is compared to the
output of the sensorsAlign() function. The outputs match for all
test conditions.
Officially the CRC check is part of the SUMD protocol.
Framing errors are already covered and i expect these to occur around
the same time as CRC errors, so i am not sure if someone will ever
notice the difference...
Logic for valid flightchannel detection is inverted in order to detect
the first flightchannel failure instead of waiting to check them all.
Clear PWM channel capture on read.
This invalidates the control channels on read. They are validated by
receiving a good value BEFORE the aux channels are received. This is
done because control channels configures to go OFF on failsafe are
detected with a PWM capture time-out. Time-out took so long that all aux
channels where overwritten by their RX configured failsafe values BEFORE
the invalid (=OFF) control channel was detected.
Note: since it didn't actually calibrate anything it has been renamed to
rxrange.
Added ability to reset rxranges using `rxrange reset` - this follows the
same pattern as other cli commands.
On bad (out-of-range) pulses; ROLL, PITCH, YAW will go to `mid_rc` and
THROTTLE will go to `rx_min_usec` (to `mid_rc` for 3D mode). So these
channels will no longer be set by the user directly.
Fallback values for the aux switches (0 .. max) can be set with this
version. Since these switches may trigger all kind of things, the user
needs control over them in case of a RX failsafe event.
A single flight control channel failure (first 4) when using parallel
PWM is interpreted as a failure for all flight control channels (first
4), since the craft may be uncontrollable when one channel is down. (+4
squashed commit)
Squashed commit:
[dbfea9e] Apply fallback values also when serial_rx init failed and/or
RX
disconnected and/or no signal received.
[b5a2ecd] Added get/set MSP commands for RXFAIL config
Bumped API minor version up.
[c0e31ce] minor change for coding standard
[322705f] Added programmable RX channel defaults on rx lost Update #2