![]() |
Zap'Em Blast'Em Robots
robots that play laser tag!
|
Structure for shoot task configuration and state tracking. More...
#include <shoot_task.h>
Data Fields | |
| int32_t | state |
| int32_t | num_states |
| int32_t | button |
| TIM_HandleTypeDef * | servo_tim |
| uint32_t | channel |
| int32_t | shield_val |
| int32_t | unshield_val |
| uint32_t | laser_gpio |
| shoot_fcn_t | state_list [] |
Structure for shoot task configuration and state tracking.
Contains information for laser control, servo control, and button input processing. Implements a state machine via function pointer list.
| int32_t button |
Button press flag
| uint32_t channel |
PWM channel for servo
| uint32_t laser_gpio |
GPIO pin for laser control
| int32_t num_states |
Total number of states
| TIM_HandleTypeDef* servo_tim |
Timer for servo PWM
| int32_t shield_val |
PWM value for shield position
| int32_t state |
Current state index
| shoot_fcn_t state_list[] |
Array of state functions
| int32_t unshield_val |
PWM value for unshielded pos