From 4db81c95ef7f599f14cce8df500a568344096f3e Mon Sep 17 00:00:00 2001 From: 7kasper Date: Tue, 28 Nov 2023 20:08:39 +0100 Subject: [PATCH] Do some bugfixes on presentor app. --- apps/presentor/ChangeLog | 1 + apps/presentor/README.md | 26 +++++++++++++------------- apps/presentor/app.js | 25 +++++++++++++++++-------- apps/presentor/metadata.json | 2 +- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/apps/presentor/ChangeLog b/apps/presentor/ChangeLog index b87be0bb4..031b921b9 100644 --- a/apps/presentor/ChangeLog +++ b/apps/presentor/ChangeLog @@ -7,3 +7,4 @@ 0.07: Begin work on presentation parts. 0.08: Presentation parts! 0.09: Code cleanup and windows 11 support. +0.10: Bugfixes. diff --git a/apps/presentor/README.md b/apps/presentor/README.md index 1b4ab1afc..00e13b310 100644 --- a/apps/presentor/README.md +++ b/apps/presentor/README.md @@ -1,6 +1,6 @@ # Presentor Use your Bangle to present! -This app basically turns your BangleJS watch into a presntor tool. +This app basically turns your BangleJS watch into a presentor tool. Very useful for presentations or when you are teaching a lesson. ## Features: @@ -27,6 +27,7 @@ Select Bangle.js > Remove Device 7. Fill the subjects, times in minutes (seconds optional) and Notes (optional) The subject/times are on your watch displayed in a tall font, the notes in a very small font +Note: If you don't fill in any notes you can still save and the presentor will be for input only and not give any timing details. 8. Select "Save" and exit the pop-up window @@ -40,27 +41,26 @@ The subject/times are on your watch displayed in a tall font, the notes in a ver If "Try connecting your device again." is shown, switch PC/laptop bluetooth off and on again 13. Start your presentation. -Swipe up to start timer for first subject -Swipe down to pause -Push button to switch between mouse mode and timer/presentation mode + - Swipe up to start timer for first subject + - Swipe down to pause + - Push button to switch between mouse mode and timer/presentation mode 14. Timer function -Next subject: Swipe up -Previous subject: Swipe down -Pause timer: Swipe down to begin + - Next subject: Swipe up + - Previous subject: Swipe down + - Pause timer: Swipe down to begin 15. Presentation function -Next presentation slide: Swipe right or just touch -Previous presentation slide: Swipe left + - Next presentation slide: Swipe right or just touch + - Previous presentation slide: Swipe left 16. Mouse mode -Swipe to move pointer over the presentation screen -Note: sometimes "Holding" shows in Bangle screen (see Holding mode) + - Swipe to move pointer over the presentation screen 17. Holding mode In timer/presentation mode, hold one finger on your Bangle screen, point your arm foreward -Mouse up/down on screen: Tilt your hand up/down -Mouse left/right on screen: Rotate your hand counterclockwise/clockwise + - Mouse up/down on screen: Tilt your hand up/down + - Mouse left/right on screen: Rotate your hand counterclockwise/clockwise 18. End of presentation? Switch bluetooth PC/laptop off or see step 1 diff --git a/apps/presentor/app.js b/apps/presentor/app.js index ec9d41258..bd527539f 100644 --- a/apps/presentor/app.js +++ b/apps/presentor/app.js @@ -272,7 +272,7 @@ function startHolding() { Bangle.setLCDPower(1); } function stopHolding() { - clearTimeout(startHolding); + clearTimeout(timeoutHolding); if (holding) { bt.tapKey(bt.KEY.F10); homePitch = 0; @@ -282,9 +282,10 @@ function stopHolding() { Bangle.removeListener('accel', handleAcc); Bangle.buzz(); drawMain(); - } else { - timeoutId = setTimeout(drawMain, 1000); - } + } + // else { + // timeoutId = setTimeout(drawMain, 1000); + // } clearTimeout(timeoutHolding); timeoutHolding = -1; } @@ -345,10 +346,12 @@ Bangle.on('drag', function(e) { // E.showMessage('left'); //kb.tap(kb.KEY.LEFT, 0); bt.scroll(1); - } else if(lastx==0 && lasty==0 && holding == false){ - // E.showMessage('press'); - clickMouse(MouseButton.LEFT); - } + } + // Todo re-implement? Seems bit buggy or unnecessary for now. + // else if(lastx==0 && lasty==0 && holding == false){ + // // E.showMessage('press'); + // bt.clickButton(bt.BUTTON.LEFT); + // } stopHolding(); lastx = 0; lasty = 0; @@ -368,9 +371,15 @@ function onBtn() { stopHolding(); drawMain(); } else { + stopHolding(); clearToSend = true; trackPadMode = true; E.showMessage('Mouse'); + // Also skip drawing thingy for now. + if (timeoutDraw != -1) { + clearTimeout(timeoutDraw); + timeoutDraw = -1; + } } Bangle.buzz(); } diff --git a/apps/presentor/metadata.json b/apps/presentor/metadata.json index f0372ecdb..984ba39c6 100644 --- a/apps/presentor/metadata.json +++ b/apps/presentor/metadata.json @@ -1,7 +1,7 @@ { "id": "presentor", "name": "Presentor", - "version": "0.09", + "version": "0.10", "description": "Use your Bangle to present!", "icon": "app.png", "type": "app",