mirror of
https://github.com/EnhancedRadioDevices/HamShield_KISS
synced 2023-10-28 07:05:50 +00:00
working afsk receive
This commit is contained in:
@@ -279,7 +279,6 @@ bool AFSK::Decoder::read() {
|
|||||||
while(rx_fifo.count()) {
|
while(rx_fifo.count()) {
|
||||||
// Grab the character
|
// Grab the character
|
||||||
char c = rx_fifo.dequeue();
|
char c = rx_fifo.dequeue();
|
||||||
//Serial.println(c);
|
|
||||||
bool escaped = false;
|
bool escaped = false;
|
||||||
if(c == HDLC_ESCAPE) { // We received an escaped byte, mark it
|
if(c == HDLC_ESCAPE) { // We received an escaped byte, mark it
|
||||||
escaped = true;
|
escaped = true;
|
||||||
@@ -287,7 +286,7 @@ bool AFSK::Decoder::read() {
|
|||||||
//currentPacket->append(HDLC_ESCAPE); // Append without FCS
|
//currentPacket->append(HDLC_ESCAPE); // Append without FCS
|
||||||
c = rx_fifo.dequeue(); // Reset to the next character
|
c = rx_fifo.dequeue(); // Reset to the next character
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append all the bytes
|
// Append all the bytes
|
||||||
// This will include unescaped HDLC_FRAME bytes
|
// This will include unescaped HDLC_FRAME bytes
|
||||||
if(c != HDLC_FRAME || escaped) // Append frame if it is escaped
|
if(c != HDLC_FRAME || escaped) // Append frame if it is escaped
|
||||||
|
|||||||
Reference in New Issue
Block a user