Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Patched dashboard.js

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Patched dashboard.js

Post by mcrossley »

Steve

I just noticed a problem with the dashboard.js script used on the gauges page. My WH1091 sometimes reports North as 360 and the script cannot cope with that on the Wind rose - it displays 'undefined'. Specifically the getord() function needs patching.

Here is the fixed version I am using on my website:

Code: Select all

function getord(d){
 //convert to range 0-360
 if(d>=360){d-=360;}
 deg = Math.ceil((d+11.25)/22.5)
 ords = new Array("N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW")
 return(ords[deg-1]);
}

Cheers
Mark
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Patched dashboard.js

Post by steve »

Thanks, Mark, I'll include the fixed version with the next build.
Steve
Post Reply