The data necessary for an encoder. More...
Data Fields | |
volatile int | current_pos |
the absolute position of the encoder. | |
int | delta_pos |
The total change in position. | |
int | delta_time |
The total change in time. | |
int | index |
The current index of both the time and position buffers. | |
int | length |
The length of both the time and positino buffers. | |
int * | pos_buf |
The buffer of saved positions. | |
volatile int | prev_chA |
The previous state of channel A. | |
volatile int | prev_chB |
The previous state of channel B. | |
int | prev_pos |
The previous position. | |
QEC_RESOLUTION | resolution |
The resolution of the encoder. | |
int * | time_buf |
The buffer of saved time intervals. | |
float | velocity |
The most recent calculated velocity. |
The data necessary for an encoder.
Definition at line 30 of file qec.h.
volatile int QEC_DATA::current_pos |
the absolute position of the encoder.
Definition at line 31 of file qec.h.
Referenced by qec_calc_velocity(), qec_get_abs_pos(), qec_init_data(), and qec_update().
The total change in position.
Definition at line 33 of file qec.h.
Referenced by qec_calc_velocity(), and qec_get_velocity().
The total change in time.
Definition at line 34 of file qec.h.
Referenced by qec_calc_velocity(), and qec_get_velocity().
int QEC_DATA::index |
The current index of both the time and position buffers.
Definition at line 37 of file qec.h.
Referenced by qec_calc_velocity(), and qec_init_data().
int QEC_DATA::length |
The length of both the time and positino buffers.
Definition at line 38 of file qec.h.
Referenced by qec_calc_velocity(), and qec_init_data().
int* QEC_DATA::pos_buf |
The buffer of saved positions.
Definition at line 35 of file qec.h.
Referenced by qec_calc_velocity(), and qec_init_data().
volatile int QEC_DATA::prev_chA |
volatile int QEC_DATA::prev_chB |
QEC_RESOLUTION QEC_DATA::resolution |
The resolution of the encoder.
Definition at line 42 of file qec.h.
Referenced by qec_init_data(), qec_isr(), qec_update(), and qec_update_velocity().
int* QEC_DATA::time_buf |
The buffer of saved time intervals.
Definition at line 36 of file qec.h.
Referenced by qec_calc_velocity(), and qec_init_data().
float QEC_DATA::velocity |
The most recent calculated velocity.
Definition at line 39 of file qec.h.
Referenced by qec_get_velocity().