Skip to content

Commit 43d355c

Browse files
author
Richard Unger
committed
set min_elapsed_time is in s, not us
1 parent 321a6c6 commit 43d355c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sensors/MagneticSensorPWM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ MagneticSensorPWM::MagneticSensorPWM(uint8_t _pinPWM, int freqHz, int _total_pwm
4343
// define if the sensor uses interrupts
4444
is_interrupt_based = false;
4545

46-
min_elapsed_time = 1000000/freqHz; // set the minimum time between two readings
46+
min_elapsed_time = 1.0f/freqHz; // set the minimum time between two readings
4747

4848
// define as not set
4949
last_call_us = _micros();

0 commit comments

Comments
 (0)