some reaction wheel fixes
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:
@ -133,8 +133,15 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
|
||||
closeSpi(gpioId, gpioIF, mutex);
|
||||
return RwHandler::SPI_READ_FAILURE;
|
||||
}
|
||||
if(idx == 0) {
|
||||
if(byteRead != FLAG_BYTE) {
|
||||
sif::error << "Invalid data, expected start marker" << std::endl;
|
||||
closeSpi(gpioId, gpioIF, mutex);
|
||||
return RwHandler::NO_START_MARKER;
|
||||
}
|
||||
}
|
||||
|
||||
if (byteRead != 0x7E) {
|
||||
if (byteRead != FLAG_BYTE) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -145,6 +152,10 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
|
||||
}
|
||||
}
|
||||
|
||||
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||
sif::info << "RW start marker detected" << std::endl;
|
||||
#endif
|
||||
|
||||
size_t decodedFrameLen = 0;
|
||||
while(decodedFrameLen < replyBufferSize) {
|
||||
|
||||
@ -158,7 +169,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
|
||||
}
|
||||
}
|
||||
|
||||
if (byteRead == 0x7E) {
|
||||
if (byteRead == FLAG_BYTE) {
|
||||
/** Reached end of frame */
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user