WIP: New BLE

This commit is contained in:
Joe Kearney 2025-02-03 20:49:54 -06:00
parent 4fe072f2d3
commit a9212c5a3a
12 changed files with 191 additions and 56 deletions

View file

@ -36,22 +36,21 @@
*/
typedef enum
{
STATE_DEFAULT = 0,
STATE_INITIALIZING = 1,
STATE_REPROGRAMMING = 2,
STATE_CONFIGURING = 3,
STATE_READY = 4,
STATE_INITIALIZING = 0,
STATE_REPROGRAMMING = 1,
STATE_CONFIGURING = 2,
STATE_READY = 3,
// Substates of STATE_STARTING_GAME
STATE_STARTING_GAME__INSTIGATING = 5,
STATE_STARTING_GAME__RESPONDING = 6,
STATE_STARTING_GAME__COUNTING_DOWN = 7,
STATE_STARTING_GAME__INSTIGATING = 4,
STATE_STARTING_GAME__RESPONDING = 5,
STATE_STARTING_GAME__COUNTING_DOWN = 6,
// Substates of STATE_PLAYING
STATE_PLAYING__INTERACTING = 8,
STATE_PLAYING__TAGGED_OUT = 9,
STATE_PLAYING__INTERACTING = 7,
STATE_PLAYING__TAGGED_OUT = 8,
STATE_WRAPPING_UP = 10,
STATE_WRAPPING_UP = 9,
// STATE_IS_OUT_OF_RANGE is one more than the last valid state.
STATE_IS_OUT_OF_RANGE,
@ -120,6 +119,8 @@ inline uint32_t GetTimeInState_in_ms(StateMachineContext_T * context)
return result;
}
StateMachineContext_T* GetContext();
#include "State_Configuring.h"
#include "State_Ready.h"
#include "State_Initializing.h"