Skip to content

Commit

Permalink
Revert "Avoid false timeout on timer overflow"
Browse files Browse the repository at this point in the history
This reverts commit f4c2835.
  • Loading branch information
pembem22 committed Jan 19, 2025
1 parent f4c2835 commit 6a535a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sensors/softfusion/softfusionsensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class SoftFusionSensor : public Sensor {
void checkSensorTimeout() {
uint32_t now = micros();
constexpr uint32_t sensorTimeoutMicros = 2e6; // 2 seconds
if (now - m_lastRotationUpdate < sensorTimeoutMicros) {
if (m_lastRotationUpdate + sensorTimeoutMicros > now) {
return;
}

Expand Down

0 comments on commit 6a535a6

Please sign in to comment.