From 23ec132b4d7a7f4574a8bcc8c0e079612d27e8ea Mon Sep 17 00:00:00 2001 From: Mika Dede Date: Sun, 10 Oct 2021 17:19:03 +0200 Subject: [PATCH] score: switch score buttons --- apps/score/score.app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/score/score.app.js b/apps/score/score.app.js index 7da068294..0c2d8c78d 100644 --- a/apps/score/score.app.js +++ b/apps/score/score.app.js @@ -30,7 +30,15 @@ function getSecondsTime() { function setupInputWatchers(init) { isBangle1 = process.env.BOARD === 'BANGLEJS'; - Bangle.setUI('updown', v => v && handleInput(Math.floor((v+2)/2)+(isBangle1 ? 0 : 3))); + Bangle.setUI('updown', v => { + if (v) { + if (isBangle1) { + handleInput(Math.floor(((v*-1)+2)/2)) + } else { + handleInput(Math.floor((v+2)/2)+3) + } + } + }); if (init) { setWatch(() => handleInput(2), isBangle1 != null ? BTN2 : BTN, { repeat: true }); Bangle.on('touch', (b, e) => {