Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/weather/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
Add button to settings to force fetch weather data (requires GadgetBridge version 0.86.0 or higher)
Add new API to get weather from Weather App for other Apps
0.31: Wind speed clockInfo now shows speed in local units (kph or mph)
0.32: Add widget configuration settings menu for icon style, data displayed, etc.
0.32: Add widget configuration settings menu for icon style, data displayed, etc.
ClockInfos now show the high/low temp as the min/max for displaying a percent bar.
0.33: Fix bugs with weather app and clock info
2 changes: 1 addition & 1 deletion apps/weather/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function draw() {
layout.windUnit.label = `${wind[2]} ${(current.wrose||'').toUpperCase()}`;
layout.cond.label = current.txt.charAt(0).toUpperCase()+(current.txt||'').slice(1);
layout.loc.label = current.loc;
layout.updateTime.label = `${formatDuration(Date.now() - current.time)} ago`; // How to autotranslate this and similar?
layout.updateTime.label = `${formatDuration(Date.now() - current.time)}`; // How to autotranslate this and similar?
layout.update();
layout.render();
}
Expand Down
11 changes: 7 additions & 4 deletions apps/weather/clkinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
weather.hum = `${weather.hum}%`;
weather.wind = require("locale").speed(weather.wind).match(/^(\D*\d*)(.*)$/);
weather.wind = Math.round(weather.wind[1]) +" "+ weather.wind[2];
if(weather.hi) weather.hi = parseInt(require("locale").temp(weather.hi-273.15));
if(weather.lo) weather.lo = parseInt(require("locale").temp(weather.lo-273.15));


} else {
weather = {
Expand Down Expand Up @@ -47,7 +50,7 @@
hasRange : true,
get: () => ({ text: weather.temp, img: weatherIcon(weather.code),
color: weatherLib.getColor(weather.code),
v: parseInt(weather.temp), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:-30}),
v: parseInt(weather.temp), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:50}),
show: function() {
this.updater = _updater.bind(this);
weatherLib.on("update", this.updater);
Expand All @@ -71,7 +74,7 @@
name: "temperature",
hasRange : true,
get: () => ({ text: weather.temp, img: atob("GBiBAAA8AAB+AADnAADDAADDAADDAADDAADDAADbAADbAADbAADbAADbAADbAAHbgAGZgAM8wAN+wAN+wAM8wAGZgAHDgAD/AAA8AA=="),
v: parseInt(weather.temp), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:-30}),
v: parseInt(weather.temp), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:50}),
show: function() {
this.updater = _updater.bind(this);
weatherLib.on("update", this.updater);
Expand All @@ -83,7 +86,7 @@
name: "feelsLike",
hasRange : true,
get: () => ({ text: weather.feels, img: atob("GBiBAAAAAAHAAAPgAAfgAAfgAAfg4APhsAfxEB/5EB/5ED/9ED/9ED/9ED/9ED/9EB/9UB/7UA/yyAf26Afk7AfmyAfjGAfh8AAAAA=="),
v: parseInt(weather.feels), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:-30}),
v: parseInt(weather.feels), min: weather.lo?weather.lo:-30, max: weather.hi?weather.hi:50}),
show: function() {
this.updater = _updater.bind(this);
weatherLib.on("update", this.updater);
Expand Down Expand Up @@ -119,4 +122,4 @@
};

return weatherItems;
})
})
2 changes: 1 addition & 1 deletion apps/weather/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "weather",
"name": "Weather",
"version": "0.32",
"version": "0.33",
"description": "Show Gadgetbridge/iOS weather report",
"icon": "icon.png",
"screenshots": [{"url":"Screenshot.png"}],
Expand Down
Loading