diff --git a/bsp_q7s/callbacks/rwSpiCallback.cpp b/bsp_q7s/callbacks/rwSpiCallback.cpp index 3ca3c181..d4163020 100644 --- a/bsp_q7s/callbacks/rwSpiCallback.cpp +++ b/bsp_q7s/callbacks/rwSpiCallback.cpp @@ -2,6 +2,7 @@ #include "devices/gpioIds.h" #include "fsfw/serviceinterface/ServiceInterface.h" +#include #include "fsfw_hal/linux/UnixFileGuard.h" #include "fsfw_hal/linux/spi/SpiCookie.h" #include "mission/devices/RwHandler.h" @@ -10,6 +11,7 @@ namespace rwSpiCallback { ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData, size_t sendLen, void* args) { + Stopwatch watch; ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; RwHandler* handler = reinterpret_cast(args); @@ -18,7 +20,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen return HasReturnvaluesIF::RETURN_FAILED; } - uint8_t writeBuffer[2]; + uint8_t writeBuffer[2] = {}; uint8_t writeSize = 0; gpioId_t gpioId = cookie->getChipSelectPin(); diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index b1d0a218..f08e08d4 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -33,27 +33,28 @@ ReturnValue_t pst::pstSpiRw(FixedTimeslotTaskIF *thisSequence) { uint32_t length = thisSequence->getPeriodMs(); static_cast(length); thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW1, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW1, length * 0.5, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW1, length * 0.65, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW1, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RW2, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW2, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW2, length * 0.5, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW2, length * 0.65, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW2, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RW3, length * 0, DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::RW3, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW3, length * 0.5, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW3, length * 0.65, DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::RW3, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::RW4, length * 0, DeviceHandlerIF::PERFORM_OPERATION); + + thisSequence->addSlot(objects::RW1, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RW2, length * 0.2, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::RW3, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::RW4, length * 0.2, DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::RW4, length * 0.5, DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::RW4, length * 0.65, DeviceHandlerIF::SEND_READ); + + thisSequence->addSlot(objects::RW1, length * 0.8, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW2, length * 0.8, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW3, length * 0.8, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::GET_WRITE); + + thisSequence->addSlot(objects::RW1, length * 0.8, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW2, length * 0.8, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW3, length * 0.8, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::SEND_READ); + + thisSequence->addSlot(objects::RW1, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RW2, length * 0.8, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::RW3, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::GET_READ); return thisSequence->checkSequence(); }