diff --git a/server/scripts/modules/almanac.js b/server/scripts/modules/almanac.js index 7263682..92ec089 100644 --- a/server/scripts/modules/almanac.js +++ b/server/scripts/modules/almanac.js @@ -293,8 +293,6 @@ class Almanac extends WeatherDisplay { })(); this.context.drawImage(image, 75+Index*130, 270); }); - - this.finishDraw(); break; case 1: @@ -317,5 +315,7 @@ class Almanac extends WeatherDisplay { var Precipitation = info.outlook.precipitation; draw.text(this.context, 'Star4000', '24pt', '#FFFFFF', 70, 380, 'Precipitation: ' + Precipitation, 2); } + + this.finishDraw(); } } \ No newline at end of file diff --git a/server/scripts/modules/weatherdisplay.js b/server/scripts/modules/weatherdisplay.js index 85345d9..c8b31de 100644 --- a/server/scripts/modules/weatherdisplay.js +++ b/server/scripts/modules/weatherdisplay.js @@ -422,8 +422,10 @@ class WeatherDisplay { // get the screen index for the current base count, returns false if past end of timing array (go to next screen, stop timing) screenIndexFromBaseCount() { + // test for timing enabled + if (!this.timing) return 0; // find the first timing in the timing array that is greater than the base count - if (!this.timing.fullDelay) this.calcNavTiming(); + if (this.timing && !this.timing.fullDelay) this.calcNavTiming(); const timingIndex = this.timing.fullDelay.findIndex(delay => delay > this.navBaseCount); if (timingIndex === -1) return false; return this.timing.screenIndexes[timingIndex];