Skip to content

Commit

Permalink
fix conversion to int
Browse files Browse the repository at this point in the history
  • Loading branch information
bleykauf committed Dec 5, 2023
1 parent 3da9a9d commit 5b6e0e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meer_tec/mecom.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def __new__(cls, response: str, value_type: Type[FloatOrInt]):

def __init__(self, response: str, value_type: Type[FloatOrInt]) -> None:
self.value_type = value_type
self.device_addr = int(self[1:3])
self.seq_num = int(self[3:7])
self.device_addr = int(self[1:3], 8)
self.seq_num = int(self[3:7], 16)
self.payload = self[7:-5]
self.checksum = self[-5:-1]

Expand Down

0 comments on commit 5b6e0e7

Please sign in to comment.