mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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:
parent
ade4539a9c
commit
f71f161e6e
@ -656,7 +656,7 @@ sub GasCalculator_Notify($$)
|
|||||||
if ($GasCountReadingTimestampDelta != 0)
|
if ($GasCountReadingTimestampDelta != 0)
|
||||||
{
|
{
|
||||||
### Calculate DV (Volume difference) of previous and current value / [cubic]
|
### 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};
|
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
|
### Calculate Current Power P = DV/Dt[cubic/s] * GaszValue * GasNominalHeatingValue[kWh/cubic] * 3600[s/h] / SiPrefixPowerFactor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user