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 {
4747 @brief Destructor for an AS5600 sensor.
4848 */
4949 /* ******************************************************************************/
50- ~WipperSnapper_I2C_Driver_AS5600 () { delete _as5600; }
50+ ~WipperSnapper_I2C_Driver_AS5600 () {
51+ if (_as5600) {
52+ delete _as5600;
53+ _as5600 = nullptr ;
54+ }
55+ }
5156
5257 /* ******************************************************************************/
5358 /* !
@@ -129,7 +134,6 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
129134 */
130135 /* ******************************************************************************/
131136 bool getEventRaw (sensors_event_t *rawEvent) {
132- ulong start = millis ();
133137 if (!readSensor ()) {
134138 return false ;
135139 }
You can’t perform that action at this time.
0 commit comments