Respond to instigation whenever possible.

This commit is contained in:
Joe Kearney 2025-08-31 20:47:55 -05:00
parent c034427c3c
commit 26cb24dfe1
6 changed files with 16 additions and 6 deletions

View file

@ -109,7 +109,12 @@ static void Wrapping_Up_Do(StateMachineContext_T * context)
break;
case KEVENT_BLE_PACKET_RECEIVED:
if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_EVENT)
if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_INSTIGATE_GAME)
{
Transition_For_Event(context, STATE_STARTING_GAME__RESPONDING, &Event);
// Don't free the packet buffer here; it will be freed in Starting_Game__Responding_Entry().
}
else if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_EVENT)
{
HandleBLEEventPacket((BLE_EventPacket_T *)Event.Data, context);
}