energy: (fixes #423) SimpleDeviceEnergyModel calculation of consumed energy
This commit is contained in:
committed by
Tom Henderson
parent
cab3d4b9f5
commit
52fa7235b2
@@ -104,7 +104,7 @@ SimpleDeviceEnergyModel::SetCurrentA (double current)
|
||||
|
||||
double energyToDecrease = 0.0;
|
||||
double supplyVoltage = m_source->GetSupplyVoltage ();
|
||||
energyToDecrease = duration.GetSeconds () * current * supplyVoltage;
|
||||
energyToDecrease = duration.GetSeconds () * m_actualCurrentA * supplyVoltage;
|
||||
|
||||
// update total energy consumption
|
||||
m_totalEnergyConsumption += energyToDecrease;
|
||||
|
||||
Reference in New Issue
Block a user