|
 |
06-07-2009, 10:19 PM
|
#1
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Displaying only one set of details 1st day of Weather (5day)
Edit: I was unable to get this to work but Blue figured it out. See post 14 for details.
======ORIGINAL POST=========
I've been looking through variables and for some reason I can't figure out how to do this. I want to only display one set of images in my weather (5 day) skin. This works fine for days 1-4 but for todays weather I need to have it check first if data is available and if not display the night image. I thought I could do this by reading w_0day_hi and if it's value is "N/A" then display w0nighticon. Any help?
Last edited by Deric; 08-18-2009 at 02:29 AM.
Reason: Issue corrected by Blue
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
06-08-2009, 09:22 AM
|
#2
|
|
Terminal flasher
Join Date: Sep 2004
Location: Woodbridge, VA
Posts: 6,312
|
i always thought this should be something added into RR. There's no reason to display 2 sets of labels/icons after 4pm. It would actually be simple to add via plugin but who knows maybe one of the RR skin wizards can whip something up with stock RR commands. I cant wait to see how that skin turns out for you
__________________
03 Acura RSX Coupe
Developer of: RRFusion, MovieTimes.NET, (new)RRMail, RRShoutcast, & RRVehicle Maintenance
Currently working on: RRVehicle Maintenance
|
|
|
06-08-2009, 12:07 PM
|
#3
|
|
RoadRunner Mastermind
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,064
|
You can try something like this:
Indicator code:
"$DISPICON$"
On the weather button (that loads the screen) add this:
Code:
"<originalcommand>||SETVARBYCODE;DAYHI;w_0day_hi||EVAL;ISNA;strcomp("N/A";"$DAYHI$")||BYVAR;ISNA;SETVAR;DISPICON;WICON<<SETVAR;DISPICON;w0nighticon"
__________________
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
|
|
|
06-08-2009, 03:22 PM
|
#4
|
|
The Curator
Join Date: Aug 2004
Location: Chicago area,IL
Posts: 3,577
|
At some point, some on the basic builtin functions will be removed from the source and made into plugins. Making the RR exe the skinning engine only as Guino has wished he'd started with this line of thinking...
|
|
|
06-08-2009, 04:57 PM
|
#5
|
|
Raw Wave
Join Date: Sep 2006
Location: War-Town, GA.
Posts: 1,915
|
Nice thread tittle.
|
|
|
06-08-2009, 07:03 PM
|
#6
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Quote: Originally Posted by guino 
You can try something like this:
Indicator code:
"$DISPICON$"
On the weather button (that loads the screen) add this:
"<originalcommand>||SETVARBYCODE;DAYHI;w_0day_hi|| EVAL;ISNA;strcomp("N/A";"$DAYHI$")||BYVAR;ISNA;SETVAR;DISPICON;WICON<<S ETVAR;DISPICON;w0nighticon"
That worked great Guino. Thanks a lot.
|
|
|
08-17-2009, 12:55 AM
|
#7
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Note: I updated the title and added final code to post 1. I'm unsure if this will be needed once weather is taken out of the core code and used in a plug-in.
-Deric
__________________
2006 Mustang with indash CarPC
| Parts list | | | | D945GCLF2 | 2GB RAM | 20GB HDD | | Opus 120W PSU | Lilliput 8" | Directed HD | | RideRunner | nLite XP | iGO8 |
|
|
|
08-17-2009, 01:57 AM
|
#8
|
|
The Curator
Join Date: Aug 2004
Location: Chicago area,IL
Posts: 3,577
|
To slightly simplify your ind part of the code, just set the "Today" ind to "wicon", that shows the corresponding day/night icon depending on what time it is..
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
08-17-2009, 02:05 AM
|
#9
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Quote: Originally Posted by Blue ZX3 
To slightly simplify your ind part of the code, just set the "Today" ind to "wicon", that shows the corresponding day/night icon depending on what time it is..
I originally had that in but if the current status was different than the day or night status (say it's currently cloudy but tonights forecast says t-storms) it wouldn't give the correct details.
__________________
2006 Mustang with indash CarPC
| Parts list | | | | D945GCLF2 | 2GB RAM | 20GB HDD | | Opus 120W PSU | Lilliput 8" | Directed HD | | RideRunner | nLite XP | iGO8 |
|
|
|
08-17-2009, 02:18 AM
|
#10
|
|
The Curator
Join Date: Aug 2004
Location: Chicago area,IL
Posts: 3,577
|
So what you wanted was only the day OR night icon not the current. What your looking for would be like a "wdaynighticon" that would act like the posted ind code.
[ Edit ]
Like this right?
"wdaynighticon" - Shows either the day or night weather icon, if day info not availible (>~4PM) then shows the night icon
Last edited by Blue ZX3; 08-17-2009 at 02:43 AM.
|
|
|
08-17-2009, 04:01 AM
|
#11
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Correct - I just noticed my byvar code is backwards plus I'm not getting a true result back from strcomp
Quote: Originally Posted by Blue ZX3 
So what you wanted was only the day OR night icon not the current. What your looking for would be like a "wdaynighticon" that would act like the posted ind code.
[ Edit ]
Like this right?
"wdaynighticon" - Shows either the day or night weather icon, if day info not availible (>~4PM) then shows the night icon
__________________
2006 Mustang with indash CarPC
| Parts list | | | | D945GCLF2 | 2GB RAM | 20GB HDD | | Opus 120W PSU | Lilliput 8" | Directed HD | | RideRunner | nLite XP | iGO8 |
|
|
|
08-17-2009, 04:52 AM
|
#12
|
|
The Curator
Join Date: Aug 2004
Location: Chicago area,IL
Posts: 3,577
|
That has been added, but don't know if it'll make this release whenever it does get released..
|
|
|
08-17-2009, 05:44 PM
|
#13
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
I'll wait for the update since I can't get it to work and I was hoping to use something similar for setting images elsewhere in the skin. It looks like I'm not getting the variable ISNA set to something. If I set a label to "$ISNA$" I get no status and it seems the ByVar command defaults to TRUE. This was the code I was using
LOAD;WEATHER_DETAIL.SKIN||SETVAR;DAYHI;w_0day_hi|| EVAL;ISNA;strcomp("N/A";"$DAYHI$")||BYVAR;ISNA;SETVAR;W0ICON;w0nightico n<<SETVAR;W0ICON;w0dayicon",
I put label commands for $DAYHI$ amd $ISNA$ and only DAYHI is showing with a temp value (75) on my weather_detail.skin. ISNA shows nothing.
__________________
2006 Mustang with indash CarPC
| Parts list | | | | D945GCLF2 | 2GB RAM | 20GB HDD | | Opus 120W PSU | Lilliput 8" | Directed HD | | RideRunner | nLite XP | iGO8 |
|
|
|
08-18-2009, 12:34 AM
|
#14
|
|
The Curator
Join Date: Aug 2004
Location: Chicago area,IL
Posts: 3,577
|
Here is not only a working code, but also takes into account F & C temp labels  Part of the problem was that the "w_0day_hi" label also appends the correct temp format to the "N/A" and causing all the codes above to not work correctly, to which I have to adj the PI's code as i too just noticed this...
I moved the load the end of the cmd so that when the screen is loaded the weather icon's var is already set to use the correct image. This is of course assuming that your coming from the weather screen or issued a "relaodweather" cmd before hand to populate the "w_0day_hi" label..
Code:
"Weather_5Day","EVAL;ISINTL;strcomp("USA";"$weatherunits$")||BYVAR;ISINTL;SETVAR;N/AFC;N/A C<<SETVAR;N/AFC;N/A F||SETVARBYCODE;DAYHI;w_0day_hi||EVAL;ISNA;strcomp("$N/AFC$";"$DAYHI$")||BYVAR;ISNA;SETVAR;W0ICON;w0dayicon<<SETVAR;W0ICON;w0nighticon||LOAD;WEATHER_DETAIL.SKIN"
Last edited by Blue ZX3; 08-18-2009 at 12:37 AM.
|
|
|
08-18-2009, 02:04 AM
|
#15
|
|
Constant Bitrate
Join Date: Sep 2006
Posts: 184
|
Thanks Blue!  . I figured it might be something with the value and even tried a couple other weather items but gave up. I was actually about to go through the old source code to see if I could find the issue.
__________________
2006 Mustang with indash CarPC
| Parts list | | | | D945GCLF2 | 2GB RAM | 20GB HDD | | Opus 120W PSU | Lilliput 8" | Directed HD | | RideRunner | nLite XP | iGO8 |
Last edited by Deric; 08-18-2009 at 02:13 AM.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:14 PM.
| |