Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
StateHandlers.h
Go to the documentation of this file.
1#pragma once
2
3#include "StateMachine.h"
4
5// Top-level state handlers used by the main loop switch
6void handleIdleState();
11void handleErrorState();
12
13// Mode-specific handlers for COUNTING and OCCUPANCY
void handleReportingState()
void handleIdleState()
void handleSleepingState()
SLEEPING_STATE: deep sleep between reporting intervals.
void handleOccupancyMode()
Handle sensor events in OCCUPANCY mode.
void handleErrorState()
void updateOccupancyState()
Update occupancy state based on debounce timeout.
void handleConnectingState()
CONNECTING_STATE: establish cloud connection using a phased, non-blocking state machine.
void handleFirmwareUpdateState()
void handleCountingMode()
Handle sensor events in COUNTING mode.