mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Reworked arming conditions.
This commit is contained in:
parent
fb0429597f
commit
31df82db2d
20 changed files with 149 additions and 107 deletions
|
@ -29,6 +29,23 @@ uint16_t flightModeFlags = 0;
|
|||
|
||||
static uint32_t enabledSensors = 0;
|
||||
|
||||
static armingDisableFlags_e armingDisableFlags = 0;
|
||||
|
||||
void setArmingDisabled(armingDisableFlags_e flag)
|
||||
{
|
||||
armingDisableFlags = armingDisableFlags | flag;
|
||||
}
|
||||
|
||||
void unsetArmingDisabled(armingDisableFlags_e flag)
|
||||
{
|
||||
armingDisableFlags = armingDisableFlags & ~flag;
|
||||
}
|
||||
|
||||
bool isArmingDisabled()
|
||||
{
|
||||
return armingDisableFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the given flight mode. A beep is sounded if the flight mode
|
||||
* has changed. Returns the new 'flightModeFlags' value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue