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

SteelSeries Gauges - version 1.0

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

well there is a radar gauge that could be ported but I don't think that is what you mean? You want a radar plot of data rather than a sweeping gauge showing points in geographical space?
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: SteelSeries Gauges - version 1.0

Post by gwheelo »

You want a radar plot of data rather than a sweeping gauge showing points in geographical space?
Exactly! Bounce, bounce.....

GW
Image
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

beteljuice wrote:However - if your server is PHP enabled here is an inelegant work-around.
Hi beteljuice, I take it that performs on-the-fly compression? I can see providers not liking that, but not allowing static compression seems bonkers to me, you would think it was to their advantage to allow it.
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: SteelSeries Gauges - version 1.0

Post by gwheelo »

Mark

Is there some way of setting the two LCD text lables to match the pointer colors of the "steelseries.WindDirection" gauge? That would mean, I think, setting LANG.latest_web & LANG.tenminavg_web to different colours - How?

George Wheelock
Image
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

George, you could only do this by editing the steelseries.js library.

In the windDirection component, the function drawLcdTitles(), and change

Code: Select all

ctx.strokeStyle = backgroundColor.labelColor.getRgbaColor();
to

Code: Select all

ctx.strokeStyle = pointerColor.medium.getRgbaColor();
and then insert another line just before the Average title is drawn

Code: Select all

ctx.strokeStyle = pointerColorAverage.medium.getRgbaColor();
ctx.fillText(lcdTitleStrings[1], (imageWidth - titleWidth) / 2, imageHeight * 0.73, imageWidth * 0.3);
Last edited by mcrossley on Tue 20 Dec 2011 11:20 pm, edited 1 time in total.
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: SteelSeries Gauges - version 1.0

Post by gwheelo »

Mark - thanks for the code. Results here: http://www.wheelocknet.net/cumulus/gauges.html?gb.

The lines calling the fillStyle, however, did not work for me. The text color did not change. I substituted ctx.fillStyle = "rgba(0,50,255,1)"; for "Latest" and ctx.fillStyle = "rgba(255,0,0,1)"; for the "Average."

The color labels, I think, add just a bit more clarity when reading the gauge.

Thanks for all your help and the availability of the SteelSeries Gauges.

George Wheelock
Image
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

oops, a cut'n'paste error, drop the "parameter." on each of them and it may work (I think it is'medium' for the colour but it right be 'normal' - the JavaScript code uses one, and Java the other!)

I've edited my post above, but not tried the code - its from memory - posting from my tablet.
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

Well, the clue is in the name, Brushed Metal background effects add to the SteelSeries library 0.9.4
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: SteelSeries Gauges - version 1.0

Post by n9mfk »

Mark will gauges-ss_v1-2-3.zip be out soon?
Beau
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

I'll stop playing with the library, and get it done soon - promise! :lol:
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: SteelSeries Gauges - version 1.0

Post by gwheelo »

Mark -
oops, a cut'n'paste error, drop the "parameter."
I found this at: http://www.html5canvastutorials.com/tut ... xt-stroke/
Note: To set both the fill and stroke for HTML5 canvas text, you must use both the fillText() and strokeText() methods together. It’s good practice to use the fillText() method before the strokeText() method in order to render the stroke thickness correctly.
So I have changed my code to this:

ctx.fillStyle = pointerColor.medium.getRgbaColor();
ctx.strokeStyle = pointerColor.medium.getRgbaColor();

and

ctx.fillStyle = pointerColorAverage.medium.getRgbaColor();
ctx.strokeStyle = pointerColorAverage.medium.getRgbaColor();

with good results! http://www.wheelocknet.net/cumulus/gauges.html?gb

This is just in case it is viewed on a really, really, big monitor (movie theater) so the text is not just outlined.

GW
Image
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

Hi George, I'm not sure what you are saying, the gauges use fillText() don't they? So the strokeStyle will be ignored. Or are you saying that you are now over painting the filled text with stroked text?
gordonb
Posts: 2
Joined: Tue 13 Dec 2011 6:26 pm
Weather Station: Signatrol WH3080
Operating System: Windows 7
Location: Suffolk

Re: SteelSeries Gauges - version 1.0

Post by gordonb »

First post so please be gentle if I'm asking a question that has an obvious answer but I've searched and can't find it in the forum. I've got Cumulus running very nicely in conjunction with my WH3080 and I've installed the Steel Series gauges after a bit of trial and error, site is at http://www.10db.co.uk/weather if anyone wants to see the few tweaks I've made to the default design. My question relates to the wind speed gauge, which currently runs from 0 to 10 m/s (I use m/s as I'm an acoustician by profession and the acoustics standards that consider wind speed always use m/s). We haven't had any winds stonger than 10m/s as yet but could someone tell me if the wind speed gauge range is self adjusting or do I need to make a change to the scripts when it does pick up?

Must say I am extremely impressed by Cumulus and the Steel Series gauges, top work by all involved!

Gordon
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:

Re: SteelSeries Gauges - version 1.0

Post by mcrossley »

Thanks Gordon, and don't worry about the wind speed - the gauges rescale automatically if any values exceed (or fall below for temperature) the default range.
gordonb
Posts: 2
Joined: Tue 13 Dec 2011 6:26 pm
Weather Station: Signatrol WH3080
Operating System: Windows 7
Location: Suffolk

Re: SteelSeries Gauges - version 1.0

Post by gordonb »

Thanks for the quick reply Mark, that's very reassuirng as I didn't fancy having to fiddle too much with scripts!

Gordon
Post Reply