commit
51363a88bf
|
|
@ -1 +1,2 @@
|
|||
0.01: New App!
|
||||
0.02: Changed menu names, added button interaction.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Simple interface will display most current data for the specified location when
|
|||
|
||||
## Controls
|
||||
|
||||
No controls currently
|
||||
Press button (middle on Bangle 1) once to refresh data, twice to return to launcher.
|
||||
|
||||
## Creator
|
||||
|
||||
|
|
|
|||
|
|
@ -63,5 +63,27 @@ function displayData(dataStreams) {
|
|||
seconds.toString().padStart(2,"0");
|
||||
E.showMessage(string,timeString);
|
||||
}
|
||||
function handleButton() {
|
||||
switch(nPress) {
|
||||
case 1:
|
||||
fetchStartup();
|
||||
break;
|
||||
case 2:
|
||||
Bangle.showLauncher();
|
||||
break;
|
||||
default:
|
||||
Bangle.buzz(50);
|
||||
}
|
||||
nPress=0;
|
||||
}
|
||||
|
||||
fetchStartup();
|
||||
|
||||
nPress = 0;
|
||||
tPress = 0;
|
||||
|
||||
setWatch(() => {
|
||||
nPress++;
|
||||
clearTimeout(tPress);
|
||||
tPress = setTimeout(() => {handleButton();}, 500);
|
||||
}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat: true, edge: "rising"});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "usgs",
|
||||
"name": "USGS Data fetching app",
|
||||
"shortName":"USGS",
|
||||
"version":"0.01",
|
||||
"version":"0.02",
|
||||
"description": "App that fetches [USGS water data](https://maps.waterdata.usgs.gov/) for a configurable location (requires connection to Android phone)",
|
||||
"icon": "app.png",
|
||||
"tags": "outdoors,exercise,http",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
var submenu = {
|
||||
"" : {
|
||||
"title" : "-- DataStreams --"
|
||||
"title" : "DataStreams"
|
||||
},
|
||||
"< Back" : function() { E.showMenu(menu); },
|
||||
};
|
||||
|
|
@ -38,7 +38,7 @@ function popSubMenuData(data) {
|
|||
E.showMenu(submenu);
|
||||
}
|
||||
var menu = {
|
||||
"" : { "title" : "App Name" },
|
||||
"" : { "title" : "USGS" },
|
||||
"< Back" : () => back(),
|
||||
'Temp unit': {
|
||||
value: !!settings.tempUnitF, // !! converts undefined to false
|
||||
|
|
@ -59,7 +59,7 @@ function popSubMenuData(data) {
|
|||
}, 100);
|
||||
}
|
||||
},
|
||||
"Submenu" : function() { popSubMenu();},
|
||||
"DataStreams" : function() { popSubMenu();},
|
||||
};
|
||||
|
||||
var keyboard = "textinput";
|
||||
|
|
|
|||
Loading…
Reference in New Issue