Update sagittactl to v10.7 #605

Merged
muellerr merged 9 commits from update_sagittactl_v10.7 into develop 2023-04-16 11:25:39 +02:00
2 changed files with 6 additions and 34 deletions
Showing only changes of commit 680d496b28 - Show all commits

View File

@ -30,13 +30,16 @@ ReturnValue_t ArcsecDatalinkLayer::checkRingBufForFrame(const uint8_t** decodedF
} }
// Now we can try decoding the whole frame. // Now we can try decoding the whole frame.
size_t encodedDataSize = 0; size_t encodedDataSize = 0;
// TODO: Find SLIP ID
slip_error_t slipError = slip_decode_frame( slip_error_t slipError = slip_decode_frame(
decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx, decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx,
sizeof(rxAnalysisBuffer) - startIdx, &encodedDataSize, ARC_DEF_SAGITTA_SLIP_ID); idx - startIdx + 1, &encodedDataSize, ARC_DEF_SAGITTA_SLIP_ID);
decodeRingBuf.deleteData(idx + 1); decodeRingBuf.deleteData(idx + 1);
switch (slipError) { switch (slipError) {
case (SLIP_OK): { case (SLIP_OK): {
if(decodedFrame != nullptr) {
*decodedFrame = decodedRxFrame;
}
frameLen = rxFrameSize;
return returnvalue::OK; return returnvalue::OK;
} }
case (SLIP_BAD_CRC): { case (SLIP_BAD_CRC): {
@ -57,32 +60,6 @@ ReturnValue_t ArcsecDatalinkLayer::checkRingBufForFrame(const uint8_t** decodedF
} }
} }
} }
// switch (decResult) {
// case ARC_DEC_INPROGRESS: {
// break;
// }
// case ARC_DEC_ERROR: {
// decodeRingBuf.deleteData(idx);
// return returnvalue::FAILED;
// }
// case ARC_DEC_ASYNC:
// case ARC_DEC_SYNC: {
// // Reset length of SLIP struct for next frame
// slipInfo.length = 0;
// if (decodedFrame != nullptr) {
// *decodedFrame = decodedRxFrame;
// }
// frameLen = rxFrameSize;
// decodeRingBuf.deleteData(idx);
// return returnvalue::OK;
// }
// default:
// sif::debug << "ArcsecDatalinkLayer::decodeFrame: Unknown result code" << std::endl;
// break;
// return returnvalue::FAILED;
// }
// }
// decodeRingBuf.deleteData(currentLen);
return DEC_IN_PROGRESS; return DEC_IN_PROGRESS;
} }
@ -96,14 +73,9 @@ ReturnValue_t ArcsecDatalinkLayer::feedData(const uint8_t* rawData, size_t rawDa
} }
void ArcsecDatalinkLayer::reset() { void ArcsecDatalinkLayer::reset() {
// slipInit();
decodeRingBuf.clear(); decodeRingBuf.clear();
} }
// void ArcsecDatalinkLayer::slipInit() {
// slip_decode_init(rxBufferArc, sizeof(rxBufferArc), &slipInfo);
// }
void ArcsecDatalinkLayer::encodeFrame(const uint8_t* data, size_t length, const uint8_t** txFrame, void ArcsecDatalinkLayer::encodeFrame(const uint8_t* data, size_t length, const uint8_t** txFrame,
size_t& size) { size_t& size) {
slip_encode_frame(data, length, txEncoded, &size, ARC_DEF_SAGITTA_SLIP_ID); slip_encode_frame(data, length, txEncoded, &size, ARC_DEF_SAGITTA_SLIP_ID);

2
tmtc

@ -1 +1 @@
Subproject commit d00e4247f66eb2f010f1fe53ee7f59b7fb992481 Subproject commit d623e83be8536f8887f1da00a1f0c4be191db1e8