mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Syncing with Cleanflight upstream
This commit is contained in:
commit
1b1a285b4a
63 changed files with 632 additions and 20047 deletions
|
@ -26,7 +26,9 @@
|
|||
#include "common/axis.h"
|
||||
#include "common/color.h"
|
||||
|
||||
#include "drivers/sensor.h"
|
||||
#include "drivers/accgyro.h"
|
||||
#include "drivers/compass.h"
|
||||
#include "drivers/light_led.h"
|
||||
|
||||
#include "drivers/gpio.h"
|
||||
|
@ -162,7 +164,7 @@ void annexCode(void)
|
|||
int32_t tmp, tmp2;
|
||||
int32_t axis, prop1 = 0, prop2;
|
||||
|
||||
static uint8_t batteryWarningEnabled = false;
|
||||
static batteryState_e batteryState = BATTERY_OK;
|
||||
static uint8_t vbatTimer = 0;
|
||||
static int32_t vbatCycleTime = 0;
|
||||
|
||||
|
@ -232,7 +234,7 @@ void annexCode(void)
|
|||
|
||||
if (feature(FEATURE_VBAT)) {
|
||||
updateBatteryVoltage();
|
||||
batteryWarningEnabled = shouldSoundBatteryAlarm();
|
||||
batteryState = calculateBatteryState();
|
||||
}
|
||||
|
||||
if (feature(FEATURE_CURRENT_METER)) {
|
||||
|
@ -242,7 +244,7 @@ void annexCode(void)
|
|||
}
|
||||
}
|
||||
|
||||
beepcodeUpdateState(batteryWarningEnabled);
|
||||
beepcodeUpdateState(batteryState);
|
||||
|
||||
if (ARMING_FLAG(ARMED)) {
|
||||
LED0_ON;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue