mirror of https://github.com/espruino/BangleApps
Mylocation, Pastel fixed tendancy for default to London
parent
6cad86c211
commit
bae5d875c3
|
@ -1,2 +1,3 @@
|
|||
0.01: First release
|
||||
0.02: Enhanced icon, make it bolder
|
||||
0.03: Fixed issue with defaulting back to London
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"icon": "mylocation.png",
|
||||
"type": "app",
|
||||
"screenshots": [{"url":"screenshot_1.png"}],
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"description": "Sets and stores the lat and long of your preferred City or it can be set from the GPS. mylocation.json can be used by other apps that need your main location lat and lon. See README",
|
||||
"readme": "README.md",
|
||||
"tags": "tool,utility",
|
||||
|
|
|
@ -12,7 +12,10 @@ let s = {
|
|||
}
|
||||
|
||||
function loadSettings() {
|
||||
settings = require('Storage').readJSON(SETTINGS_FILE, 1) || s;
|
||||
settings = require('Storage').readJSON(SETTINGS_FILE, 1) || {};
|
||||
for (const key in settings) {
|
||||
s[key] = settings[key]
|
||||
}
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
@ -49,7 +52,7 @@ function setFromGPS() {
|
|||
}
|
||||
|
||||
function showMainMenu() {
|
||||
console.log("showMainMenu");
|
||||
//console.log("showMainMenu");
|
||||
const mainmenu = {
|
||||
'': { 'title': 'My Location' },
|
||||
'<Back': ()=>{ load(); },
|
||||
|
|
|
@ -14,3 +14,4 @@
|
|||
0.13: call process.memory(false) to avoid triggering a GC of memory
|
||||
supported in pre 2.12.13 firmware
|
||||
0.14: incorporated lazybones idle timer, configuration settings to come
|
||||
0.15: fixed tendancy for mylocation to default to London
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "pastel",
|
||||
"name": "Pastel Clock",
|
||||
"shortName": "Pastel",
|
||||
"version": "0.14",
|
||||
"version": "0.15",
|
||||
"description": "A Configurable clock with custom fonts, background and weather display. Has a cyclic information line that includes, day, date, battery, sunrise and sunset times",
|
||||
"icon": "pastel.png",
|
||||
"dependencies": {"mylocation":"app","weather":"app"},
|
||||
|
|
|
@ -39,7 +39,10 @@ function loadSettings() {
|
|||
|
||||
// requires the myLocation app
|
||||
function loadLocation() {
|
||||
location = require("Storage").readJSON(LOCATION_FILE,1)||{"lat":51.5072,"lon":0.1276,"location":"London"};
|
||||
location = require("Storage").readJSON(LOCATION_FILE,1)||{};
|
||||
location.lat = location.lat||51.5072;
|
||||
location.lon = location.lon||0.1276;
|
||||
location.location = location.location||"London";
|
||||
}
|
||||
|
||||
function extractTime(d){
|
||||
|
|
Loading…
Reference in New Issue