mirror of
https://github.com/candle-usb/candleLight_fw.git
synced 2025-01-28 06:02:52 +08:00
led_update_normal_mode() : pass 'now' as argument
This commit is contained in:
parent
edc684609b
commit
83c7df7451
@ -96,10 +96,8 @@ static void led_trx_blinker(led_state_t *ledstate, uint32_t now) {
|
||||
}
|
||||
}
|
||||
|
||||
static void led_update_normal_mode(led_state_t *led)
|
||||
static void led_update_normal_mode(led_state_t *led, uint32_t now)
|
||||
{
|
||||
uint32_t now = HAL_GetTick();
|
||||
|
||||
if (led->blink_request) {
|
||||
led->blink_request = 0;
|
||||
led_trx_blinker(led, now);
|
||||
@ -157,8 +155,8 @@ void led_update(led_data_t *leds)
|
||||
break;
|
||||
|
||||
case led_mode_normal:
|
||||
led_update_normal_mode(&leds->led_state[led_rx]);
|
||||
led_update_normal_mode(&leds->led_state[led_tx]);
|
||||
led_update_normal_mode(&leds->led_state[led_rx], now);
|
||||
led_update_normal_mode(&leds->led_state[led_tx], now);
|
||||
break;
|
||||
|
||||
case led_mode_sequence:
|
||||
|
Loading…
x
Reference in New Issue
Block a user