mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-06 12:41:37 +02:00
RPI: properly catch exception when crc8 check failed
This commit is contained in:
parent
99c2b9f7a9
commit
f332738ceb
2 changed files with 6 additions and 6 deletions
|
@ -86,13 +86,13 @@ def poll_inverter(inverter, do_init, retries=4):
|
|||
dst=inverter_ser
|
||||
)))
|
||||
response = None
|
||||
while com.rxtx():
|
||||
try:
|
||||
try:
|
||||
while com.rxtx():
|
||||
response = com.get_payload()
|
||||
payload_ttl = 0
|
||||
except Exception as e_all:
|
||||
print(f'Error while retrieving data: {e_all}')
|
||||
pass
|
||||
except Exception as e_all:
|
||||
print(f'Error while retrieving data: {e_all}')
|
||||
pass
|
||||
|
||||
# Handle the response data if any
|
||||
if response:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue