Show humidity as weather circle data
parent
d59db5ba38
commit
d12a415740
|
|
@ -10,6 +10,9 @@ It can show the following information (this can be configured):
|
|||
* Heart rate (automatically updates when screen is on and unlocked)
|
||||
* Battery (including charging status and battery low warning)
|
||||
* Weather (requires [weather app](https://banglejs.com/apps/#weather))
|
||||
* Humidity as circle progress
|
||||
* Temperature inside circle
|
||||
* Condition as icon below circle
|
||||
|
||||
## Screenshots
|
||||

|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ function drawWeather(w) {
|
|||
if (!w) w = getCirclePosition("weather");
|
||||
const weather = getWeather();
|
||||
const tempString = weather ? locale.temp(weather.temp - 273.15) : undefined;
|
||||
const humidity = weather ? weather.hum : undefined;
|
||||
const code = weather ? weather.code : -1;
|
||||
|
||||
// Draw rectangle background:
|
||||
|
|
@ -292,6 +293,10 @@ function drawWeather(w) {
|
|||
g.setColor(colorGrey);
|
||||
g.fillCircle(w, h3, radiusOuter);
|
||||
|
||||
if (humidity >= 0) {
|
||||
drawGauge(w, h3, humidity / 100, colorYellow);
|
||||
}
|
||||
|
||||
g.setColor(colorBg);
|
||||
g.fillCircle(w, h3, radiusInner);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue