Skip to content

Commit

Permalink
Fix softfusion watchdog timer reset (SlimeVR#346)
Browse files Browse the repository at this point in the history
Fix some microcontrollers crashing (Soft WDT reset) during the calibration loop
  • Loading branch information
jojos38 authored Oct 30, 2024
1 parent b278bcf commit 2946a6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sensors/softfusion/softfusionsensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ class SoftFusionSensor : public Sensor
gyro[2] = xyz[2];
}
);
yield();
}
return std::make_pair(accel, gyro);
}
Expand Down Expand Up @@ -484,6 +485,7 @@ class SoftFusionSensor : public Sensor
[&accelSamples](const int16_t xyz[3], const sensor_real_t timeDelta) { accelSamples++; },
[&gyroSamples](const int16_t xyz[3], const sensor_real_t timeDelta) { gyroSamples++; }
);
yield();
}

const auto millisFromStart = currentTime - (calibTarget - 1000 * SampleRateCalibSeconds);
Expand Down

0 comments on commit 2946a6a

Please sign in to comment.