fix #762: Adjust "weather unknown" message according to Bluetooth status

Also make weather setup instructions more explicit.
pull/763/head
Richard de Boer 2021-06-18 19:27:50 +02:00
parent ac75110504
commit aaadbd89f2
4 changed files with 13 additions and 8 deletions

View File

@ -531,7 +531,7 @@
{ "id": "weather",
"name": "Weather",
"icon": "icon.png",
"version":"0.03",
"version":"0.04",
"description": "Show Gadgetbridge weather report",
"readme": "readme.md",
"tags": "widget,outdoors",

View File

@ -1,2 +1,3 @@
0.02: Make minor adjustments to widget, and discard stale weather data after a configurable period.
0.03: Fix flickering last updated time.
0.03: Fix flickering last updated time.
0.04: Adjust "weather unknown" message according to Bluetooth connection.

View File

@ -56,10 +56,14 @@
}
function update() {
NRF.removeListener("connect", update);
if (weather.current) {
draw();
} else if (NRF.getSecurityStatus().connected) {
E.showMessage("Weather unknown\n\nIs Gadgetbridge\nweather reporting\nset up on your\nphone?");
} else {
E.showMessage('Weather unknown\n\nIs Gadgetbridge\nconnected?');
E.showMessage("Weather unknown\n\nGadgetbridge\nnot connected");
NRF.on("connect", update);
}
}
@ -77,7 +81,7 @@
weather.on("update", update);
update(weather.current);
update();
// Show launcher when middle button pressed
setWatch(Bangle.showLauncher, BTN2, {repeat: false, edge: 'falling'});

View File

@ -1,15 +1,15 @@
# Weather
Shows Gadgetbridge weather reports.
This allows your Bangle.js to display weather reports from the Gadgetbridge app on an Android phone.
This adds a widget with a weather pictogram and the temperature.
It adds a widget with a weather pictogram and the temperature.
You can view the full report through the app:
![Screenshot](screenshot.png)
## Setup
See [this guide](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Weather)
to setup Gadgetbridge weather reporting.
1. Install [Gadgetbridge for Android](https://f-droid.org/packages/nodomain.freeyourgadget.gadgetbridge/) on your phone.
2. Set up [Gadgetbridge weather reporting](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Weather).
## Controls