Sandaysoft

Support forum for Cumulus weather station software
It is currently Tue May 21, 2013 1:40 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Re: SteelSeries Solutions
PostPosted: Sat Feb 25, 2012 3:23 am 
Offline
User avatar

Joined: Wed Jun 11, 2008 7:36 pm
Posts: 378
Location: L'Estartit, Spain
Weather Station: WMR-968
Operating System: Windows 8
[url]one missing semicolon and the complete script is dead[/url]

You are right, of course, "fun", I was being facetious.

Just be thankful that you are not a diplomat - if you use the wrong word you start a war! Javascript just doesn't work.

GW

_________________
Image


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Sat Feb 25, 2012 8:49 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
mcrossley wrote:
You WILL be able to change them dynamically - but they WILL be linked to the pointer colours, which makes sense I think.
So, to make this clear (remember, you are dealing with old memory chips... :lol: ) the label colours will be the pointer coulour - no separate colour?

Mark, may I make a suggestion for the SteelSeries Gauges pages on your hosting server - could you use the 'titleString' part and the 'unitString' part of each gauge to define the type of gauge used such as 'Radial' and 'TYPE1' for the top left gauge on the 'Canvas Steel - Demo - Radial' page - this would make it easier for visitors to identify which types of gauges they are looking at. ;)


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Sat Feb 25, 2012 8:58 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
gwheelo wrote:
Just be thankful that you are not a diplomat - if you use the wrong word you start a war! Javascript just doesn't work.
Me, a diplomat! :lol: George, if I was a programming diplomat (I know, that is an oxymoron), I would make sure that that my JavaScript are directly linked to/controlling a war game computer... :twisted:


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Mon Feb 27, 2012 10:33 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Here is a point of reference - it's obvious but just in case you hadn't realised it...

Since the realtimegauges.txt file uses the JSON file format, you can safely add your own fields/tags to the standard file (indeed you can re-order it how you like - so long as you leave the 'ver' field as the last value in the file). Adding your own fields allows you to refer to the new tag via the 'data' object in the scripts without adding any additional code e.g.

in realtimeGuagesT.txt add:

... "newField":"<#newTag>", ...

Then in the script you can use:
...
var myValue = data.newField * 100;
...

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Tue Feb 28, 2012 11:15 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
mcrossley wrote:
var myValue = data.newField * 100;...
Is the '* 100' needed for every variables... :)


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Tue Feb 28, 2012 11:16 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
gemini06720 wrote:
mcrossley wrote:
var myValue = data.newField * 100;...
Is the '* 100' needed for every variables... :)
Yes, if you want to multiply them by 100 ;)

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Wed Feb 29, 2012 5:10 am 
Offline
User avatar

Joined: Wed Jun 11, 2008 7:36 pm
Posts: 378
Location: L'Estartit, Spain
Weather Station: WMR-968
Operating System: Windows 8
Revisited

Quote:
George, you mentioned something about buying a book


I believe I overstated what to look for in a good book.

After visiting a large bookstore with a wide selection I have tempered my view in consideration of HTML5 & CSS3. I now suggest you find a more general book on website design and another on Javascript. The books that target HTML5 & CSS3 consider you will use only those new standards and not many browsers (even the newest versions) are totally compatible.

Make certain you pick a book that covers "tables", "divs" and other web tags in current use.

I just made an attempt to recast the steelseries gauge page using only HTML 5 and failed miserably - don't bother even trying until today's browsers are up to it - perhaps another year or two.

Don't ignore HTML5 & CSS3 - you will need it eventually.

GW

_________________
Image


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Wed Feb 29, 2012 9:51 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
gwheelo wrote:
I just made an attempt to recast the steelseries gauge page using only HTML 5 and failed miserably - don't bother even trying until today's browsers are up to it - perhaps another year or two.
George, could you explain more clearly what you mean by 'recast the steelseries gauge page'!

The default templates (ie: 'gauges-ssT.htm') are already HTML5 compliant - how could you do more than that? Could you be a bit more explicit on what 'failed miserably'.

HTML5 is an improved version of HTML4 (plus all the HTML before) with some new tags and some deprecated tags - I cannot understand how HTML5 would failed.

And, surprisingly enough, most latest releases of the major browsers (even some minor browsers) are compatible with HTML5 ... although they might interpret some tags differently - even Internet Explorer 9 is quite compatible with HTML5... :roll:


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Wed Feb 29, 2012 8:22 pm 
Offline
User avatar

Joined: Fri Jun 24, 2011 5:57 pm
Posts: 171
Location: USA
Weather Station: Davis Vantage Pro2
Operating System: Windows XP3
Expanding on having the Wind Direction Gauge labels (Latest & Average) match the two needle colors, I now have the LCD text matching the pointer colors as well. I did this by simply adding two lines (blue) as follows:

