Buoyancy Firmware  1.0
Buoyancy Vehicle Firmware Documentation
FSM.h
Go to the documentation of this file.
1 
2 
3 #ifndef _FSM_H_
4 #define _FSM_H_
5 
6 #include "main.h"
7 #include "timers.h"
8 
20 typedef enum
21 {
24 
29 typedef enum
30 {
40 
42 
45 typedef struct
46 {
47  systemState_t state, nextState;
54 }FSM_t;
55 
56 extern FSM_t fsm;
57 
60 void FSM(void);
61 
67 void FAILUREstate(void);
68 
73 void LOWPOWERstate(void);
74 
75 
76 
77 #endif // _FSM_H_
78 
void FAILUREstate()
Failure state, vehicle is floated to surface, SD card is unmounted.
Definition: FSM.c:341
bool BLEgotoIdle
Flag to signal BLE command state transition to idle state.
Definition: FSM.h:50
bool BLEgotoConfig
Flag to signal BLE command state transition to configure state.
Definition: FSM.h:51
bool IDLEstateTimeout
Flag to signal idle state transition to sleep state.
Definition: FSM.h:49
void LOWPOWERstate()
Low Power state, vehicle is floated to surface, SD card is unmounted.
Definition: FSM.c:323
Definition: FSM.h:33
Definition: FSM.h:32
Definition: FSM.h:22
FSM_t fsm
Create Finite State Machine struct instance.
Definition: main.c:77
Definition: FSM.h:22
systemState_t state
Definition: FSM.h:47
Definition: FSM.h:22
Definition: FSM.h:36
Structure of FSM specific variables.
Definition: FSM.h:45
Definition: FSM.h:22
Definition: FSM.h:22
bool hallEffectButton
Flag to signal hall effect button interrupt.
Definition: FSM.h:53
Definition: FSM.h:22
Definition: FSM.h:39
bool stateInitialized
Flag to signal that current state is initialized.
Definition: FSM.h:48
Definition: FSM.h:22
Definition: FSM.h:37
bool BLEstartMission
Flag to signal BLE command state transition to mission state.
Definition: FSM.h:52
void FSM()
Main FSM loop.
Definition: FSM.c:358
Definition: FSM.h:22
systemEvent_t
Type definition of system events.
Definition: FSM.h:29
Definition: FSM.h:34
systemState_t
Type definition of system state enumeration.
Definition: FSM.h:20
Definition: FSM.h:35
Definition: FSM.h:38
Definition: FSM.h:31