mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Remove unused vario feature and option. Move warning led code into
statusindicator.c/h
This commit is contained in:
parent
4b437e8e08
commit
fd0b7cdf80
7 changed files with 37 additions and 57 deletions
|
@ -25,3 +25,30 @@ void blinkLedAndSoundBeeper(uint8_t num, uint8_t wait, uint8_t repeat)
|
|||
delay(60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static uint32_t warningLedTimer = 0;
|
||||
|
||||
void enableWarningLed(uint32_t currentTime)
|
||||
{
|
||||
if (warningLedTimer != 0) {
|
||||
return; // already enabled
|
||||
}
|
||||
warningLedTimer = currentTime + 500000;
|
||||
LED0_ON;
|
||||
}
|
||||
|
||||
void disableWarningLed(void)
|
||||
{
|
||||
warningLedTimer = 0;
|
||||
LED0_OFF;
|
||||
}
|
||||
|
||||
void updateWarningLed(uint32_t currentTime)
|
||||
{
|
||||
if (warningLedTimer && (int32_t)(currentTime - warningLedTimer) >= 0) {
|
||||
LED0_TOGGLE;
|
||||
warningLedTimer = warningLedTimer + 500000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue