big reset test 1
This commit is contained in:
1 parent
4fe86c46ac
commit
df2c6122a4
1 file changed
+2
-1
+2
-1
@@ -236,7 +236,7 @@ def read_data_sync(mac: str) -> Optional[SensorReading]:
|
||||
def reset_adapter(big_reset = False):
|
||||
log.info("Restting BT Adapter...")
|
||||
if big_reset:
|
||||
log.wwarning("Doing big reset:")
|
||||
log.warning("Doing big reset - USB ID {current_usb_id}")
|
||||
log.info(subprocess.run(["usbreset", current_usb_id], capture_output=True, text=True, check=True).stdout.strip())
|
||||
time.sleep(2)
|
||||
else:
|
||||
@@ -354,6 +354,7 @@ if __name__ == "__main__":
|
||||
if usb_id in bt_usb_ids:
|
||||
current_usb_id = usb_id
|
||||
log.info(f"BLE USB ID Detected: {current_usb_id}")
|
||||
reset_adapter(big_reset=True)
|
||||
test_count = 0
|
||||
test_results = []
|
||||
log.info(f"Starting BLE Test for {count} iterations")
|
||||
|
||||
Reference in new issue
Block a user