26
26
*/
27
27
/* *************************************************************************/
28
28
class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
29
- public:
29
+ public:
30
30
/* ******************************************************************************/
31
31
/* !
32
32
@brief Constructor for the AS5600 sensor.
@@ -38,8 +38,6 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
38
38
/* ******************************************************************************/
39
39
WipperSnapper_I2C_Driver_AS5600 (TwoWire *i2c, uint16_t sensorAddress)
40
40
: WipperSnapper_I2C_Driver(i2c, sensorAddress) {
41
- _i2c = i2c;
42
- _sensorAddress = sensorAddress;
43
41
_as5600 = nullptr ;
44
42
_angle = 0 ;
45
43
}
@@ -78,7 +76,7 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
78
76
*/
79
77
/* ******************************************************************************/
80
78
bool configureSensor () {
81
- return _as5600->enableWatchdog (false ) &&
79
+ return _as5600->enableWatchdog (false ) &&
82
80
// Normal (high) power mode
83
81
_as5600->setPowerMode (AS5600_POWER_MODE_NOM) &&
84
82
// No Hysteresis
@@ -105,13 +103,8 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
105
103
106
104
WS_DEBUG_PRINT (" AS5600 Raw: " );
107
105
WS_DEBUG_PRINT (rawAngle);
108
- WS_DEBUG_PRINT (" (0x" );
109
- WS_DEBUG_PRINT (rawAngle, HEX);
110
- WS_DEBUG_PRINT (" ) | Scaled: " );
106
+ WS_DEBUG_PRINT (" | Scaled: " );
111
107
WS_DEBUG_PRINT (angle);
112
- WS_DEBUG_PRINT (" (0x" );
113
- WS_DEBUG_PRINT (angle, HEX);
114
- WS_DEBUG_PRINT (" )" );
115
108
116
109
// Check status conditions
117
110
if (_as5600->isAGCminGainOverflow ()) {
@@ -144,9 +137,9 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
144
137
return true ;
145
138
}
146
139
147
- protected:
148
- float _angle; // /< Current angle reading from the AS5600 sensor
149
- Adafruit_AS5600 *_as5600; // /< Pointer to AS5600 sensor object
140
+ protected:
141
+ float _angle; // /< Current angle reading from the AS5600 sensor
142
+ Adafruit_AS5600 *_as5600; // /< Pointer to AS5600 sensor object
150
143
};
151
144
152
- #endif // WipperSnapper_I2C_Driver_AS5600
145
+ #endif // WipperSnapper_I2C_Driver_AS5600
0 commit comments