1
0
Fork 0
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:
Dominic Clifton 2014-06-01 17:20:01 +01:00
parent 4b437e8e08
commit fd0b7cdf80
7 changed files with 37 additions and 57 deletions

View file

@ -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;
}
}