SoC Calculator #754

Merged
muellerr merged 74 commits from soc-calculator into main 2023-10-11 10:50:48 +02:00
2 changed files with 2 additions and 9 deletions
Showing only changes of commit b9f05a14f7 - Show all commits

View File

@ -54,7 +54,7 @@ ReturnValue_t PowerController::getParameter(uint8_t domainId, uint8_t parameterI
coulombCounterVoltageUpperThreshold = oldCoulombCounterVoltageUpperThreshold; coulombCounterVoltageUpperThreshold = oldCoulombCounterVoltageUpperThreshold;
return result; return result;
} }
// parameterWrapper->set(coulombCounterVoltageUpperThreshold); parameterWrapper->set(coulombCounterVoltageUpperThreshold);
break; break;
} }
case 0x3: case 0x3:
@ -235,11 +235,6 @@ void PowerController::calculateStateOfCharge() {
} }
void PowerController::watchStateOfCharge() { void PowerController::watchStateOfCharge() {
if (test < 100) {
test++;
} else if (test == 100) {
// pwrCtrlCoreHk.coulombCounterCharge.value = 0.7;
}
if (pwrCtrlCoreHk.coulombCounterCharge.isValid()) { if (pwrCtrlCoreHk.coulombCounterCharge.isValid()) {
if (pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitOn) { if (pwrCtrlCoreHk.coulombCounterCharge.value < payloadOpLimitOn) {
PoolReadGuard pg(&enablePl); PoolReadGuard pg(&enablePl);

View File

@ -24,8 +24,6 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM
uint16_t startAtIndex) override; uint16_t startAtIndex) override;
private: private:
int test = 0;
bool enableHkSets = false; bool enableHkSets = false;
ParameterHelper parameterHelper; ParameterHelper parameterHelper;
@ -58,7 +56,7 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM
float batteryInternalResistance = 70.0 / 2.0 / 1000.0; // [Ohm] float batteryInternalResistance = 70.0 / 2.0 / 1000.0; // [Ohm]
float batteryMaximumCapacity = 2.6 * 2; // [Ah] float batteryMaximumCapacity = 2.6 * 2; // [Ah]
float coulombCounterVoltageUpperThreshold = 16.2; // [V] float coulombCounterVoltageUpperThreshold = 16.2; // [V]
double maxAllowedTimeDiff = 0.5; // [s] double maxAllowedTimeDiff = 1.5; // [s]
float payloadOpLimitOn = 0.90; // [%] float payloadOpLimitOn = 0.90; // [%]
float payloadOpLimitLow = 0.75; // [%] float payloadOpLimitLow = 0.75; // [%]
float higherModesLimit = 0.6; // [%] float higherModesLimit = 0.6; // [%]