- ao_lco_fire_down = 0;
-}
-
-static uint16_t
-ao_lco_drag_button_check(uint16_t now, uint16_t delay)
-{
- uint16_t button_delay = ~0;
-
- /*
- * Check to see if the button has been held down long enough
- * to switch in/out of drag race mode
- */
- if (ao_lco_fire_down) {
- if (ao_lco_drag_race) {
- if ((int16_t) (now - ao_lco_fire_tick) >= AO_LCO_DRAG_RACE_STOP_TIME)
- ao_lco_drag_disable();
- else
- button_delay = ao_lco_fire_tick + AO_LCO_DRAG_RACE_STOP_TIME - now;
- } else {
- if ((int16_t) (now - ao_lco_fire_tick) >= AO_LCO_DRAG_RACE_START_TIME)
- ao_lco_drag_enable();
- else
- button_delay = ao_lco_fire_tick + AO_LCO_DRAG_RACE_START_TIME - now;
- }
- if (delay > button_delay)
- delay = button_delay;
- }
- return delay;