afmt
This commit is contained in:
parent
680d496b28
commit
ddbe30f832
@ -30,13 +30,13 @@ 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;
|
||||||
slip_error_t slipError = slip_decode_frame(
|
slip_error_t slipError =
|
||||||
decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx,
|
slip_decode_frame(decodedRxFrame, &rxFrameSize, rxAnalysisBuffer + startIdx,
|
||||||
idx - startIdx + 1, &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) {
|
if (decodedFrame != nullptr) {
|
||||||
*decodedFrame = decodedRxFrame;
|
*decodedFrame = decodedRxFrame;
|
||||||
}
|
}
|
||||||
frameLen = rxFrameSize;
|
frameLen = rxFrameSize;
|
||||||
@ -72,9 +72,7 @@ ReturnValue_t ArcsecDatalinkLayer::feedData(const uint8_t* rawData, size_t rawDa
|
|||||||
return decodeRingBuf.writeData(rawData, rawDataLen);
|
return decodeRingBuf.writeData(rawData, rawDataLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArcsecDatalinkLayer::reset() {
|
void ArcsecDatalinkLayer::reset() { decodeRingBuf.clear(); }
|
||||||
decodeRingBuf.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user