Once upon a time Robin was made happy #800

Merged
meggert merged 20 commits from make-robin-happy-about-timestuff into dev-7.5.0 2023-12-04 11:21:53 +01:00
Showing only changes of commit 77a555debc - Show all commits

View File

@ -287,7 +287,7 @@ ReturnValue_t PowerController::calculateOpenCircuitVoltageCharge() {
ReturnValue_t PowerController::calculateCoulombCounterCharge() { ReturnValue_t PowerController::calculateCoulombCounterCharge() {
double timeDiff = 0.0; double timeDiff = 0.0;
if (timevalOperations::toDouble(oldTime) != 0) { if (oldTime.tv_sec != 0) {
timeDiff = timevalOperations::toDouble(now - oldTime); timeDiff = timevalOperations::toDouble(now - oldTime);
} else { } else {
return returnvalue::FAILED; return returnvalue::FAILED;