File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/components/i2c/drivers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,12 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
47
47
@brief Destructor for an AS5600 sensor.
48
48
*/
49
49
/* ******************************************************************************/
50
- ~WipperSnapper_I2C_Driver_AS5600 () { delete _as5600; }
50
+ ~WipperSnapper_I2C_Driver_AS5600 () {
51
+ if (_as5600) {
52
+ delete _as5600;
53
+ _as5600 = nullptr ;
54
+ }
55
+ }
51
56
52
57
/* ******************************************************************************/
53
58
/* !
@@ -129,7 +134,6 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
129
134
*/
130
135
/* ******************************************************************************/
131
136
bool getEventRaw (sensors_event_t *rawEvent) {
132
- ulong start = millis ();
133
137
if (!readSensor ()) {
134
138
return false ;
135
139
}
You can’t perform that action at this time.
0 commit comments