From 2629d7a6ae1df170d7df8c7cc374c39971c079a6 Mon Sep 17 00:00:00 2001 From: Visualapproach Date: Mon, 8 Jul 2024 08:55:09 +0200 Subject: [PATCH] Fix: energy cost calculation (thx @jukkapirinen) --- Code/lib/BWC_unified/bwc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/lib/BWC_unified/bwc.cpp b/Code/lib/BWC_unified/bwc.cpp index 15e6166a..cd395686 100644 --- a/Code/lib/BWC_unified/bwc.cpp +++ b/Code/lib/BWC_unified/bwc.cpp @@ -1199,7 +1199,7 @@ void BWC::_updateTimes(){ _energy_power_W += cio->cio_states.jets * cio->getPowerLevels().JETPOWER; _energy_daily_Ws += elapsedtime_ms * _energy_power_W / 1000.0; - _energy_cost += _price * _energy_power_W / (1000.0 * 1000.0 * 3600.0); // money/kWh + _energy_cost += elapsedtime_ms *_price * _energy_power_W / (1000.0 * 1000.0 * 3600.0); // money/kWh if(_notes.size()) {