Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
walchko committed Nov 26, 2023
1 parent 35042d3 commit c45b207
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/yivo/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,25 @@ def parse(self, c):
self.reset()
return False
elif self.readState == ReadState_t.H1_STATE:
c = ord(c)
# c = ord(c)
self.buff.append(c) # s0
self.readState = ReadState_t.S0_STATE
self.payload_size = c
self.payload_size = ord(c)
return False
# print("s0")
elif self.readState == ReadState_t.S0_STATE:
c = ord(c)
# c = ord(c)
self.buff.append(c) # s1
self.payload_size |= c << 8
self.payload_size |= ord(c) << 8
# print(f">> payload size:", self.payload_size)
self.readState = ReadState_t.S1_STATE
return False
# printp("s1")
# print(f"size: {self.payload_size}")
elif self.readState == ReadState_t.S1_STATE:
c = ord(c)
# c = ord(c)
self.buff.append(c) # type
self.buffer_msgid = c
self.buffer_msgid = ord(c)
self.readState = ReadState_t.TYPE_STATE
return False
# printp("t")
Expand All @@ -93,7 +93,7 @@ def parse(self, c):
self.readState = ReadState_t.CS_STATE
return False
elif self.readState == ReadState_t.CS_STATE:
c = ord(c)
# c = ord(c)
self.buff.append(c) # cs
# cs = self.checksum(self.buff[2:-1])
self.readState = ReadState_t.NONE_STATE
Expand Down

0 comments on commit c45b207

Please sign in to comment.