From 2658e087821585153401e87aa82a36c893b4999c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 17 Jan 2024 12:43:14 -0800 Subject: [PATCH] catch an error when we do the second pass reset attempt --- src/api/focus.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/api/focus.js b/src/api/focus.js index 4444b04af..357d9ea45 100644 --- a/src/api/focus.js +++ b/src/api/focus.js @@ -199,9 +199,13 @@ class Focus { // If we reach this point, then either `device.reset` isn't available, or it // failed to reboot the device. Try the 1200 baud tickle. - await baudUpdate(); - await dtrToggle(true); - await dtrToggle(false); + try { + await baudUpdate(); + await dtrToggle(true); + await dtrToggle(false); + } catch (e) { + console.log("Unable to baud-update and dtr toggle. This is probably because the orginal reboot worked", e); + } } async find(...device_descriptors) {