Permalink
Browse files

ThroughSerial byte stuffing bugfix

  • Loading branch information...
gioblu committed Jan 28, 2018
1 parent 0158bf1 commit ae583661c1df51564b8d51d97c2b97c1af02dc4b
Showing with 2 additions and 2 deletions.
  1. +2 −2 strategies/ThroughSerial/ThroughSerial.h
@@ -145,10 +145,10 @@ class ThroughSerial {
if(result == TS_ESC) {
result = receive_byte();
// Escaping byte-stuffing violation
result ^= TS_ESC;
// Avoid byte-stuffing violation
if((result != TS_START) && (result != TS_ESC) && (result != TS_END))
return TS_FAIL;
result ^= TS_ESC;
}
// No end flag, byte-stuffing violation

0 comments on commit ae58366

Please sign in to comment.