Compare commits

...

5 Commits

Author SHA1 Message Date
Matt Walsh
4205155f96 5.9.3 2022-12-21 14:51:04 -06:00
Matt Walsh
f4101f06cc fix hazards failed to load auto play issue 2022-12-21 14:50:56 -06:00
Matt Walsh
4c3fcfc358 correct hazard scroll time 2022-12-21 14:44:36 -06:00
Matt Walsh
366f527aee auto play when hazard is present 2022-12-21 14:05:14 -06:00
Matt Walsh
797b4d32fa capture dist 2022-12-19 15:24:34 -06:00
7 changed files with 17 additions and 10 deletions

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ws4kp",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ws4kp",
"version": "5.9.2",
"version": "5.9.3",
"license": "MIT",
"devDependencies": {
"del": "^6.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "ws4kp",
"version": "5.9.2",
"version": "5.9.3",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.js",
"scripts": {

View File

@@ -85,15 +85,15 @@ class Hazards extends WeatherDisplay {
// set up the timing
this.timing.baseDelay = 20;
// 24 hours = 6 pages
const pages = Math.ceil(list.scrollHeight / 390); // first page is already displayed, last page doesn't happen
const timingStep = 75 * 4;
const pages = Math.max(Math.ceil(list.scrollHeight / 400) - 3, 1);
const timingStep = 400;
this.timing.delay = [150 + timingStep];
// add additional pages
for (let i = 0; i < pages; i += 1) this.timing.delay.push(timingStep);
// add the final 3 second delay
this.timing.delay.push(150);
this.setStatus(STATUS.loaded);
this.timing.delay.push(250);
this.calcNavTiming();
this.setStatus(STATUS.loaded);
}
drawCanvas() {

View File

@@ -109,6 +109,13 @@ const updateStatus = (value) => {
// calculate first enabled display
const firstDisplayIndex = displays.findIndex((display) => display.enabled && display.timing.totalScreens > 0);
// value.id = 0 is hazards, if they fail to load hot-wire a new value.id to the current display to see if it needs to be loaded
// typically this plays out as current conditions loads, then hazards fails.
if (value.id === 0 && (value.status === STATUS.failed || value.status === STATUS.retrying)) {
value.id = firstDisplayIndex;
value.status = displays[firstDisplayIndex].status;
}
// if this is the first display and we're playing, load it up so it starts playing
if (isPlaying() && value.id === firstDisplayIndex && value.status === STATUS.loaded) {
navTo(msg.command.firstFrame);