mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 08:45:36 +03:00
Fixed beeper delay to use microseconds instead of milliseconds.
This commit is contained in:
parent
d143fda9c1
commit
963657ce2e
1 changed files with 4 additions and 4 deletions
|
@ -138,7 +138,7 @@ static uint32_t beeperNextToggleTime = 0;
|
|||
// Time of last arming beep in microseconds (for blackbox)
|
||||
static uint32_t armingBeepTimeMicros = 0;
|
||||
|
||||
static void beeperProcessCommand(void);
|
||||
static void beeperProcessCommand(uint32_t currentTime);
|
||||
|
||||
typedef struct beeperTableEntry_s {
|
||||
uint8_t mode;
|
||||
|
@ -331,13 +331,13 @@ void beeperUpdate(uint32_t currentTime)
|
|||
}
|
||||
}
|
||||
|
||||
beeperProcessCommand();
|
||||
beeperProcessCommand(currentTime);
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculates array position when next to change beeper state is due.
|
||||
*/
|
||||
static void beeperProcessCommand(void)
|
||||
static void beeperProcessCommand(uint32_t currentTime)
|
||||
{
|
||||
if (currentBeeperEntry->sequence[beeperPos] == BEEPER_COMMAND_REPEAT) {
|
||||
beeperPos = 0;
|
||||
|
@ -345,7 +345,7 @@ static void beeperProcessCommand(void)
|
|||
beeperSilence();
|
||||
} else {
|
||||
// Otherwise advance the sequence and calculate next toggle time
|
||||
beeperNextToggleTime = millis() + 10 * currentBeeperEntry->sequence[beeperPos];
|
||||
beeperNextToggleTime = currentTime + 1000 * 10 * currentBeeperEntry->sequence[beeperPos];
|
||||
beeperPos++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue