Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Background behind the digits

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

gemini06720 wrote:I guess I should have been more specific when I proposed the modifications to indicate that the suggested code should be used inside the 'gauges.js' script - I presumed wrongly that you would have first searched into 'gauges.js' and then into 'steelseries.js'... :roll:
Ray,

That's allright, you're forgiven :-) since I got it working (almost) at last! So, thanks to you and Mark, I now have the correct colours on my wind gauge and matching LCD text colours so viewers know which is which.

But please have a look at my gauges (from the link within my 'signature'), as, on my browser at least, I have a "?" within a diamond following the LCD text for the wind directions! What does that mean, and how can I fix it?

Beteljuice,

I understand where you're coming from. But you need to realise not all weather enthusiasts are Java programmers, and many wouldn't have the time to learn Java. So we rely on generous souls like Mark, Ray and Kerry to steer us in the right direction.

Furthemore, I don't consider what we've asked for (and remember, I wasn't the only one!) to be 'customisation'. The colour issue, in my view, was really just an omission from the earlier code that needed to be corrected (for everybody, not just a few of us). Hopefully it will be incorporated into the next 'SteelSeries for Cumulus' release, if there is one.
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

Looking at Ray's gauges page I now see that my questionmarks should be degree symbols. So why aren't they?? :-(

PS: Ray, I forgot to mention after first visiting your gauges page a few days ago that I loved your sky panoramas in your banner! I'm an amateur photographer, and do a lot of panoramas myself, so I particularly appreciated yours.
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Background behind the digits

Post by gemini06720 »

Daniel, I am not too sure why the question mark instead of the degree symbol (and I cannot remember where in the code the degree symbol are added to the numbers) ... but make sure, whenever you edit any of the SteelSeries files/templates that you save them in the UTF-8 format.

Thanks for your appreciation of the different cloud images in the header of my pages - although some other weather station operators have 'hinted' at the images were being disruptive (annoying :shock: ), many of the users/viewers to my sites have shown great appreciation for the choices of images. 8-)
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

gemini06720 wrote:Daniel, I am not too sure why the question mark instead of the degree symbol (and I cannot remember where in the code the degree symbol are added to the numbers) ... but make sure, whenever you edit any of the SteelSeries files/templates that you save them in the UTF-8 format.
Ray,

Thanks for your ongoing help with this, but I'm about to give up (again!) :-(

I looked at my .js files and found that all those I'd edited were in ASCII format (I was lazy, and used Wordpad to edit them). So I went back to the originals (re-extracted from the distribution Zip file) and checked them in Crimson Editor. I found that gauges.js was in UTF-8(w/o BOM) format but steelseries.js is in ASCII format (it would help if there was some consistency!) ;-)

So in case the format was causing my degree-symbol problem, I started from scratch with the original files, editing them as per the colour changes and re-saving them in their original format (UTF-8 and ASCII), including the re-minified steelseries.min.js, then re-uploaded them to my weather page.

First problem was a repeat of what occurred on my first attempt to fix the LCD colours - my gauges page now only showed the first gauge, with no needle and no other gauges at all!

I reloaded steelseries.min.js into Crimson, and received a warning that it would be truncated because the line had more than 250 characters! Sure enough, it had truncated the steelseries.min.js contents.

So it was back to Wordpad to re-edit and re-minify this file (since it was originally in ASCII format anyway), but after minifying and uploading once more, the gauges page is still the same - only the first gauge and no needle!

As I've implied all along, this job is best left to the experts who know what they're doing. I'll keep waiting for Mark to release a fixed version... :-(
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Background behind the digits

Post by gemini06720 »

Daniel, you wrote about the Crimson Editor ... by Internet dating, that editor is quite old and has not been updated since 2008! I am not writing that it is a bad editor ... but you might want to look at a more modern editor (free) that was just updated a few days ago: Notepad++

Although not my default editor, I have used Notepad++ on many occasions to ensure, for example, that the files had been saved in the UTF-8 format.

I certainly would never suggest using Microsoft WrodPad to edit scripts or web page templates... :(

Daniel, JavaScript are a pain to edit, one missing comma and the script will refuse to run...
Last edited by gemini06720 on Sun 09 Jun 2013 7:56 am, edited 1 time in total.
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

Ray,

Yeah, 2008 would be about right! I've been using it about that long, and haven't felt a need to replace it since it works well and did all I want. But now I've discovered its weakness (line-length limit!) I'm downloading Notepad++ on your suggestion.

Once I've installed it (and I'm assuming it'll run under Win2k) I'll re-try editing gauges.js and steelseries.js to see if I can finally get the colour-fixes working. Should be able to report back later this evening (Sydney time).
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

Ray, you're a champion!

I installed Notepad++ and edited the two files with it, saving both as UTF-8, minified steelseries.js and saved that too as UTF-8. Copied all three to my Scripts web page, and the gauges are now working just as they should, including the degree symbol! Woohoo!

Next time you're in Australia, be sure to drop in on me and I'll buy you dinner! (Mark and Tom also qualify :-) )
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Background behind the digits

Post by gemini06720 »

DanielF wrote:Next time you're in Australia, be sure to drop in on me and I'll buy you dinner! (Mark and Tom also qualify :-) )
Daniel, how about you coming east, first stop, Vancouver, BC, Canada, then a hop over to Vancouver Island - I know a few excellent places were you could take me out to dinner... :mrgreen:

Then, you can return to Vancouver, and fly east, to Chicago (Lake Zurich), IL, USA, where, I am sure, Tom will be able to recommend a few interesting restaurants. :D

Finally, fly 'more' east, all the way to Manchester (Wilmslow), UK - there you can take Mark to dinner ... I am sure Mark will also have a few recommendations concerning his favorite dining establishments... :lol:
User avatar
Super-T
Posts: 890
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Background behind the digits

Post by Super-T »

I'll be in Merimbula in March...can I get a free meal to? :-)

On second thoughts....a bit far from Merimbula for a meal.
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

Super-T wrote:I'll be in Merimbula in March...can I get a free meal too? :-)
Yes, Merimbula's a bit too far south. But if you happen to pass by Gerroa on your way there (you will if you're coming from Sydney), by all means drop in for a coffee and chat, at least.

As for Canada, USA and UK, sorry Ray/Tom/Mark, they're not on my current travel plans. Been to each country before, and tend not to visit the same place twice (too many other interesting places in the world I've not yet seen! :-) )

Given the spread-out nature of the various pieces of advice needed to 'fix' the colours in the wind direction gauge, and to make sure I remember it if a new release undoes all this good work, I've collected the snippets together into a text file. So anyone wanting to do the same needs only this text file, rather than trawling through a few pages of this thread.
You do not have the required permissions to view the files attached to this post.
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Background behind the digits

Post by mcrossley »

OK, here is what I intend to do for the next release:

* Make the default gauge pointer colour RED
* Make the Wind direction average pointer BLUE
* Switch on the Wind Direction LCD "label" colouring by default

What I'm not doing:

* Implementing LCD text colouring

The LCD's already have predefined background/foreground colour objects, the proper way to do this would be to implement a second LCD colour parameter to the gauge rather than the 'hacks' we have seen here - feel free to continue with this yourselves though, as beteljuice says the supplied code is a baseline from which to start your modifications.
However I think it would be very unusual (even odd) to see a real piece of hardware that had different coloured LCD displays adjacent to each other, so I will not be putting this into the SS library code.

Edit: PS, the current beta version of the next release is still here...
http://weather.wilmslowastro.com/gauges ... -ssT2.html
duke

Re: Background behind the digits

Post by duke »

Edit: PS, the current beta version of the next release is still here...
Looking good Mark :clap:
User avatar
krmidas
Posts: 215
Joined: Sat 03 Jul 2010 9:03 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Lake Zurich, IL; USA
Contact:

Re: Background behind the digits

Post by krmidas »

I'm still a little confused about how to configure the functionality of the LED lights that are on some of the gauges. If I wanted them to blink if an all-time record was set on that particular gauge, is that something that's fairly straightforward? I couldn't find the string that explained the rules for the LED's lighting or not.

-Tom
Tom Keramidas, Lake Zurich, IL, USA
Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Background behind the digits

Post by gemini06720 »

Mark, I understand that some people might like to have different 'label' colours to match the needles in their gauges, but looking at you beta page, I am reminded that real gauge producing companies would not produce gauges with an assortment of different colours for the lettering of the labels - thus, for consistency sake with the other gauges, may I recommend that the wind direction LCD label colouring be switched off by default - if a user wants colour labels for the wind direction LCD or for any labels on any of the other gauges, that user can make the necessary modifications.
User avatar
DanielF
Posts: 184
Joined: Tue 30 Dec 2008 12:53 pm
Weather Station: Davis Vantage Vue, serial logger
Operating System: Win10Pro64
Location: Gerroa, NSW, Australia

Re: Background behind the digits

Post by DanielF »

mcrossley wrote:...However I think it would be very unusual (even odd) to see a real piece of hardware that had different coloured LCD displays adjacent to each other, so I will not be putting this into the SS library code.
Mark,

What you're proposing for the next release would be an acceptable compromise, though I would prefer the LCD digit colours to match the needle colours, as the digits are more visible than the legends.

Whether this is something you might see in a 'real' piece of hardware is irrelevant. One of the reasons you might not see it in hardware is the marginal cost to the manufacturer (maintaining stock of the extra parts). In the cyber world there is zero marginal (on-going) cost for this improvement, and I believe we should take advantage of that to make our displays as easy to interpret as we can.

That said, you're the one putting in most of the effort, and I'm just a 'hanger-on'. I'm certainly grateful for all you've done (and are doing), and don't want you to take my comments as any criticism of you or the excellent job you're doing.
Daniel
Gerroa ('paradise'), Australia
Gerroa weather
Post Reply