Skip to content

Commit 43d2efd

Browse files
authored
Check if response is an Error (#4)
1 parent 8dd5a01 commit 43d2efd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ def getStatus(self, numBytes):
101101
# print("Failed to receive status")
102102
return None
103103

104+
if response.isError():
105+
print(response)
106+
return None
107+
104108
#Instantiate output as an empty list
105109
output = []
106110

0 commit comments

Comments
 (0)