|
ME 507 Romi++
Cylindrical Differential Drive Robot created for ME 507 at Cal Poly in Spring 2025
|
Structure for tracking encoder state and motion data. More...
#include <encoder.h>
Public Attributes | |
| TIM_HandleTypeDef * | htim |
| int32_t | last_count |
| int32_t | position |
| uint32_t | last_time_us |
| int32_t | delta |
| float | speed_cps |
Structure for tracking encoder state and motion data.
Contains hardware timer reference, historical state, and calculated speed in counts per second (CPS).
| int32_t encoder_t::delta |
Count delta since last update
| TIM_HandleTypeDef* encoder_t::htim |
Pointer to hardware timer configured for encoder mode
| int32_t encoder_t::last_count |
Previous timer counter value
| uint32_t encoder_t::last_time_us |
Timestamp of last update in microseconds
| int32_t encoder_t::position |
Cumulative position in encoder counts
| float encoder_t::speed_cps |
Calculated speed in counts per second