maybe this fixes the timing issue?
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
c1dc5846cd
commit
cf4edac604
@ -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();
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user