Skip to content

Commit

Permalink
use getValue and std:Abs instead of fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
naheedsa committed Feb 22, 2024
1 parent f9f1340 commit 57f38ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/focuser/moonlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,10 @@ void MoonLite::TimerHit()
rc = readTemperature();
if (rc)
{
if (fabs(lastTemperature - TemperatureNP[0].value) >= 0.5)
if (std::abs(lastTemperature - TemperatureNP[0].getValue()) >= 0.5)
{
TemperatureNP.apply();
lastTemperature = static_cast<uint32_t>(TemperatureNP[0].value);
lastTemperature = static_cast<uint32_t>(TemperatureNP[0].getValue());
}
}

Expand Down

0 comments on commit 57f38ad

Please sign in to comment.