minor udpates for PLOC SUPV code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
cbf5ca6d93
commit
30aa802069
@ -730,17 +730,13 @@ class FactoryReset : public TcBase {
|
|||||||
: TcBase(params, Apid::DATA_LOGGER,
|
: TcBase(params, Apid::DATA_LOGGER,
|
||||||
static_cast<uint8_t>(tc::DataLoggerServiceId::FACTORY_RESET), 0) {}
|
static_cast<uint8_t>(tc::DataLoggerServiceId::FACTORY_RESET), 0) {}
|
||||||
|
|
||||||
ReturnValue_t buildPacket(std::optional<uint8_t> op) {
|
ReturnValue_t buildPacket(uint8_t op) {
|
||||||
if (op) {
|
setLenFromPayloadLen(1);
|
||||||
setLenFromPayloadLen(1);
|
|
||||||
}
|
|
||||||
auto res = checkSizeAndSerializeHeader();
|
auto res = checkSizeAndSerializeHeader();
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (op) {
|
payloadStart[0] = op;
|
||||||
payloadStart[0] = op.value();
|
|
||||||
}
|
|
||||||
return calcAndSetCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1467,11 +1467,10 @@ ReturnValue_t PlocSupervisorHandler::prepareReadGpioCmd(const uint8_t* commandDa
|
|||||||
ReturnValue_t PlocSupervisorHandler::prepareFactoryResetCmd(const uint8_t* commandData,
|
ReturnValue_t PlocSupervisorHandler::prepareFactoryResetCmd(const uint8_t* commandData,
|
||||||
size_t len) {
|
size_t len) {
|
||||||
FactoryReset resetCmd(spParams);
|
FactoryReset resetCmd(spParams);
|
||||||
std::optional<uint8_t> op;
|
if (len < 1) {
|
||||||
if (len > 0) {
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
op = commandData[0];
|
|
||||||
}
|
}
|
||||||
ReturnValue_t result = resetCmd.buildPacket(op);
|
ReturnValue_t result = resetCmd.buildPacket(commandData[0]);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 00991b92f15425aa80d2448ad304de46a08b5470
|
Subproject commit 20c2f615555e5e7ddc03a2a22e225f75dff1c320
|
Loading…
x
Reference in New Issue
Block a user