cleanr PL PCDU data on off cmd
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
83362f7a00
commit
371a11684a
@ -52,8 +52,8 @@ ReturnValue_t PCDUHandler::initialize() {
|
|||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
result = pdu2Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||||
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(),
|
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(), commandQueue->getId(),
|
||||||
commandQueue->getId(), true);
|
true);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||||
<< "PDU2Handler" << std::endl;
|
<< "PDU2Handler" << std::endl;
|
||||||
@ -68,8 +68,8 @@ ReturnValue_t PCDUHandler::initialize() {
|
|||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
result = pdu1Handler->getSubscriptionInterface()->subscribeForSetUpdateMessage(
|
||||||
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(),
|
static_cast<uint32_t>(P60System::SetIds::CORE), this->getObjectId(), commandQueue->getId(),
|
||||||
commandQueue->getId(), true);
|
true);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
sif::error << "PCDUHandler::initialize: Failed to subscribe for set update messages from "
|
||||||
<< "PDU1Handler" << std::endl;
|
<< "PDU1Handler" << std::endl;
|
||||||
@ -113,8 +113,7 @@ void PCDUHandler::handleChangedDataset(sid_t sid, store_address_t storeId, bool*
|
|||||||
if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
if (sid == sid_t(objects::PDU2_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
||||||
updateHkTableDataset(storeId, &pdu2CoreHk, &timeStampPdu2HkDataset);
|
updateHkTableDataset(storeId, &pdu2CoreHk, &timeStampPdu2HkDataset);
|
||||||
updatePdu2SwitchStates();
|
updatePdu2SwitchStates();
|
||||||
} else if (sid ==
|
} else if (sid == sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
||||||
sid_t(objects::PDU1_HANDLER, static_cast<uint32_t>(P60System::SetIds::CORE))) {
|
|
||||||
updateHkTableDataset(storeId, &pdu1CoreHk, &timeStampPdu1HkDataset);
|
updateHkTableDataset(storeId, &pdu1CoreHk, &timeStampPdu1HkDataset);
|
||||||
updatePdu1SwitchStates();
|
updatePdu1SwitchStates();
|
||||||
} else {
|
} else {
|
||||||
|
@ -33,6 +33,7 @@ void PayloadPcduHandler::doStartUp() {
|
|||||||
if (pwrStateMachine.getState() == power::States::IDLE) {
|
if (pwrStateMachine.getState() == power::States::IDLE) {
|
||||||
pwrStateMachine.start(MODE_ON, pwrSubmode);
|
pwrStateMachine.start(MODE_ON, pwrSubmode);
|
||||||
}
|
}
|
||||||
|
clearSetOnOffFlag = true;
|
||||||
auto opCode = pwrStateMachine.fsm();
|
auto opCode = pwrStateMachine.fsm();
|
||||||
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
||||||
pwrStateMachine.reset();
|
pwrStateMachine.reset();
|
||||||
@ -50,6 +51,11 @@ void PayloadPcduHandler::doShutDown() {
|
|||||||
if (pwrStateMachine.getState() == power::States::IDLE) {
|
if (pwrStateMachine.getState() == power::States::IDLE) {
|
||||||
pwrStateMachine.start(MODE_OFF, 0);
|
pwrStateMachine.start(MODE_OFF, 0);
|
||||||
}
|
}
|
||||||
|
if (clearSetOnOffFlag) {
|
||||||
|
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
|
||||||
|
clearSetOnOffFlag = false;
|
||||||
|
}
|
||||||
|
|
||||||
auto opCode = pwrStateMachine.fsm();
|
auto opCode = pwrStateMachine.fsm();
|
||||||
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
||||||
pwrStateMachine.reset();
|
pwrStateMachine.reset();
|
||||||
|
@ -124,6 +124,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
|||||||
bool txToMpaInjectionRequested = false;
|
bool txToMpaInjectionRequested = false;
|
||||||
bool mpaToHpaInjectionRequested = false;
|
bool mpaToHpaInjectionRequested = false;
|
||||||
bool allOnInjectRequested = false;
|
bool allOnInjectRequested = false;
|
||||||
|
bool clearSetOnOffFlag = true;
|
||||||
|
|
||||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
uint8_t tempReadDivisor = 1;
|
uint8_t tempReadDivisor = 1;
|
||||||
|
@ -102,11 +102,7 @@ namespace P60System {
|
|||||||
|
|
||||||
enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 };
|
enum class BatteryModes : uint8_t { CRITICAL = 1, SAFE = 2, NORMAL = 3, FULL = 4 };
|
||||||
|
|
||||||
enum class SetIds : uint32_t {
|
enum class SetIds : uint32_t { CORE = 1, AUX = 2, CONFIG = 3 };
|
||||||
CORE = 1,
|
|
||||||
AUX = 2,
|
|
||||||
CONFIG = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace P60System
|
} // namespace P60System
|
||||||
|
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit b2bab4c964848d6f78a6f44525166dcf24cc46b6
|
Subproject commit 9493cdaabf3cef636dcab2c98768215b0e58636b
|
Loading…
Reference in New Issue
Block a user