this might be a bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2023-10-23 17:10:37 +02:00
parent 4ee84c0a78
commit c67a9fa2c2
4 changed files with 16 additions and 3 deletions

View File

@ -395,7 +395,6 @@ void PayloadPcduHandler::quickTransitionBackToOff(bool startTransitionToOff, boo
void PayloadPcduHandler::checkAdcValues() {
using namespace plpcdu;
checkJsonFileInit();
adcSet.processed[U_BAT_DIV_6] =
static_cast<float>(adcSet.channels[0]) * VOLTAGE_DIV / MAX122X_BIT * MAX122X_VREF;
adcSet.processed[U_NEG_V_FB] =
@ -529,6 +528,10 @@ void PayloadPcduHandler::checkJsonFileInit() {
params.initialize(sdcMan->getCurrentMountPrefix());
jsonFileInitComplete = true;
}
} else {
if (not sdcMan->isSdCardUsable(std::nullopt)) {
jsonFileInitComplete = false;
}
}
}
@ -564,6 +567,13 @@ bool PayloadPcduHandler::checkCurrent(float val, float upperBound, Event event)
return true;
}
ReturnValue_t PayloadPcduHandler::initialize() {
checkJsonFileInit();
return DeviceHandlerBase::initialize();
}
void PayloadPcduHandler::performOperationHook() { checkJsonFileInit(); }
ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode,
uint32_t* msToReachTheMode) {
if (commandedMode != MODE_OFF) {
@ -717,7 +727,6 @@ ReturnValue_t PayloadPcduHandler::handleDoubleParamUpdate(std::string key,
if (result != returnvalue::OK) {
return result;
}
params.setValue(key, newValue);
// Do this so the dumping and loading with the framework works as well
doubleDummy = newValue;
parameterWrapper->set(doubleDummy);