• Welcome to TodayPlus Boards v2.
 

Changing Fº to Cº

Started by marcelof, December 03, 2003, 03:24:52 PM

Previous topic - Next topic

marcelof

Well, here is the deal,
i changed at the area code the f to c, and the temperature appears at Celcius, but the indicator is in farenheit Fº.
apears just like this.
The temperature is 32ºC
but at the today screem is 32ºF
how can i change it?
i did just like the FAQ said to do, and the temperature changed, but the indicator didn´t.

by the way, i am using the 10.2, the last one
Marcelo da Silveira França
Brazil - Rio de janeiro
iPAQ 1940

jhollin1138

Edit the weather region of the skin you are using to display °C and not °F.
Jim H

Nielsracing

Look into your skin-file. Go to the weather section, and you'll see 4 or 5 times:  ºF (If you use the search option within the skin-file, it should be easier to find)
Then change the F into a C (for all the 4 or 5 times) en it's done.
You can find the skin file by:
File Explorer --> Program Files --> Todayplus --> Skins

By the way, nice weather in Brazil, 32 ºC  :wink:
Beta Testing Team:
HP IPAQ 1915
256 MB SD CARD
PPC 2002
WisBar, tAgenda

Eddy

Thanks for Jim and Nielsracing's reply.

but what happen if my home city is using Farenheit and city 2 is using Celcius? is it possible to display F for home city and C for city 2?

Thanks!

Eddy

Nielsracing

Quote from: EddyThanks for Jim and Nielsracing's reply.

but what happen if my home city is using Farenheit and city 2 is using Celcius? is it possible to display F for home city and C for city 2?

Thanks!

Eddy

Yes that's possible. Go to your config file.
Then you will see for example:

city1,60,NLXX0002,Adam,F
city2,60,USNY0996,New York,C


The F meens Farhrenheit, and the C is Celsius. So you simply have to change the F into a C (city2)
Beta Testing Team:
HP IPAQ 1915
256 MB SD CARD
PPC 2002
WisBar, tAgenda

jhollin1138

Quote from: Eddybut what happen if my home city is using Farenheit and city 2 is using Celcius? is it possible to display F for home city and C for city 2?
Actually, what I would do is simply leave the C or F off the skin's weather section.
Jim H

Nielsracing

Quote from: jhollin1138
Quote from: Eddybut what happen if my home city is using Farenheit and city 2 is using Celcius? is it possible to display F for home city and C for city 2?
Actually, what I would do is simply leave the C or F off the skin's weather section.

That's also a solution :D
Beta Testing Team:
HP IPAQ 1915
256 MB SD CARD
PPC 2002
WisBar, tAgenda

Eddy

Wow! the reply was relly quick, thanks guys.


QuoteYes that's possible. Go to your config file.
Then you will see for example:

city1,60,NLXX0002,Adam,F
city2,60,USNY0996,New York,C

I am sorry if I didn't myself clear, I did the above method already, and what happen is that my home city will show temperature in F and city 2 will show temperature value in C but with a F at the end.

QuoteActually, what I would do is simply leave the C or F off the skin's weather section.
If I do that, then both cities will have the temperature value in F and with a F at the end (which is less confusing).

using Nielsracing's example, let's assume Adam and New York's temperature are both 32F (or 0C) today. what I see now is Adam will have 32F, and New York have 0F.

if I leave F and C off the config.txt file, then Adam will have 32F and New York will have 32F as well.

what I really like is to see Adam have 32F and New York have 0C.

When I look at the skin file (calendar.txt or slider.txt), it seems that the weather display is using one format, either F or C and it doesn't vary with the F and C you put at the end of city statement. am I making the correct assumption or I am missing something here?

I hope I made myself clear this time.  :P  thanks for all your help, I am really enjoying this site.

Eddy

jhollin1138

Eddy,

The skin you are displaying just adds the text behind the value that has been downloaded.  For example, if you have TodayPlus download the weather for city A in °F and city B in °C, that is how the information is displayed.  Now when the skin applies the value stored for the temperature of city A and city B it will display whatever the "postscript" part of the skin is set to display.  It does this without changing the display value, the skin doesn't know it needs too.

