0% found this document useful (0 votes)
34 views

Motorservice

This header file defines the interface for a flat state machine template based on an events and services framework. It includes event definition headers, defines state enumeration types for the motor, and declares function prototypes for initializing and running the state machine as well as checking sensor conditions.

Uploaded by

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

Motorservice

This header file defines the interface for a flat state machine template based on an events and services framework. It includes event definition headers, defines state enumeration types for the motor, and declares function prototypes for initializing and running the state machine as well as checking sensor conditions.

Uploaded by

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

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

Header file for template Flat Sate Machine


based on the Gen2 Events and Services Framework

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

#ifndef Motor_H
#define Motor_H

// Event Definitions
#include "ES_Configure.h" /* gets us event definitions */
#include "ES_Types.h" /* gets bool type for returns */
#include "ES_Events.h"

// typedefs for the states


// State definitions for use with the query function
typedef enum
{
InitPState, Waiting, InGame, GetTapeMonster, FollowLine, Uturn, GameOver
}MotorState_t;

// Public Function Prototypes

bool InitMotor(uint8_t Priority);


bool PostMotor(ES_Event_t ThisEvent);
ES_Event_t RunMotor(ES_Event_t ThisEvent);
bool Check4FrontWall(void);
bool Check4RearWall(void);
bool Check4Tape(void);

#endif /* FSMTemplate_H */

You might also like