PL PCDU JSON update #812
@ -43,6 +43,8 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
- PL Enable set of the power controller is now set to invalid properly if the power controller
|
- PL Enable set of the power controller is now set to invalid properly if the power controller
|
||||||
is not in normal mode.
|
is not in normal mode.
|
||||||
- MPSoC debug mode.
|
- MPSoC debug mode.
|
||||||
|
- Possible bugfix for PL PCDU parameter JSON handling which might not have been initialized
|
||||||
|
properly from the JSON file.
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
@ -395,7 +395,6 @@ void PayloadPcduHandler::quickTransitionBackToOff(bool startTransitionToOff, boo
|
|||||||
|
|
||||||
void PayloadPcduHandler::checkAdcValues() {
|
void PayloadPcduHandler::checkAdcValues() {
|
||||||
using namespace plpcdu;
|
using namespace plpcdu;
|
||||||
checkJsonFileInit();
|
|
||||||
adcSet.processed[U_BAT_DIV_6] =
|
adcSet.processed[U_BAT_DIV_6] =
|
||||||
static_cast<float>(adcSet.channels[0]) * VOLTAGE_DIV / MAX122X_BIT * MAX122X_VREF;
|
static_cast<float>(adcSet.channels[0]) * VOLTAGE_DIV / MAX122X_BIT * MAX122X_VREF;
|
||||||
adcSet.processed[U_NEG_V_FB] =
|
adcSet.processed[U_NEG_V_FB] =
|
||||||
@ -529,6 +528,10 @@ void PayloadPcduHandler::checkJsonFileInit() {
|
|||||||
params.initialize(sdcMan->getCurrentMountPrefix());
|
params.initialize(sdcMan->getCurrentMountPrefix());
|
||||||
jsonFileInitComplete = true;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PayloadPcduHandler::initialize() {
|
||||||
|
checkJsonFileInit();
|
||||||
|
return DeviceHandlerBase::initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PayloadPcduHandler::performOperationHook() { checkJsonFileInit(); }
|
||||||
|
|
||||||
ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode,
|
ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode,
|
||||||
uint32_t* msToReachTheMode) {
|
uint32_t* msToReachTheMode) {
|
||||||
if (commandedMode != MODE_OFF) {
|
if (commandedMode != MODE_OFF) {
|
||||||
|
@ -67,7 +67,9 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
|||||||
SdCardMountedIF* sdcMan, Stack5VHandler& stackHandler, bool periodicPrintout);
|
SdCardMountedIF* sdcMan, Stack5VHandler& stackHandler, bool periodicPrintout);
|
||||||
|
|
||||||
void setToGoToNormalModeImmediately(bool enable);
|
void setToGoToNormalModeImmediately(bool enable);
|
||||||
|
void performOperationHook() override;
|
||||||
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||||
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
static ReturnValue_t extConvAsTwoCallback(SpiComIF* comIf, SpiCookie* cookie,
|
static ReturnValue_t extConvAsTwoCallback(SpiComIF* comIf, SpiCookie* cookie,
|
||||||
|
Loading…
Reference in New Issue
Block a user