For example if the line of the skin looks like this:
forecast,high,1,100,16,,°F,r
The skin will show the forecasted high for day 1 and it will look like this: 32°F regardless of whether the stored data for the high for day 1 is in Celsius are Fahrenheit.

If you set the skin to display just the "°" like this:
forecast,high,1,100,16,,°,r
All the skin will display is: 32°

To further explain what is going on, let say you change the same line in the skin to look like this:
forecast,high,1,100,16,, Eddy,r
Then the skin will display: 32  Eddy

I hope that helps.
Jim H

Eddy

Jim,

Excellent example, thank you very much. you guys are really, really great.

i hope you don't mind my next question,
QuoteIf you set the skin to display just the "°" like this:
Code:
forecast,high,1,100,16,,°,r

All the skin will display is: 32°
from your example, is there a variable that I can use to extract the text in the city statement?

so in the config.txt file, I can do city1,60,NLXX0002,New York,F and in the skin file, I can do something like forecast,high,1,100,16,, %some variable%,r

with all the help available in the forum, I am so addicted to this excellent software within two days after finding it on the Internet.

Thanks!

Eddy

jhollin1138

Eddy,

Of course you can ask any question you would like.

I am 99.9% sure that a variable currently can only contain a numeric value.  Besides, in order for your example to work you would need to be able to set up a variable-array to contain the setting for each city.

You might be able to do something with a "bit code" and a series of "if.then,else" statements in the skin.  The problem is, it could get messy.

If you aren't sure what a "bit code" is, it is assigning a set value to a series of true statements and summing them all together.  The values used are always 1, 2, 4, 8, 16, 32,.... (notice the next value is always double the previous value).  For example let's say you have the following:
city,1,60,NLXX0002,Adam,F
city,2,60,USNY0996,New York,C
city,3,60,UKXX0001,Somewhere,C

If you were using "C" to set the "bit code" you would have the following:
Since City 1 is in F = 0 (because it is false)
Since City 2 is in C = 2 (because it is true)
Since City 3 is in C = 4 (because it is true)
Totaling the values up, you have 6.  The way only you can get 6 is if item 2 and 3 are true.

If you had:
city,1,60,NLXX0002,Adam,C
city,2,60,USNY0996,New York,F
city,3,60,UKXX0001,Somewhere,C

Then you would have a "bit code" value of 5 (1+0+4=5).  Again, the only way to get 5 is if item 1 and 3 are true.

Again, coming up with "if,then,elses" to test the "bit code" and output the correct information would be the hard part.  BTW, just using three cities, if my math is correct you would need 8 "if" statements just to test the "bit code."  That doesn't even include the "if" statements you would need just to set the display.

Not saying it can't be done.  Just that it is allot easier to have the skin display 32°.  :D
Jim H

Lordtwisted

eddy,

Here is what you do, verry simple and work perfect in the config file do this:

city1,60,NLXX0002,Adam,F
city2,60,USNY0996,New York,C


And i think you already got it then in the skin file copy this and replace it in your skin:

//=================================================
// REGION 3 - PAGE 100
// Current Weather Details
//=================================================
region,3,100,-1
load,city,%var0%
if,var,var0,,=,1
button,0,0,240,54,3,3,,1
changefont,tahoma,11,b
text,23,0,[name],c
todayicon,5,7,,t
offsetadd,0,1
today,sky,145,0,,,c
today,realtemp,140,24,,°F,r
changefont,tahoma,11,
text,51,12,Temperature:,l
today,temp,140,12,,°F,r
text,51,24,Feels Like:,l
text,51,36,Barometer:,l
today,barometer,140,36,, in,r
changefont,tahoma,11,b
today,humidity,235,12,,%,r
changefont,tahoma,11,
text,150,12,Humidity:,l
text,150,24,UV:,l
today,uv,235,24,,,r
today,date,235,36,,,r
else
               button,0,0,240,54,3,3,,1
