You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,9 +15,9 @@ class HallSensor: public Sensor{
17
15
@param encB HallSensor B pin
18
16
@param encC HallSensor C pin
19
17
@param pp pole pairs (e.g hoverboard motor has 15pp and small gimbals often have 7pp)
20
-
@param index index pin number (optional input)
18
+
@param hall_60deg Indicate if the hall sensors are 60 degrees apart electrically (means that they can all be one or off at the same time). In 60deg mode, B needs to lead, so you may need to swap the connections until you find one that works
21
19
*/
22
-
HallSensor(int encA, int encB, int encC, int pp);
20
+
HallSensor(int encA, int encB, int encC, int pp, bool hall_60deg = false);
23
21
24
22
/** HallSensor initialise pins */
25
23
voidinit();
@@ -47,7 +45,8 @@ class HallSensor: public Sensor{
47
45
int pinA; //!< HallSensor hardware pin A
48
46
int pinB; //!< HallSensor hardware pin B
49
47
int pinC; //!< HallSensor hardware pin C
50
-
int use_interrupt; //!< True if interrupts have been attached
48
+
bool use_interrupt; //!< True if interrupts have been attached
49
+
bool hall_60deg; //!< Hall sensors are 60 degrees apart electrically (means that they can all be one or off at the same time)
51
50
52
51
// HallSensor configuration
53
52
Pullup pullup; //!< Configuration parameter internal or external pullups
@@ -93,7 +92,6 @@ class HallSensor: public Sensor{
0 commit comments