![]() |
Zap'Em Blast'Em Robots
robots that play laser tag!
|
Structure for tracking photoresistor task state and config. More...
#include <photoresistor_task.h>
Data Fields | |
| int32_t | state |
| int32_t | num_states |
| int32_t | hit_flag |
| int32_t | adc_val |
| int32_t | thresh |
| int32_t | zero |
| photoresistor_fcn_t | state_list [] |
Structure for tracking photoresistor task state and config.
Holds ADC value, thresholds, state index, and a list of function pointers for state execution.
| int32_t adc_val |
Current ADC reading
| int32_t hit_flag |
Set when hit is detected
| int32_t num_states |
Number of valid states
| int32_t state |
Current state index
| photoresistor_fcn_t state_list[] |
Array of state functions
| int32_t thresh |
Threshold for hit detect
| int32_t zero |
Zero offset for calibration