Skip to content

Commit d2d51db

Browse files
committed
PR feedback and clang format
1 parent 9fc7c60 commit d2d51db

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_AS5600.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
/**************************************************************************/
2828
class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
29-
public:
29+
public:
3030
/*******************************************************************************/
3131
/*!
3232
@brief Constructor for the AS5600 sensor.
@@ -38,8 +38,6 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
3838
/*******************************************************************************/
3939
WipperSnapper_I2C_Driver_AS5600(TwoWire *i2c, uint16_t sensorAddress)
4040
: WipperSnapper_I2C_Driver(i2c, sensorAddress) {
41-
_i2c = i2c;
42-
_sensorAddress = sensorAddress;
4341
_as5600 = nullptr;
4442
_angle = 0;
4543
}
@@ -78,7 +76,7 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
7876
*/
7977
/*******************************************************************************/
8078
bool configureSensor() {
81-
return _as5600->enableWatchdog(false) &&
79+
return _as5600->enableWatchdog(false) &&
8280
// Normal (high) power mode
8381
_as5600->setPowerMode(AS5600_POWER_MODE_NOM) &&
8482
// No Hysteresis
@@ -105,13 +103,8 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
105103

106104
WS_DEBUG_PRINT("AS5600 Raw: ");
107105
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: ");
111107
WS_DEBUG_PRINT(angle);
112-
WS_DEBUG_PRINT(" (0x");
113-
WS_DEBUG_PRINT(angle, HEX);
114-
WS_DEBUG_PRINT(")");
115108

116109
// Check status conditions
117110
if (_as5600->isAGCminGainOverflow()) {
@@ -144,9 +137,9 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
144137
return true;
145138
}
146139

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
150143
};
151144

152-
#endif // WipperSnapper_I2C_Driver_AS5600
145+
#endif // WipperSnapper_I2C_Driver_AS5600

0 commit comments

Comments
 (0)