Added more event transitions to facilitate testing.

This commit is contained in:
Joe Kearney 2025-07-21 19:02:27 -05:00
parent 1a27af361d
commit 2b31cc45e1
3 changed files with 22 additions and 1 deletions

View file

@ -406,6 +406,7 @@ static void Playing__Interacting_Do(StateMachineContext_T * context)
}
break;
case KEVENT_PLAY_PRESSED_ON_REMOTE:
case KEVENT_GAME_OVER:
{
AudioAction_T audio_action = {.ID = AUDIO_PLAY_GAME_OVER, .Play_To_Completion = true};
@ -413,6 +414,21 @@ static void Playing__Interacting_Do(StateMachineContext_T * context)
Transition_For_Event(context, STATE_WRAPPING_UP, &Event);
}
break;
case KEVENT_MENU_UP:
{
#ifdef LOG_INTERACTING_SUBSTATE
KLOG_INFO(KLOG_TAG, "Simulating a tag leading to being tagged out.");
#endif // LOG_INTERACTING_SUBSTATE
Reduce_Health(Get_Max_Health());
AudioAction_T audio_action = {.ID = AUDIO_PLAY_TAG_RECEIVED, .Data = (void *)0x00};
Perform_Audio_Action(&audio_action);
NeoPixelsAction_T neopixels_action = {.ID = NEOPIXELS_TAG_RECEIVED, .Prominence = NEOPIXELS_FOREGROUND, .Data = (void *)&ReceivedTagColor};
xQueueSend(xQueueNeoPixels, &neopixels_action, 0);
}
break;
default:
// All other events are ignored in this state.