This commit is contained in:
quackerd 2022-01-22 05:43:34 +08:00
parent 15126ff258
commit 92d9a8022d

View File

@ -101,7 +101,7 @@ class PTQS1005Driver:
self.ser.write(cmd)
self.ser.flush()
time.sleep(1e-3)
resp = self.ser.read(PTQS1005AC.RESP_LEN, timeout = 3)
resp = self.ser.read(PTQS1005AC.RESP_LEN)
if(len(resp) != PTQS1005AC.RESP_LEN):
raise Exception("invalid response length")
return PTQS1005AC(resp)