cscsensor

Fix button mapping
master
Erik Andresen 2022-03-09 22:53:31 +01:00
parent ac652282ca
commit 10892718cd
2 changed files with 5 additions and 5 deletions

View File

@ -11,9 +11,9 @@ Currently the app displays the following data:
- total distance traveled - total distance traveled
- an icon with the battery status of the remote sensor - an icon with the battery status of the remote sensor
Button 1 resets all measurements except total distance traveled. The latter gets preserved by being written to storage every 0.1 miles and upon exiting the app. Button 1 (swipe up on Bangle.js 2) resets all measurements except total distance traveled. The latter gets preserved by being written to storage every 0.1 miles and upon exiting the app.
If the watch app has not received an update from the sensor for at least 10 seconds, pushing button 3 will attempt to reconnect to the sensor. If the watch app has not received an update from the sensor for at least 10 seconds, pushing button 3 (swipe down on Bangle.js 2) will attempt to reconnect to the sensor.
Button 2 switches between the display for cycling speed and cadence. Button 2 (tap on Bangle.js 2) switches between the display for cycling speed and cadence.
Values displayed are imperial or metric (depending on locale), cadence is in RPM, the wheel circumference can be adjusted in the global settings app. Values displayed are imperial or metric (depending on locale), cadence is in RPM, the wheel circumference can be adjusted in the global settings app.

View File

@ -254,8 +254,8 @@ E.on('kill',()=>{
NRF.on('disconnect', connection_setup); // restart if disconnected NRF.on('disconnect', connection_setup); // restart if disconnected
Bangle.setUI("updown", d=>{ Bangle.setUI("updown", d=>{
if (d<0) { mySensor.reset(); g.clearRect(0, 48, W, H); mySensor.updateScreen(); } if (d<0) { mySensor.reset(); g.clearRect(0, 48, W, H); mySensor.updateScreen(); }
if (d==0) { if (Date.now()-mySensor.lastBangleTime>10000) connection_setup(); } else if (d>0) { if (Date.now()-mySensor.lastBangleTime>10000) connection_setup(); }
if (d>0) { mySensor.toggleDisplayCadence(); g.clearRect(0, 48, W, H); mySensor.updateScreen(); } else { mySensor.toggleDisplayCadence(); g.clearRect(0, 48, W, H); mySensor.updateScreen(); }
}); });
Bangle.loadWidgets(); Bangle.loadWidgets();