Skip to content

Commit

Permalink
Check ack length
Browse files Browse the repository at this point in the history
  • Loading branch information
iory committed Nov 2, 2024
1 parent 387e331 commit 17f94b7
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 17f94b7

Please sign in to comment.