73_GasCalculator.pm: bugfix: floating number flutter corrected

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20577 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2019-11-25 13:10:23 +00:00
parent ade4539a9c
commit f71f161e6e

View File

@ -656,7 +656,7 @@ sub GasCalculator_Notify($$)
if ($GasCountReadingTimestampDelta != 0)
{
### Calculate DV (Volume difference) of previous and current value / [cubic]
my $GasCountReadingValueDelta = sprintf('%.3f', ($GasCountReadingValueCurrent - $GasCountReadingValuePrevious));
my $GasCountReadingValueDelta = sprintf('%.3f', ($GasCountReadingValueCurrent )) - sprintf('%.3f', ($GasCountReadingValuePrevious));
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator - GasCountReadingValueDelta : " . $GasCountReadingValueDelta . " " . $attr{$GasCalcName}{Volume};
### Calculate Current Power P = DV/Dt[cubic/s] * GaszValue * GasNominalHeatingValue[kWh/cubic] * 3600[s/h] / SiPrefixPowerFactor