this should work
This commit is contained in:
parent
b635e02f2d
commit
98a1ce5380
@ -44,12 +44,17 @@ ReturnValue_t PowerController::getParameter(uint8_t domainId, uint8_t parameterI
|
||||
break;
|
||||
case 0x2: {
|
||||
float oldCoulombCounterVoltageUpperThreshold = coulombCounterVoltageUpperThreshold;
|
||||
parameterWrapper->set(coulombCounterVoltageUpperThreshold);
|
||||
ReturnValue_t result = calculateCoulombCounterChargeUpperThreshold();
|
||||
ReturnValue_t result = newValues->getElement(&coulombCounterVoltageUpperThreshold);
|
||||
if (result != returnvalue::OK) {
|
||||
coulombCounterVoltageUpperThreshold = oldCoulombCounterVoltageUpperThreshold;
|
||||
return returnvalue::FAILED;
|
||||
return result;
|
||||
}
|
||||
result = calculateCoulombCounterChargeUpperThreshold();
|
||||
if (result != returnvalue::OK) {
|
||||
coulombCounterVoltageUpperThreshold = oldCoulombCounterVoltageUpperThreshold;
|
||||
return result;
|
||||
}
|
||||
// parameterWrapper->set(coulombCounterVoltageUpperThreshold);
|
||||
break;
|
||||
}
|
||||
case 0x3:
|
||||
@ -230,6 +235,11 @@ void PowerController::calculateStateOfCharge() {
|
||||
}
|
||||
|
||||
void PowerController::watchStateOfCharge() {
|
||||
if (test < 100) {
|
||||
test++;
|
||||
} else if (test == 100) {
|
||||
// pwrCtrlCoreHk.coulombCounterCharge.value = 0.7;
|
||||
}
|
||||
if (pwrCtrlCoreHk.coulombCounterCharge.isValid()) {
|
||||
if (pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitOn) {
|
||||
PoolReadGuard pg(&enablePl);
|
||||
|
Loading…
Reference in New Issue
Block a user