40 #define ENCODERDATATOSTEP 51200.0/65536.0
41 #define ENCODERDATATOREVOLUTIONS 60.0/65536.0
42 #define ANGLETOENCODERDATA 65535.0/360.0
75 void setHome(
float initialAngle = 0 );
87 float getAngle(
void );
100 uint16_t getAngleRaw(
void );
120 float getAngleMoved(
bool filtered =
true);
140 int32_t getAngleMovedRaw(
bool filtered =
true );
152 float getSpeed(
void);
174 uint16_t captureAngle(
void );
183 uint8_t getStatus(
void );
195 bool detectMagnet(
void);
198 volatile int32_t smoothValue;
201 volatile float speedSmoothValue;
204 volatile uint16_t encoderOffset;
208 volatile uint16_t angle;
218 volatile uint16_t oldAngle;
223 volatile float curSpeed;
229 volatile uint8_t Beta = 5;
245 int32_t userAngleOffset = 0;
247 volatile int32_t angleMovedRaw = 0;