Skip to content

Commit

Permalink
fix ord is unneded on byte values
Browse files Browse the repository at this point in the history
  • Loading branch information
devotip committed Jul 22, 2019
1 parent a40f849 commit 568a904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modem/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def calc_checksum(self, data, checksum=0):
'0x3c'
'''
return (sum(map(ord, data)) + checksum) % 256
return (sum(map(lambda x: x, data)) + checksum) % 256

def calc_crc16(self, data, crc=0):
'''
Expand Down

0 comments on commit 568a904

Please sign in to comment.