Skip to content

Commit cadcdc4

Browse files
committed
Corrected rounding in rainrate calculation
1 parent f55880b commit cadcdc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/mainworker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2783,7 +2783,7 @@ void MainWorker::decode_Rain(const int HwdID, const _eHardwareTypes HwdType, con
27832783
if (result.size() == 1)
27842784
{
27852785
float totalRainFallLastHour = TotalRain - static_cast<float>(atof(result[0][0].c_str()));
2786-
Rainrate = round(totalRainFallLastHour) * 100;
2786+
Rainrate = round(totalRainFallLastHour*100.0f);
27872787
}
27882788
}
27892789
}

0 commit comments

Comments
 (0)