9#ifndef MINIFOC_ALGORITHM_ENCODER_H_
10#define MINIFOC_ALGORITHM_ENCODER_H_
unsigned short encoder_get_mechanical_angle(void)
read mechanical angle directly from encoder
volatile unsigned short machine_angle_offset
mechanical angle offset, which is used to align the mechanical angle with the zero point of the elect...
void encoder_update_speed(void)
called every 2 milliseconds to calculate the speed.
float encoder_get_electronic_angle(void)
according to the electrical angle calculated from the mechanical angle, this function will call encod...
void encoder_zeroing(void)
correct the mechanical angle zero deviation between the magnetic encoder and FOC.