Skip to content

Commit 78367af

Browse files
committed
clang format
1 parent 0a43f57 commit 78367af

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_AS5600.h

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515
#ifndef WipperSnapper_I2C_Driver_AS5600_H
1616
#define WipperSnapper_I2C_Driver_AS5600_H
1717

18+
#include <Adafruit_AS5600.h>
19+
1820
#include "WipperSnapper_I2C_Driver.h"
1921
#include "Wippersnapper.h"
20-
#include <Adafruit_AS5600.h>
2122

2223
/**************************************************************************/
2324
/*!
2425
@brief Class that provides a driver interface for a AS5600 sensor.
2526
*/
2627
/**************************************************************************/
2728
class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
28-
public:
29+
public:
2930
/*******************************************************************************/
3031
/*!
3132
@brief Constructor for the AS5600 sensor.
@@ -78,27 +79,24 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
7879
/*******************************************************************************/
7980
bool configureSensor() {
8081
return _as5600->enableWatchdog(false) || // Normal (high) power mode
81-
_as5600->setPowerMode(AS5600_POWER_MODE_NOM) ||
82-
// No Hysteresis
83-
_as5600->setHysteresis(AS5600_HYSTERESIS_OFF) ||
82+
_as5600->setPowerMode(AS5600_POWER_MODE_NOM) ||
83+
// No Hysteresis
84+
_as5600->setHysteresis(AS5600_HYSTERESIS_OFF) ||
8485

85-
// analog output (0-VCC for 0-360 degrees)
86-
_as5600->setOutputStage(AS5600_OUTPUT_STAGE_ANALOG_FULL) ||
86+
// analog output (0-VCC for 0-360 degrees)
87+
_as5600->setOutputStage(AS5600_OUTPUT_STAGE_ANALOG_FULL) ||
8788

88-
// setup filters
89-
_as5600->setSlowFilter(AS5600_SLOW_FILTER_16X) ||
90-
_as5600->setFastFilterThresh(AS5600_FAST_FILTER_THRESH_SLOW_ONLY) ||
89+
// setup filters
90+
_as5600->setSlowFilter(AS5600_SLOW_FILTER_16X) ||
91+
_as5600->setFastFilterThresh(AS5600_FAST_FILTER_THRESH_SLOW_ONLY) ||
9192

92-
// Reset position settings to defaults
93-
_as5600->setZPosition(0) ||
94-
_as5600->setMPosition(4095) ||
95-
_as5600->setMaxAngle(4095);
93+
// Reset position settings to defaults
94+
_as5600->setZPosition(0) || _as5600->setMPosition(4095) ||
95+
_as5600->setMaxAngle(4095);
9696

9797
return true;
9898
}
9999

100-
101-
102100
bool readSensor() {
103101
if (!_as5600->isMagnetDetected()) {
104102
return false;
@@ -130,7 +128,6 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
130128
return true;
131129
}
132130

133-
134131
/*******************************************************************************/
135132
/*!
136133
@brief Reads the Angle sensor with short wait for data.
@@ -149,9 +146,9 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
149146
return true;
150147
}
151148

152-
protected:
153-
float _angle; ///< Current angle reading from the AS5600 sensor
154-
Adafruit_AS5600 *_as5600; ///< Pointer to AS5600 sensor object
149+
protected:
150+
float _angle; ///< Current angle reading from the AS5600 sensor
151+
Adafruit_AS5600 *_as5600; ///< Pointer to AS5600 sensor object
155152
};
156153

157-
#endif // WipperSnapper_I2C_Driver_AS5600
154+
#endif // WipperSnapper_I2C_Driver_AS5600

0 commit comments

Comments
 (0)