Steady yellow light in module game state
This commit is contained in:
parent
e56725aced
commit
8ecc0433ed
1 changed files with 6 additions and 2 deletions
|
@ -43,7 +43,11 @@ void _setLed(struct color color) {
|
||||||
void _ledLoop() {
|
void _ledLoop() {
|
||||||
// Check if we need to turn the LED back off, e.g. to reset the strike blinker
|
// Check if we need to turn the LED back off, e.g. to reset the strike blinker
|
||||||
if (led_reset_time && millis() > led_reset_time) {
|
if (led_reset_time && millis() > led_reset_time) {
|
||||||
|
if (active) {
|
||||||
|
_setLed(COLOR_YELLOW);
|
||||||
|
} else {
|
||||||
_setLed(COLOR_OFF);
|
_setLed(COLOR_OFF);
|
||||||
|
}
|
||||||
led_reset_time = 0;
|
led_reset_time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +115,7 @@ bool loopPuzzle(obus_can::message* message, void (*callback_game_start)(), void
|
||||||
switch (message->msg_type) {
|
switch (message->msg_type) {
|
||||||
case OBUS_MSGTYPE_C_GAMESTART:
|
case OBUS_MSGTYPE_C_GAMESTART:
|
||||||
active = true;
|
active = true;
|
||||||
_setLed(COLOR_OFF);
|
_setLed(COLOR_YELLOW);
|
||||||
callback_game_start();
|
callback_game_start();
|
||||||
break;
|
break;
|
||||||
case OBUS_MSGTYPE_C_HELLO:
|
case OBUS_MSGTYPE_C_HELLO:
|
||||||
|
|
Loading…
Reference in a new issue