if (bLatest) {
mainCtx.fillStyle = pointerColor.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY1 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
} else {
mainCtx.fillStyle = pointerColorAverage.medium.getRgbaColor();
mainCtx.fillText(value + "\u00B0", imageWidth / 2 + lcdWidth * 0.05, lcdPosY2 + lcdHeight * 0.35 + lcdFontHeight * 0.38, lcdWidth * 0.9);
}

You can see the result at tobyspondweather.com/gauges-ss.php

I did run into a problem using online minifiers where the degree symbol was not minified properly. I ended up downloading the Microsoft Ajax Minifier, which gave me the results I wanted.

Kerry

_________________
http://www.tobyspondweather.com
twitter: @tobyspond


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 1:07 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
Kerry, thank you for the idea :idea: modification - even works well with my gauges... :)

Also, a BIG thank for the suggestion about the Microsoft Ajax Minifier - indeed, I now prefer this utility to an online one. 8-)

Has anyone tried working with the thermometer gauges - I thought I had the thermometer gauge going but it has been creating problems with the other gauges, probably because of the limitations of the linear gauges and the lack of error checking within the specific code... :(


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 1:23 am 
Offline
User avatar

Joined: Fri Jun 24, 2011 5:57 pm
Posts: 171
Location: USA
Weather Station: Davis Vantage Pro2
Operating System: Windows XP3
Ray,

Happy to help as I have benefited greatly from the wealth of programming knowledge of the various forum members. It has been a steep and ongoing learning curve. I have found the answers to most of my questions in either the forum or the wiki.

Kerry

_________________
http://www.tobyspondweather.com
twitter: @tobyspond


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 1:43 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
Kerry, this is exactly (or should exactly be) the purpose of the forum thread 'SteelSeries Solutions' - to build onto the 'generic' SteelSeries Gauges script... :D


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 3:23 am 
Offline
User avatar

Joined: Wed Jun 11, 2008 7:36 pm
Posts: 378
Location: L'Estartit, Spain
Weather Station: WMR-968
Operating System: Windows 8
Quote:
could you explain more clearly what you mean by 'recast the steelseries gauge page'!


I reviewed three books with "HTM5" in there titles and all three concentrated on the new HTML5 tags and standards suggesting that "old" tags such as "table" and even "div" are out of mode and discouraged. Tags such as "iframe" are not to be considered at all - but that was true even with HTM4. These three books based their examples of proper design on new tags such as "article" and even "column" which is not supported in some new browsers. Following the suggestions of these books I found it impossible (for me at least) to layout Mark's current gauge.html (recast = rewrite) using the tags for which they provide examples. Yes HTML5 standards include most of the old tags but these HTML5 books appear to be heralding just the newest aspects of the standard.

My point was simply to suggest if you are looking for a book you might want a book a bit more general than one that details only the newest tags in the standard.

GW

_________________
Image


Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 8:21 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
tombstone wrote:

I did run into a problem using online minifiers where the degree symbol was not minified properly. I ended up downloading the Microsoft Ajax Minifier, which gave me the results I wanted.

Kerry

That is the minifier I always use, get the options right and it is pretty effective. I have a shortcut to it on my desktop setup with the options I want so I can just drag'n'drop a script on to it from where ever.

Here is the batch file the shortcut points to:
Code:
@echo Minifying %~n1 to %~n1.min.js ...
@"C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\ajaxmin.exe" -JS "%1" -inline:false -clobber:true -analyse -out "%~p1%~n1-min.js"
@pause

_________________
Mark
Wilmslow Astro Weather


Last edited by mcrossley on Thu Mar 01, 2012 10:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: SteelSeries Solutions
PostPosted: Thu Mar 01, 2012 10:20 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1797
Location: World...
Weather Station: No weather station
Operating System: No operating system
George, according to the Quackit pages (among the many HTML5 specific pages I have bookmarked), there are at least 29 new tags (or elements) - true, not all of the tags are supported by all browsers all of the time ... although most of the tags are supported in the most recent releases of all browsers.

George, I have an older HTML5 book (it was published at the early days of HTML5) - it is basically an introduction to the new tags and how they could/should be used - at the time of publication of that book, none of the browsers supported all of the tags.

I understand that the 'table' tag for example should be used for specific reasons but that it should be completely dismissed is nonsense! To discourage the use of the 'div' tag is simply (in my humble opinion) stupid!

George, please have a look at the 'impress' demo page and tell me how those effects could be produced without the use of 'div' tags! :roll: ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group