0% found this document useful (0 votes)
30 views1 page

Reloadingh

This header file defines functions and state types for a hierarchical state machine for reloading. It defines enumerations for the different states including rotating to a beacon, line following for reloading, reading, and waiting for a ball. It also prototypes public functions for running and starting the state machine, querying the current state, getting and setting the number of balls, checking limit switches, and resetting a flag.

Uploaded by

api-397509789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Reloadingh

This header file defines functions and state types for a hierarchical state machine for reloading. It defines enumerations for the different states including rotating to a beacon, line following for reloading, reading, and waiting for a ball. It also prototypes public functions for running and starting the state machine, querying the current state, getting and setting the number of balls, checking limit switches, and resetting a flag.

Uploaded by

api-397509789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

/****************************************************************************

Reloading header file for Hierarchical Sate Machines AKA StateCharts


02/08/12 adjsutments for use with the Events and Services Framework Gen2
3/17/09 Fixed prototpyes to use Event_t

****************************************************************************/

#ifndef Reloading_SM_H
#define Reloading_SM_H

// typedefs for the states


// State definitions for use with the query function
typedef enum {ROTATING_TO_BEACON, LINE_FOLLOWING_RELOADING, READING,
WAITING_FOR_BALL} ReloadingState_t ;

// Public Function Prototypes

ES_Event_t RunReloadingSM( ES_Event_t CurrentEvent );


void StartReloadingSM ( ES_Event_t CurrentEvent );
ReloadingState_t QueryReloadingSM ( void );
int8_t GetNumBalls( void );
void SetNumBalls( int8_t );
bool Check4LimitSwitches(void);
void ResetFlag(void);

#endif /*Reloading_SM_H */

You might also like