From 5da926f2436763d2b9a56c3992873fbdfa05a086 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 10 Jan 2024 13:30:29 +0000 Subject: [PATCH] Minor sanity tweaks for Bangle self test --- libs/js/banglejs/Bangle_showTestScreen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/js/banglejs/Bangle_showTestScreen.js b/libs/js/banglejs/Bangle_showTestScreen.js index e87d3abd51..842625e5ce 100644 --- a/libs/js/banglejs/Bangle_showTestScreen.js +++ b/libs/js/banglejs/Bangle_showTestScreen.js @@ -1,5 +1,6 @@ (function() { Bangle.setUI();clearInterval();clearWatch();g.clear(1); + Bangle.removeAllListeners();E.removeAllListeners(); Bangle.setBarometerPower(1, "app"); Bangle.setCompassPower(1, "app"); Bangle.setGPSPower(1, "app"); @@ -36,7 +37,7 @@ Bangle.setBacklight(0); Bangle.setLocked(1); // touchscreen off g.clear(1).setFont("12x20:2").setFontAlign(0,0).drawString("TEST\nPASS",88,88); - require('Storage').write('welcome.json', {welcomed: false}); + require('Storage').writeJSON('welcome.json', {welcomed: false}); setTimeout(function() { Bangle.softOff(); }, 60*60*1000); // 1 hour