small improvement
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Marius Eggert 2023-10-18 11:00:43 +02:00
parent 8d8eb6bd88
commit 77a555debc

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;