Skip to content

Commit

Permalink
Merge pull request #103 from iory/ack
Browse files Browse the repository at this point in the history
Check ack length
  • Loading branch information
iory authored Nov 2, 2024
2 parents 387e331 + 17f94b7 commit f4d0704
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rcb4/armh7interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ def get_ack(self):

def check_ack(self):
ack_byte_list = self.get_ack()
return ack_byte_list[1] == 0x06
if ack_byte_list is not None and len(ack_byte_list) > 1:
return ack_byte_list[1] == 0x06
else:
return False

def check_firmware_version(self):
version = self.get_version()
Expand Down

0 comments on commit f4d0704

Please sign in to comment.