From 2f11b875e31607ec429827610d6d1419e72d56c2 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 23 Mar 2022 16:20:50 +0000 Subject: [PATCH] Bangle.js extra debug info --- .../service/devices/banglejs/BangleJSDeviceSupport.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java index c245a6351..a03cf9446 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java @@ -176,8 +176,11 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport { LOG.info("UART RX JSON parsed successfully"); handleUartRxJSON(json); } catch (JSONException e) { + LOG.info("UART RX JSON parse failure: "+ e.getLocalizedMessage()); GB.toast(getContext(), "Malformed JSON from Bangle.js: " + e.getLocalizedMessage(), Toast.LENGTH_LONG, GB.ERROR); } + } else { + LOG.info("UART RX line started with "+(int)line.charAt(0)+" - ignoring"); } }