energy: (fixes #658) EnergySource correct current update
Fixes the update time of EnergySource when SetCurrentA is used.
This commit is contained in:
committed by
Tom Henderson
parent
afe54bad8d
commit
4e3d9485c4
@@ -110,10 +110,10 @@ SimpleDeviceEnergyModel::SetCurrentA (double current)
|
|||||||
m_totalEnergyConsumption += energyToDecrease;
|
m_totalEnergyConsumption += energyToDecrease;
|
||||||
// update last update time stamp
|
// update last update time stamp
|
||||||
m_lastUpdateTime = Simulator::Now ();
|
m_lastUpdateTime = Simulator::Now ();
|
||||||
// notify energy source
|
|
||||||
m_source->UpdateEnergySource ();
|
|
||||||
// update the current drain
|
// update the current drain
|
||||||
m_actualCurrentA = current;
|
m_actualCurrentA = current;
|
||||||
|
// notify energy source
|
||||||
|
m_source->UpdateEnergySource ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user