state machine handling added
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
|
||||
int collision_ctrl_init(void);
|
||||
int collision_ctrl_get_distance_mm(void);
|
||||
bool collision_ctrl_is_collision(void);
|
||||
|
||||
#endif /* SOURCE_APPLICATION_INCLUDE_COLLISION_CTRL_H_ */
|
||||
|
26
source/application/include/system_state.h
Normal file
26
source/application/include/system_state.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* system_state.h
|
||||
*
|
||||
* Created on: Sep 19, 2016
|
||||
* Author: tkl
|
||||
*/
|
||||
|
||||
#ifndef SOURCE_APPLICATION_INCLUDE_SYSTEM_STATE_H_
|
||||
#define SOURCE_APPLICATION_INCLUDE_SYSTEM_STATE_H_
|
||||
|
||||
enum system_state {
|
||||
SYS_INIT = 0,
|
||||
SYS_IDLE,
|
||||
SYS_DRIVING,
|
||||
SYS_COLLISION_DETECTED,
|
||||
SYS_COLLISION_DRIVE_BACK,
|
||||
SYS_COLLISION_TURN,
|
||||
SYS_MAX
|
||||
};
|
||||
|
||||
int system_state_init(void);
|
||||
int system_state_poll(void);
|
||||
int system_state_force(enum system_state state);
|
||||
|
||||
|
||||
#endif /* SOURCE_APPLICATION_INCLUDE_SYSTEM_STATE_H_ */
|
Reference in New Issue
Block a user