I was just looking at the session Wh counter code, and it appears to make the erroneous assumption that it's called once per second. The code is in g_OnboardDisplay::Update() and is as follows:
if (g_EvseController.GetCurSvcLevel() == 2) { // first verify L2 or L1
g_WattSeconds = g_WattSeconds + (VOLTS_FOR_L2 * current / 1000); // accumulate Watt Seconds for Level2 charging
}
else {
g_WattSeconds = g_WattSeconds + (VOLTS_FOR_L1 * current / 1000); // accumulate Watt Seconds for Level1 charging
}
The code doesn't take into time how much time has elapsed. It's just assuming that it's being called once per second. Though the code is usually called once per second, it can actually be called at random intervals, whenever the display needs to be updated
I was just looking at the session Wh counter code, and it appears to make the erroneous assumption that it's called once per second. The code is in g_OnboardDisplay::Update() and is as follows:
The code doesn't take into time how much time has elapsed. It's just assuming that it's being called once per second. Though the code is usually called once per second, it can actually be called at random intervals, whenever the display needs to be updated