Tordex Community
Decimal place in weather monitor - Printable Version

+- Tordex Community (http://forum.tordex.com)
+-- Forum: True Launch Bar plugins (http://forum.tordex.com/forum-4.html)
+--- Forum: Plugin features and improvements (http://forum.tordex.com/forum-15.html)
+--- Thread: Decimal place in weather monitor (/thread-1271.html)

Pages: 1 2


- djmorgan - 02-25-2004

Is there a way to get the decimal place to show in a temperature reading of weather monitor.

eg: 24.4 instead of just 24 Wink


- ozxar - 02-25-2004

i think it would depend on what provider you are getting the information from


- djmorgan - 02-25-2004

The provider is fine gives to 1 decimal place, I have writen my own ini file for weatherzone.com.au an Australian provider that updates every 30 min.

I think it has something to do with INT and DBL! but can't figure how that is used in the straight [Temperature] position r do I set up a cusomparam fore Temp?


- ozxar - 02-25-2004

when i created one for myself i found it easier to create a customparam


- HorusUK - 02-25-2004

If you look at the Weather Monitor page, it details the ini settings. I've duplicated the information on part of the page, and as you'll see, it goes into the CustomParam# section.

Quote:The special sections CustomParam# (where # must be replaced by number starting with 0) are for parsing different values. Each CustomParam section can contain some other values:

Name - the name of parameter (required)
unit - the units used for parameter. This value also must be included in the predefined section (Temperature, Pressure...). Currently supported these units:
F - Fahrenheit (Temperature)
C - Centigrade (Temperature)
hPa - hundreds of Pascals (Pressure)
atm - Atmosphere (Pressure)
psi - Pounds per Square Inch (Pressure)
in Hg - Inches of Mercury (Pressure)
mm Hg - millimeters of Mercury (Pressure)
kPa - Kilopascals (Pressure)
% - percents
ValueType - the type of value can be INT - integer number, DBL - floating point number, STRING - text string. By default all values are parsed as string.
DecimalSymbol - the decimal separator for numbers (by default ".")
GroupSymbol - the thousands separator for numbers (by default empty)



- djmorgan - 02-25-2004

Thanks guys, tried all the different parameters still only shows as a whole number.


- shapeshifter - 02-25-2004

Can you zip up your provider and skin files and send them to me, please? I'll make it work somehow Big Grin


- djmorgan - 02-26-2004

Okay thanks for the help.....

file here

Ini files


- shapeshifter - 02-26-2004

Ok, I have a few ideas, but I need to do some testing. I'll need the url to the page you're parsing as well as the skin's graphics (at least DailyWeather.png, the icon files aren't necesary).


- djmorgan - 02-26-2004

Your wish is my comand

Skin and WWW


- shapeshifter - 02-26-2004

Ok, now I'm confused. The skin files seem to indicate current conditions, but the Provider file you uploaded parses the 5 day forecast (well, 4 of them anyway). None of the temperatures parsed by the provider file have decimal places in the source URL you sent, so I'm guessing you uploaded the wrong provider file? I'm resonably confident I can figure out some sort of solution, but I'd rather not re-invent the wheel, so to speak. If you've already made a provider file to parse the current conditions (and the more precise temperatures) from the URL you posted, please upload that one.


- djmorgan - 02-27-2004

Sorry most have given you the wrong .ini

here try this one

AU Weather.ini

Here is a snippet of source from the web page

<tr>
<td><small>Temperature</small></td>
<td><small>Dewpoint</small></td>
<td><small>Relative Humidity</small></td>
<td><small>Heat Index</small></td>
</tr>
<tr>
<td><h3>28.2


- Q Section - 02-27-2004

djmorgan
Please insert the following into your au weather.ini following your [CustomParam7] -

[CustomParam8]
name = Temp
find0 = ">Temperature<"
find1 = "<h3>"
delim = "&"

Then in the properties do not use the "Temperature" in the right hand column but use the "Temp" instead. This will result in the full temperature including decimal place BUT the Weather Monitor plugin must be changed by Yuri to be able to show the "°C" symbols. Just now it unfortunately cannot show them so at least you shall have the full temperature reading!

When we did the testing the right hand column showed
Temp
Pressure
Humidity
Conditions

Let us know how it goes!


- shapeshifter - 02-27-2004

Ok, use the files in the attached zip. Here's what I did:

As HMSS Q Section pointed out, the standard Temperature data type has a few limitations (such as being converted to an integer) that we can overcome by using a custom prameter type. I deleted the temperature parameter so I could name the custom parameter "Temperature" to have minimal impact on your config dialog box. However, this gives us a temperature without a unit, so I had to employ another sneaky trick: I added the unit to the background png file and aligned the temperature to that in the skin.ini file. It's not the most ideal solution, but it works for now. Maybe the nex version of Weather Monitor will give us some better options.


- djmorgan - 02-27-2004

Thanks guys will give the suggestions a try and get back to you. Smile