This commit is contained in:
Robin Müller 2023-04-16 03:52:45 +02:00
parent 680d496b28
commit ddbe30f832
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -30,13 +30,13 @@ ReturnValue_t ArcsecDatalinkLayer::checkRingBufForFrame(const uint8_t** decodedF
}
// Now we can try decoding the whole frame.
size_t encodedDataSize = 0;
slip_error_t slipError = slip_decode_frame(
decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx,
idx - startIdx + 1, &encodedDataSize, ARC_DEF_SAGITTA_SLIP_ID);
slip_error_t slipError =
slip_decode_frame(decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx,
idx - startIdx + 1, &encodedDataSize, ARC_DEF_SAGITTA_SLIP_ID);
decodeRingBuf.deleteData(idx + 1);
switch (slipError) {
case (SLIP_OK): {
if(decodedFrame != nullptr) {
if (decodedFrame != nullptr) {
*decodedFrame = decodedRxFrame;
}
frameLen = rxFrameSize;
@ -72,9 +72,7 @@ ReturnValue_t ArcsecDatalinkLayer::feedData(const uint8_t* rawData, size_t rawDa
return decodeRingBuf.writeData(rawData, rawDataLen);
}
void ArcsecDatalinkLayer::reset() {
decodeRingBuf.clear();
}
void ArcsecDatalinkLayer::reset() { decodeRingBuf.clear(); }
void ArcsecDatalinkLayer::encodeFrame(const uint8_t* data, size_t length, const uint8_t** txFrame,
size_t& size) {