ME 507 Romi++
Cylindrical Differential Drive Robot created for ME 507 at Cal Poly in Spring 2025
Loading...
Searching...
No Matches
encoder_t Struct Reference

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

Detailed Description

Structure for tracking encoder state and motion data.

Contains hardware timer reference, historical state, and calculated speed in counts per second (CPS).

Member Data Documentation

◆ delta

int32_t encoder_t::delta

Count delta since last update

◆ htim

TIM_HandleTypeDef* encoder_t::htim

Pointer to hardware timer configured for encoder mode

◆ last_count

int32_t encoder_t::last_count

Previous timer counter value

◆ last_time_us

uint32_t encoder_t::last_time_us

Timestamp of last update in microseconds

◆ position

int32_t encoder_t::position

Cumulative position in encoder counts

◆ speed_cps

float encoder_t::speed_cps

Calculated speed in counts per second


The documentation for this struct was generated from the following file: