Skip to content

Commit

Permalink
Fix: energy cost calculation (thx @jukkapirinen)
Browse files Browse the repository at this point in the history
  • Loading branch information
visualapproach committed Jul 8, 2024
1 parent e02b104 commit 2629d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/lib/BWC_unified/bwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down

0 comments on commit 2629d7a

Please sign in to comment.