v1.12.0 #269

Merged
muellerr merged 493 commits from develop into main 2022-07-04 11:19:05 +02:00
2 changed files with 21 additions and 18 deletions
Showing only changes of commit cf4edac604 - Show all commits

View File

@ -2,6 +2,7 @@
#include "devices/gpioIds.h" #include "devices/gpioIds.h"
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"
#include <fsfw/timemanager/Stopwatch.h>
#include "fsfw_hal/linux/UnixFileGuard.h" #include "fsfw_hal/linux/UnixFileGuard.h"
#include "fsfw_hal/linux/spi/SpiCookie.h" #include "fsfw_hal/linux/spi/SpiCookie.h"
#include "mission/devices/RwHandler.h" #include "mission/devices/RwHandler.h"
@ -10,6 +11,7 @@ namespace rwSpiCallback {
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData, ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
size_t sendLen, void* args) { size_t sendLen, void* args) {
Stopwatch watch;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
RwHandler* handler = reinterpret_cast<RwHandler*>(args); RwHandler* handler = reinterpret_cast<RwHandler*>(args);
@ -18,7 +20,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sen
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
uint8_t writeBuffer[2]; uint8_t writeBuffer[2] = {};
uint8_t writeSize = 0; uint8_t writeSize = 0;
gpioId_t gpioId = cookie->getChipSelectPin(); gpioId_t gpioId = cookie->getChipSelectPin();

View File

@ -33,27 +33,28 @@ ReturnValue_t pst::pstSpiRw(FixedTimeslotTaskIF *thisSequence) {
uint32_t length = thisSequence->getPeriodMs(); uint32_t length = thisSequence->getPeriodMs();
static_cast<void>(length); static_cast<void>(length);
thisSequence->addSlot(objects::RW1, length * 0, DeviceHandlerIF::PERFORM_OPERATION); 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, 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, 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::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.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); thisSequence->addSlot(objects::RW4, length * 0.8, DeviceHandlerIF::GET_READ);
return thisSequence->checkSequence(); return thisSequence->checkSequence();
} }