changefont,tahoma,11,b
text,23,0,[name],c
todayicon,5,7,,t
offsetadd,0,1
today,sky,145,0,,,c
today,realtemp,140,24,,°C,r
changefont,tahoma,11,
text,51,12,Temperature:,l
today,temp,140,12,,°C,r
text,51,24,Feels Like:,l
text,51,36,Barometer:,l
today,barometer,140,36,, in,r
changefont,tahoma,11,b
today,humidity,235,12,,%,r
changefont,tahoma,11,
text,150,12,Humidity:,l
text,150,24,UV:,l
today,uv,235,24,,,r
today,date,235,36,,,r
endif
offsetadd,0,53
endregion,3,100
//=================================================
// REGION 3 - PAGE 200
// Vars used: 1
//=================================================
region,3,200,-1
load,city,%var0%
if,var,var0,,=,1
button,0,0,240,54,3,3,,1
changefont,tahoma,11,b
forecast,date_ddd,%var1%,24,0,,,c
changefont,tahoma,11,
forecasticon,%var1%,5,7,,t
nightforecasticon,%var1%,198,10,,t
changefont,tahoma,11,b
text,217,0,Night,c
offsetadd,-15,7
changefont,tahoma,11
forecast,text,%var1%,137,-8,,,c
forecast,nighttext,%var1%,137,2,,,c
changefont,tahoma,11,b
forecast,high,%var1%,125,12,,°F,r
forecast,low,%var1%,195,12,,°F,r
forecast,precipitation,%var1%,205,24,,%,r
changefont,tahoma,11,
text,75,12,High:,l
text,145,12,Low:,l
text,60,24,Chance of Precipitation:,l
else
button,0,0,240,54,3,3,,1
changefont,tahoma,11,b
forecast,date_ddd,%var1%,24,0,,,c
changefont,tahoma,11,
forecasticon,%var1%,5,7,,t
nightforecasticon,%var1%,198,10,,t
changefont,tahoma,11,b
text,217,0,Night,c
offsetadd,-15,7
changefont,tahoma,11
forecast,text,%var1%,137,-8,,,c
forecast,nighttext,%var1%,137,2,,,c
changefont,tahoma,11,b
forecast,high,%var1%,125,12,,°C,r
forecast,low,%var1%,195,12,,°C,r
forecast,precipitation,%var1%,205,24,,%,r
changefont,tahoma,11,
text,75,12,High:,l
text,145,12,Low:,l
text,60,24,Chance of Precipitation:,l
endif
offsetadd,15,47
endregion,3,200

color,font,-1_4_-1
endregion,1,0


Thats it works great. it is set up for two cites, it will work for more then two but all the cities after 1 will show °C. but it can be changed verry easy to show each city diffrantly, but for 2 this is it.

Thanks Lordtwisted :D  8)  :D

jhollin1138

Lordtwisted,

I forgot he was running only 2 cities.  I couldn't see the forest through the trees.  Man is my face red.  :oops:
Jim H

Eddy

Guys,

thanks SO MUCH for all the help, I think I got it.

first of all, I don't think the following statement works.load,city,%var0% I tried that and the value always return zero, I am not sure "load" works with variable.

then I noticed there is a region 2 to load weather data (I am using calendar.txt as my skin file) and it has the load city and storevar statement, so this is what I did

region,3,100,-1
if,var,var0,1,><,1
[the origional section]
else
[same as above but show temperature in Celsius]
endif

the var0 value was taken from region 2, and by using if,var,var0,low,><,highI can group my cities as 1st group will show Farenheit and 2nd group will show Celsius.

the only changes need to be done (as Lordtwisted stated) is region 3, page 100 and page 200.

now I have to figure out what's the proper unit for barometer in my 2nd group, I think it should be in cm instead of in inches.

one issue solved, I have to figured out how to update behind the firewall now, time to join another thread. :P

again, Thanks for all the great help here, this is the best community I have ever seen for the last so many years.

Eddy

Eddy

jhollin1138,

QuoteLordtwisted,

I forgot he was running only 2 cities. I couldn't see the forest through the trees. Man is my face red.
Actually, I had 3 cities on my list, I didn't want to complicated the matter, so I mentioned two. :P

as you said,
QuoteNot saying it can't be done. Just that it is allot easier to have the skin display 32°.
but then I would missed all the fun with tweaking the code.

TodayPlus for Pocket PC is like "Samurize" for PC, so much fun to just play with it and see what you can get.

Thanks, ~Eddy