PCF8583: refactor 1e6f for 1000000.f

This commit is contained in:
Matthias Grob 2024-12-11 19:45:12 +01:00 committed by Silvan Fuhrer
parent cbde9729e8
commit 5010b01e2e

View File

@ -195,8 +195,8 @@ void PCF8583::RunImpl()
}
// Calculate RPM and accuracy estimation
float indicated_rpm = (((float)diffCount / _param_pcf8583_magnet.get()) / ((float)diffTime / 1000000.f)) * 60.f;
float estimated_accurancy = 1 / (float)_param_pcf8583_magnet.get() / ((float)diffTime / 1000000) * 60.f;
float indicated_rpm = (((float)diffCount / _param_pcf8583_magnet.get()) / ((float)diffTime / 1e6f)) * 60.f;
float estimated_accurancy = 1 / (float)_param_pcf8583_magnet.get() / ((float)diffTime / 1e6f) * 60.f;
// publish data to uorb
rpm_s msg{};