mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Replace global flags with stateFlags, flightModeFlags and armingFlags.
Each flag was previously a whole byte, now all of the flags only take up 4 bytes as they are represented by bit masks. This is cleaner because the different kind of flags are now separated. Additionally this changes the behaviour of arming slightly. When using a switch to arm the aircraft will not arm unless the switch has been in the off state once. This prevents arming if you power the aircraft with a low throttle and the switch in the on position.
This commit is contained in:
parent
1ea014ae25
commit
3f0754d295
18 changed files with 220 additions and 164 deletions
|
@ -258,8 +258,8 @@ void init(void)
|
|||
baroSetCalibrationCycles(CALIBRATING_BARO_CYCLES);
|
||||
#endif
|
||||
|
||||
f.SMALL_ANGLE = 1;
|
||||
f.PREVENT_ARMING = 0;
|
||||
ENABLE_STATE(SMALL_ANGLE);
|
||||
DISABLE_ARMING_FLAG(PREVENT_ARMING);
|
||||
|
||||
#ifdef SOFTSERIAL_LOOPBACK
|
||||
// FIXME this is a hack, perhaps add a FUNCTION_LOOPBACK to support it properly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue