android
  #1  
Old 12-30-2009, 11:03 PM
teknokid92 teknokid92 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 13
Default WPS code debugging

well theres some problem with this WPS code I wrote, I just can't figure out what.
the error is similar to the errors in most of the themes uploaded in rbthemes.com.
is there any way i can find out the error, some kinda debugger?
I wrote it with the help of the Custom WPS wiki from rockbox.

%wd
%X|backdrop_Draw With Me.bmp|0|0|
%xl|B|battery.bmp|153|5|11|
%xl|C|pbstatus.bmp|77|191|3|
%xl|M|volume.bmp|123|199|16|
%xl|E|rep.bmp|37|198|4|
%xl|F|shuffle.bmp|19|198|
%xl|J|ff.bmp|98|197|
%xl|K|rw.bmp|53|197|
%Cl|5|104|c75|c75|
%pb|pb.bmp|0|185|176|6|
#Viewports
%v|0|20|176|84|-|-|-|
%ac%s%?it<%it|%Unknown>
%ac%s%?ia<%ia|%?d2<%d2|(root)>>
%ac%s%?id<%id|%?d1<%d1|(root)>>
#Conditional Viewports
%?C<%Vda|%Vdb>
#Now Playing with AA
%Vl|a|85|104|86|75|1|-|-|
%C
%s%ac%t5%iy;%s%ac%t5%ig
%s%acPlaycount: %rp;%s%acRating: %?rr<0|1|2|3|4|5|6|7|8|9|10>;%s%acAutoscore: %ra

%s%acNext:
%s%ac%?Ia<%Ia|%?D2<%D2|(root)>> - %?It<%It|%Fn>
#Now Playing without AA
%Vl|b|0|104|176|80|1|-|-|
%s%ac%t5%iy;%s%ac%t5%ig
%s%ac%t5Playcount: %rp;%s%ac%t5Rating: %?rr<0|1|2|3|4|5|6|7|8|9|10>;%s%ac%t5Autoscore: %ra

%s%acNext:
%s%ac%?Ia<%Ia|%?D2<%D2|(root)>> - %?It<%It|%Fn>
#battery viewport
%?bp<%xdBk|>|%?bl<%xdBj|%xdBi|%xdBh|%xdBg|%xdBf|%x dBe|%xdBd|%xdBc|%xdBb|%xdBa>>
#time viewport
%V|5|0|40|20|1|-|-|
%ac%cI:%cM %cp
%V|48|0|80|20|1|-|-|
%ac%cb %cd,%cY
%ac%?cw<Sunday|Monday|Tuesday|Wednesday|Thursday|F riday|Saturday>
#playbackstatus viewport
%?mp<%xdCa|%xdCa|%xdCb|%xdCc|%xdJ|%xdK>
#volume viewport
%?pv<%xdMa|%xdMb|%xdMc|%xdMd|%xdMe|%xdMf|%xdMg|%xd Mh|%xdMi|%xdMj|%xdMk|%xdMl|%xdMm|%xdMn|%xd

Mo|%xdMp>
#current time in songviewport
%V|2|192|30|10|8|-|-|
%ar%pc
%V|110|192|60|10|8|-|-|
%al%pr(%pt)
#status icons viewport
%V|125|15|46|13|1|-|-|
%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
%?ps<%xdF|>
#playlist position
%V|5|20|50|15|1|-|-|
%ar%pp of %pe
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 12-30-2009, 11:11 PM
saratoga saratoga is offline
Rockbox Developer / Moderator
 
Join Date: Apr 2007
Posts: 3,627
Default

Yeah, see the "Tools" section on the CustomWPS page if you haven't. The sim and checkwps tool can give you debug info.
Reply With Quote

  #3  
Old 12-30-2009, 11:15 PM
teknokid92 teknokid92 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 13
Default

Well I did check that section.

But I couldn't understand that part of it. Could anyone please dumb it down a bit? as to where exactly is this debugger thing.
Reply With Quote

  #4  
Old 12-31-2009, 12:10 AM
saratoga saratoga is offline
Rockbox Developer / Moderator
 
Join Date: Apr 2007
Posts: 3,627
Default

Dumb version:

Click the sim download link, add your WPS to the simulated rockbox, then run the sim with the "--debugwps" option so it spits out errors when parsing WPS scripts.
Reply With Quote

  #5  
Old 12-31-2009, 01:21 AM
teknokid92 teknokid92 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 13
Default

I had already done that part of it, duH!

but i cant see that " --debugwps " option anywhere??

how do I go to it?
Reply With Quote

  #6  
Old 12-31-2009, 01:59 AM
saratoga saratoga is offline
Rockbox Developer / Moderator
 
Join Date: Apr 2007
Posts: 3,627
Default

Quote:
Originally Posted by teknokid92 View Post
I had already done that part of it, duH!

but i cant see that " --debugwps " option anywhere??

how do I go to it?
http://en.wikipedia.org/wiki/Command-line_argument
Reply With Quote

  #7  
Old 12-31-2009, 03:02 AM
teknokid92 teknokid92 is offline
Junior Member
 
Join Date: Nov 2008
Posts: 13
Default

I tried that too.. but I'm not able to type anything into the command prompt.
Reply With Quote

  #8  
Old 12-31-2009, 07:44 AM
herefornow's Avatar
herefornow herefornow is offline
Junior Member
 
Join Date: Dec 2007
Location: ohio usa
Posts: 74
Default

What i usually do when fixing or creating a theme. Drop the theme into the simulator and then go first error and fix that using the information the simulator gives me(black window). Also i refer to the wps information in the sansa e200 manual to see what is wrong with my code. Then go to the next error. Sometimes the error will be a line above what the simulator tells you. Hope this helps.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 01:58 AM.