Skip to content

Commit

Permalink
Possible fix/workaround for OSX frequency trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorig committed Jun 16, 2017
1 parent 2e82237 commit 3ce6b56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stcgal/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def read_packet(self):

# read and check frame start magic
packet = bytes()
packet += self.read_bytes_safe(1)
# XXX: skip extraneous 0xFE byte?
leading = self.read_bytes_safe(1)
if leading == 0xfe:
leading = self.read_bytes_safe(1)
packet += leading
# Some (?) BSL versions don't send a frame start with the status
# packet. Let's be liberal and accept that always, just in case.
if packet[0] == self.PACKET_MCU[0]:
Expand Down

0 comments on commit 3ce6b56

Please sign in to comment.