Compare commits

...

4 Commits

Author SHA1 Message Date
Matt Walsh
778b7f4456 almanac, current weather, extended forecast, hazards #193 2026-04-04 11:36:31 -05:00
Matt Walsh
443114f555 Add new screen enhancement settings close #195 2026-04-04 11:09:21 -05:00
Matt Walsh
2a4dc03cf7 don't build screen-enhance images 2026-04-04 11:02:12 -05:00
Matt Walsh
8c13128005 add screen enhancement template 2026-04-04 10:45:31 -05:00
5 changed files with 32 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
---
name: Screen Enhancement
about: Items and tasks related to the screen enhancement project
title: '[Project]: '
labels: screen-enhance
projects: ['netbymatt/5']
assignees: ''
---
Describe the task, how it affects the overall project and what is considered complete.

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- '**'
- '!screen-enhance'
- '!screen-enhance/**'
tags:
- 'v*.*.*'
- 'v*.*'

View File

@@ -47,10 +47,7 @@ class Almanac extends WeatherDisplay {
}
calcSunMoonData(weatherParameters) {
const sun = [
SunCalc.getTimes(new Date(), weatherParameters.latitude, weatherParameters.longitude),
SunCalc.getTimes(DateTime.local().plus({ days: 1 }).toJSDate(), weatherParameters.latitude, weatherParameters.longitude),
];
const sun = [0, 1, 2, 3, 4, 5, 6].map((days) => SunCalc.getTimes(DateTime.local().plus({ days }).toJSDate(), weatherParameters.latitude, weatherParameters.longitude));
// brute force the moon phases by scanning the next 30 days
const moon = [];

View File

@@ -17,7 +17,13 @@ class ExtendedForecast extends WeatherDisplay {
super(navId, elemId, 'Extended Forecast', true);
// set timings
this.timing.totalScreens = 2;
if (settings.enhancedScreens?.value) {
this.timing.totalScreens = 1;
this.perPage = 4;
} else {
this.timing.totalScreens = 2;
this.perPage = 3;
}
}
async getData(weatherParameters, refresh) {
@@ -54,7 +60,7 @@ class ExtendedForecast extends WeatherDisplay {
// determine bounds
// grab the first three or second set of three array elements
const forecast = parse(this.data.properties.periods, this.weatherParameters.forecast).slice(0 + 3 * this.screenIndex, 3 + this.screenIndex * 3);
const forecast = parse(this.data.properties.periods, this.weatherParameters.forecast).slice(0 + this.perPage * this.screenIndex, this.perPage + this.screenIndex * this.perPage);
// create each day template
const days = forecast.map((Day) => {

View File

@@ -130,6 +130,16 @@ const init = () => {
changeAction: wideScreenChange,
sticky: true,
});
settings.portrait = new Setting('portrait', {
name: 'Allow Portrait',
defaultValue: false,
sticky: true,
});
settings.enhancedScreens = new Setting('enhancedScreens', {
name: 'Enhanced Screens',
defaultValue: false,
sticky: true,
});
settings.kiosk = new Setting('kiosk', {
name: 'Kiosk',
defaultValue: false,