There was an issue in that if no data from PPM or PWM rx inputs would result in processRx() exiting prematurely and updateArmingStatus() not being called. This affected processing of boot grace timeouts, cpu load arming disabled checking, etc. This change forces updates to occur no less frequently than 50Hz even if no data is available.
Addresses the rare possibility that if runway takeoff triggers and disarms while the pilot has the sticks in some valid stick command configuration. Prevents the stick command from processing until the craft is disarmed and the ARMING_DISABLED_RUNAWAY_TAKEOFF condition is cleared.
For example, if the pilot was mid throttle and went full yaw right and runway takeoff triggered, then camera control would have be entered.
There was a logic inversion when 3d_switched_mode = ON causeing the motor directions to be inverted. Also the trottle scaling for reverse thrust was being applied twice from both the 3d_switched_mode = ON and 3d_switched_mode = OFF sections.
Noise and momentary spikes in gyro data (particularly in 32K mode) were causing false triggering of the gyro overflow detection. Changing to using filtered instead of raw gyro data eliminates the false triggering.
Also adjusted the trigger and reset rates slightly (approx. 1950dps and 1850dps respectively).
Fixed bug for gyros that may not be +-2000dps full scale. The trigger threshold will be 97.5% full-scale and reset at 92.5% (corresponds to 1950 and 1850 for 2000dps gyros).
The current design continuously runs timer loops for all overlays regardless of whether or not any LEDs are actually using the overlay. Then each overlay function iterates through all configured LED's to apply if needed.
This optimization "looks ahead" and turns off any overlays that are not assigned to any LEDs. The most optimization is achieved when no overlays are used, and regresses to match the current performance level if every overlay is assigned.
clean_all or all_clean were trying to clean SKIP_TARGETS too, resulting
in:
make/targets.mk:15: *** The target specified, ALIENWHOOP, cannot be
built. Use one of the ALT targets: ALIENWHOOPF4 ALIENWHOOPF7. Stop.
Remove SKIP_TARGETS from the clean lists.
Previously the OSD crash-flip warning would only track the state of the activation switch. So if the switch was disabled but still armed the message would go away, but the quad was still in active crash-flip mode until it was disarmed. This change makes the OSD message follow the actual internal state for crash-flip.
clean_all or all_clean were trying to clean SKIP_TARGETS too, resulting
in:
make/targets.mk:15: *** The target specified, ALIENWHOOP, cannot be
built. Use one of the ALT targets: ALIENWHOOPF4 ALIENWHOOPF7. Stop.
Remove SKIP_TARGETS from the clean lists.
Additional validation in msp.c was resetting the gyro and pid denoms incorrectly under the assumption that any non-zero gyro_lpf value means the gyro is in 1KHz refresh rate. The correct validation is already been performed by fc/config.c so the extra legacy validtions are not needed.
Previously the ARMING_DISABLED_RUNAWAY_TAKEOFF reason would be overridden by ARMING_DISABLED_THROTTLE which prevented the indication that the disarming was casued by a runaway event.
Also fixed a problem where the disarm beep pattern would override the arming disabled beep codes when runaway takeoff triggered an auto-disarm.