Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu May 23, 2013 3:13 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  [ 10 posts ] 
Author Message
 Post subject: Gauge Type Default
PostPosted: Sat Jul 21, 2012 2:32 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
On the gauge that displays wind chill/heat index/dew point/apparent temp/humidex, I went in to the .htm file and removed the references to apparent temp and humidex, since I'm not interested in displaying those values.

Everything displays correctly, but when the page loads, it still defaults to apparent temp. I suspect the fix is in one of the gauge javascript files, but I'm not sure where. Can anyone point me in the right direction?

-Tom

Attachment:
Capture.JPG
Attachment:
Capture2.JPG


You do not have the required permissions to view the files attached to this post.

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Sat Jul 21, 2012 2:43 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2514
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
You need to change:

176 g_dew.title = LANG.apptemp_title;
178 g_dew.selected = 'app';

and depending on what you want the default to be in the HTML from line 90 you need to select a new default selected option:

eg.
<input id="rad_dew4" type="radio" name="rad_dew" value="hea" selected onclick="doDew(this);">

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Sat Jul 21, 2012 5:53 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
Attachment:
Capture3.JPG
I got it to work.

One little nit: how do I have the page load and have the dew point button already selected, like it is for temp and humidity?


You do not have the required permissions to view the files attached to this post.

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Sat Jul 21, 2012 8:04 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
krmidas wrote:
One little nit: how do I have the page load and have the dew point button already selected, like it is for temp and humidity?
I'm no expert, but the code for the temp and and humidity gauges has "checked" in the default items, so I guess that you need to do the same for dew point.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Sat Jul 21, 2012 8:30 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
That did the trick! Thanks!

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Sat Jul 21, 2012 9:55 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2514
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Oops, yes it is checked, not selected. My memory is going! :bash:

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Wed Jul 25, 2012 5:00 pm 
Offline
User avatar

Joined: Tue May 08, 2012 4:24 pm
Posts: 163
Location: Pickering, Ontario Canada
Weather Station: WMR200A
Operating System: Windows 7 64-bit
Hi Mark,

Same issue here.
I want the gauge to display initially the Humidex value (and not apparent temp).
Changed all the appropriate codes, however it displays the humidex (and it is checked!!) but on the gauge it still displays Apparent
g_dew.title = LANG.apptemp_title;
g_dew.value = 0.0001;
g_dew.selected = 'hum';
When I change it to:
g_dew.title = LANG.humtemp_title;
g_dew.value = 0.0001;
g_dew.selected = 'hum';
it shows NO display (= blank)
What does it need to be changed in???

Thanks,
Arthur


You do not have the required permissions to view the files attached to this post.

_________________
http://www.altonaweather.ca

Image


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Wed Jul 25, 2012 10:40 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1772
Location: World...
Weather Station: No weather station
Operating System: No operating system
Arthur, this is what you have presently in your 'gauges.js' script (at 14:20 PDT):
Code:
    // define dew point gauge start values
    g_dew.sections = createTempSections(0, true);
    g_dew.areas = [];
    g_dew.minValue = 0;
    g_dew.maxValue = 40;
    g_dew.title = LANG.hum_title;
    g_dew.value = 0.0001;
    g_dew.selected = 'hum';
    g_dew.minMeasuredVisible = true;
    g_dew.maxMeasuredVisible = true;
This is what you need to properly display the humidex factor (not really a temperature per se):
Code:
    // define dew point gauge start values
    g_dew.sections = createTempSections(0, true);
    g_dew.areas = [];
    g_dew.minValue = 0;
    g_dew.maxValue = 50; // changed this value as the humidex can go higher than the temperature
    g_dew.title = LANG.humdx_title; // Arthur this line displays the title within the gauge - note the difference...
    g_dew.value = 0.0001;
    g_dew.selected = 'hum';
    g_dew.minMeasuredVisible = true;  // see comment below
    g_dew.maxMeasuredVisible = true;  // see comment below
Arthur, by default, for the humidex factor setting, the gauge will display neither the maximum nor the minimum measured value - thus placing a true at the end of both 'MeasuredVisible' lines will not activate anything, unless you also modify the code for the humidex factor.

You will need to go down the code of the 'gauges.js' script to lines 1174-1175:
Code:
            g_dew.minMeasuredVisible = false;
            g_dew.maxMeasuredVisible = false;
In my opinion, the only useful information would be to display the maximum measured value (adding the minimum measured value is meaningless and would only clutter the display), thus the new code:
Code:
            g_dew.minMeasuredVisible = false;
            g_dew.maxMeasuredVisible = true;

NOTE: IMPORTANT: Basic precaution! Always, always make a backup copy of the file(s) you are going to edit!


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Wed Jul 25, 2012 10:53 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1772
Location: World...
Weather Station: No weather station
Operating System: No operating system
Arthur, after responding to your message, I decided to go a little further ... I modified both my PHP and my JavaScript to 'automate' the change of seasons... :)

Arthur, first, you have to get more familiar with PHP... :mrgreen:

Then, it is a matter of adding some PHP code into the 'gauges.php' script to determine the season (or rather, to determine if it is summer) and pass on that variable (a switch: true/false) to the 'gauges.js' script - this way, automatically, without further editing, the gauge will display either the apparent temperature (or whatever temperature has been selected as the default) and the humidex factor (or the heat index) during the summer season...

To chose between the heat index and the humidex factor, a second variable (again, a switch: true/false) has to be passed on to the 'gauges.js' script.

Really nice what one can do with a few lines of PHP... :D


Top
 Profile  
 
 Post subject: Re: Gauge Type Default
PostPosted: Wed Jul 25, 2012 11:17 pm 
Offline
User avatar

Joined: Tue May 08, 2012 4:24 pm
Posts: 163
Location: Pickering, Ontario Canada
Weather Station: WMR200A
Operating System: Windows 7 64-bit
Hi Ray,

I didn't get a Forum notification earlier after your answers (probably didn't checkmark it), so I've been struggling with "humidex, humi, hum, humx etc, etc, until I saw in the autoscaling section the LANG.humdx :oops:
Thanks for the second suggestion (min/max display). I can use this since we have some extreme hum values which top de 40+.......

As for the PHP, I will currently just "click" when seasons change and keep myself first of all focussed on html :D :D

Cheers,

Arthur

_________________
http://www.altonaweather.ca

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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