R2R
Encoder.h
Go to the documentation of this file.
1 
13 #ifndef ENCODER_H_
14 #define ENCODER_H_
15 
24 extern void encoderSPIInit(void);
25 
36 extern void encoderRead(void);
37 
38 
39 
48 void resetMotor1RawRelative(void);
49 
58 void resetMotor2RawRelative(void);
59 
67 extern void zeroMotor1RawRelative(void);
68 
76 extern void zeroMotor2RawRelative (void);
77 
78 
86 extern float readMotor1Angle(void);
87 
95 extern float readMotor2Angle(void);
96 
106 extern int readMotor1Raw(void);
107 
117 extern int readMotor2Raw(void);
118 
129 extern int readMotor1RawRelative(void);
130 
141 extern int readMotor2RawRelative(void);
142 
152 extern float readMotor1AngleRelative(void);
153 
163 extern float readMotor2AngleRelative(void);
164 
165 
166 
167 #endif /* ENCODER_H_ */
int readMotor2RawRelative(void)
Reads value in encoderVal array for motor 2 and keeps track of multiturn counts.
Definition: Encoder.c:222
float readMotor1AngleRelative(void)
Reads value in encoderVal array for motor 1 and keeps track of multiturn angles.
Definition: Encoder.c:243
int readMotor1RawRelative(void)
Reads value in encoderVal array for motor 1 and keeps track of multiturn counts.
Definition: Encoder.c:209
void resetMotor1RawRelative(void)
Resets the relative counts on encoder 1.
Definition: Encoder.c:187
int readMotor2Raw(void)
Reads value in encoderVal array for motor 2.
Definition: Encoder.c:257
void encoderRead(void)
Updates value in sensor array.
Definition: Encoder.c:104
int readMotor1Raw(void)
Reads value in encoderVal array for motor 1.
Definition: Encoder.c:260
void zeroMotor2RawRelative(void)
Reads value of motor 2 encoders and sets the relative angle to zero.
Definition: Encoder.c:180
float readMotor2Angle(void)
Reads value in encoderVal array for motor 2 and converts it to an angle.
Definition: Encoder.c:267
void zeroMotor1RawRelative(void)
Reads value of motor 1 encoders and sets the relative angle to zero.
Definition: Encoder.c:174
void resetMotor2RawRelative(void)
Resets the relative counts on encoder 2.
Definition: Encoder.c:191
float readMotor2AngleRelative(void)
Reads value in encoderVal array for motor 2 and keeps track of multiturn angles.
Definition: Encoder.c:246
void encoderSPIInit(void)
Initializes the SPI channels for the motor drivers, encoders, and RAM.
Definition: Encoder.c:39
float readMotor1Angle(void)
Reads value in encoderVal array for motor 1 and converts it to an angle.
Definition: Encoder.c:264