forked from FOSS/BangleApps
weatherclock v0.06
parent
5ca69aa0a4
commit
f8766bcd84
|
@ -3,4 +3,4 @@
|
|||
0.03: Minor layout extra spaces.
|
||||
0.04: Layout now compatible with Bangle.js 2.
|
||||
0.05: Use weather condition code for icon selection.
|
||||
0.06: Dev15-New settings to optionally hide elements. Images placed into functions for performance.
|
||||
0.06: Dev16-New settings to optionally hide elements. Images placed into functions for performance.
|
||||
|
|
|
@ -48,7 +48,7 @@ function chooseIcon(condition) {
|
|||
}
|
||||
if (condition.includes("drizzle")||
|
||||
condition.includes("shower")||
|
||||
condition.includes("rain")) return getRain;
|
||||
condition.includes("rain")) return getRain;
|
||||
if (condition.includes("clear")) return getSun;
|
||||
if (condition.includes("clouds")) return getCloud;
|
||||
if (condition.includes("few clouds")||
|
||||
|
@ -75,7 +75,7 @@ function chooseIconByCode(code) {
|
|||
case 2: return getStorm;
|
||||
case 3: return getRain;
|
||||
case 5:
|
||||
switch (code) {
|
||||
switch (code) {
|
||||
case 511: return getSnow;
|
||||
default: return getRain;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ function chooseIconByCode(code) {
|
|||
case 7: return getPartSun;
|
||||
case 8:
|
||||
switch (code) {
|
||||
case 800: return getSun;
|
||||
case 800: return getSun;
|
||||
case 804: return getCloud;
|
||||
default: return getPartSun;
|
||||
}
|
||||
|
@ -91,14 +91,6 @@ function chooseIconByCode(code) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Get weather stored in json file by weather app.
|
||||
*/
|
||||
function getWeather() {
|
||||
let jsonWeather = storage.readJSON('weather.json');
|
||||
return jsonWeather;
|
||||
}
|
||||
|
||||
// timeout used to update every minute
|
||||
var drawTimeout;
|
||||
|
||||
|
|
Loading…
Reference in New Issue