diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ef8a06..681b7a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ list yields a list of all related PRs for each release. ## Changed +- PCDU handler only called once in PST, but can handle multiple messages now - Update rootfs base of Linux, all related OBSW changes - Use gpsd version 3.17 now. Includes API changes - Add `/usr/local/bin` to PATH. All shell scripts are there now diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 0f9232e0..942404d3 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -514,7 +514,6 @@ ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) { #if Q7S_EM != 1 // PCDU handlers receives two messages and both must be handled thisSequence->addSlot(objects::PCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::PCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::PDU1_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); diff --git a/mission/devices/PCDUHandler.cpp b/mission/devices/PCDUHandler.cpp index 1a31e608..10d12cf8 100644 --- a/mission/devices/PCDUHandler.cpp +++ b/mission/devices/PCDUHandler.cpp @@ -95,17 +95,20 @@ void PCDUHandler::initializeSwitchStates() { } void PCDUHandler::readCommandQueue() { - ReturnValue_t result; + ReturnValue_t result = RETURN_OK; CommandMessage command; - result = commandQueue->receiveMessage(&command); - if (result != RETURN_OK) { - return; - } + for (result = commandQueue->receiveMessage(&command); result == RETURN_OK; + result = commandQueue->receiveMessage(&command)) { + result = commandQueue->receiveMessage(&command); + if (result != RETURN_OK) { + return; + } - result = poolManager.handleHousekeepingMessage(&command); - if (result == RETURN_OK) { - return; + result = poolManager.handleHousekeepingMessage(&command); + if (result == RETURN_OK) { + return; + } } }