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

@ -230,7 +230,12 @@ static void Configuring_Do(StateMachineContext_T *context)
break;
case KEVENT_BLE_PACKET_RECEIVED:
if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_PARAMETERS)
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_PARAMETERS)
{
HandleBLEConfigurationPacket((BLE_ParametersPacket_T *)Event.Data);
}