@@ -58,8 +58,6 @@ typedef struct {
58
58
unsigned int offset ; // initial reading on setup - relative zero position
59
59
} EncObj ;
60
60
61
- extern EncObj encPos [NUM_ENC ];
62
-
63
61
/*****************************************************************************
64
62
* Function Name : amsHallSetup
65
63
* Description : initialize I2C, and for initial calibration, set offset
@@ -106,11 +104,35 @@ void amsEncoderBlockingRead(unsigned char num);
106
104
unsigned char amsEncoderStartAsyncRead (void );
107
105
108
106
/*****************************************************************************
109
- * Function Name : encGetFloatPos
107
+ * Function Name : amsEncoderGetFloatPos
110
108
* Description : Return the angular position of encoder[num] return as float
111
109
* Parameters : None
112
- * Return Value : None
110
+ * Return Value : float value for a single encoder, in degrees
113
111
*****************************************************************************/
114
112
float amsEncoderGetFloatPos (unsigned char num );
115
113
114
+ /*****************************************************************************
115
+ * Function Name : amsEncoderGetPos
116
+ * Description : Return the angular position of encoder[num] return as int
117
+ * Parameters : None
118
+ * Return Value : int value for a single encoder
119
+ *****************************************************************************/
120
+ int amsEncoderGetPos (unsigned char num );
121
+
122
+ /*****************************************************************************
123
+ * Function Name : amsEncoderGetOticks
124
+ * Description : Return the count of total revolutions
125
+ * Parameters : None
126
+ * Return Value : int value, for a single encoder
127
+ *****************************************************************************/
128
+ long amsEncoderGetOticks (unsigned char num );
129
+
130
+ /*****************************************************************************
131
+ * Function Name : amsEncoderGetOffset
132
+ * Description : Return the offset for an encoder
133
+ * Parameters : None
134
+ * Return Value : int value, for a single encoder
135
+ *****************************************************************************/
136
+ unsigned int amsEncoderGetOffset (unsigned char num );
137
+
116
138
#endif // __AMS_ENC_H
0 commit comments