Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  This wps line is not update: am I doing anything wrong?
« previous next »
  • Print
Pages: [1]

Author Topic: This wps line is not update: am I doing anything wrong?  (Read 8073 times)

DervishD

  • Guest
This wps line is not update: am I doing anything wrong?
« on: August 09, 2007, 03:52:06 PM »
Hi all :)

I'm using this line to display information about the next song:

%sNext song is %?It<'%It'|%?Fn<'%Fn'|loading...>>%?Ia< by '%Ia'|>

The problem is that the line doesn't update correctly. I mean, if I put a simple "%Ia %Fn %It' before my "problem" line, the information is shown correctly (first a blank line, but the correct info as soon the information is available) in that line but my "problem" line still shows "Next song is loading...".

I think that this may have to do with %s, which doesn't allow "dynamic" content, but I don't consider the next song info as dynamic (at least, I don't interpret it like being dynamic). Am I wrong?

If I am wrong: how can I show the full contents? Some ID3 tags can be pretty long, and without scrolling they cannot be read. I've thought about using ";", but I don't think this will work because I will have to use "%s" anyway and the %?Ia conditional...

BTW, I'm using an iAudio X5V with r14188-070805

Thanks a lot in advance :)
Raúl Núñez de Arenas Coronado
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: This wps line is not update: am I doing anything wrong?
« Reply #1 on: August 09, 2007, 04:06:42 PM »
Sorry, no scrolling for next file information, as it is considered dynamic. The reason is that the information isn't always available; it might not have been read yet. So when it is read, for the screen update to work properly, it is flagged as dynamic.
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: This wps line is not update: am I doing anything wrong?
« Reply #2 on: August 09, 2007, 04:58:05 PM »
I've had scrolling next album/song information for 2 or so years now; it's part of the Marquee WPS that comes as part of Rockbox.
Logged

DervishD

  • Guest
Re: This wps line is not update: am I doing anything wrong?
« Reply #3 on: August 09, 2007, 05:33:24 PM »
Quote from: Lear on August 09, 2007, 04:06:42 PM
Sorry, no scrolling for next file information, as it is considered dynamic. The reason is that the information isn't always available; it might not have been read yet. So when it is read, for the screen update to work properly, it is flagged as dynamic.
Quote from: Mikerman on August 09, 2007, 04:58:05 PM
I've had scrolling next album/song information for 2 or so years now; it's part of the Marquee WPS that comes as part of Rockbox.

This works as long as you use ";". That updates the lines, so the scroll works. I've tried, and it works, but then you have to reckon how much time do you give to each part of the ";" so the scroll can complete at least once. That's a mess.

Well, I can live without this...

Thanks a lot for the information!
Raúl
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: This wps line is not update: am I doing anything wrong?
« Reply #4 on: August 09, 2007, 06:56:48 PM »
Hmm, if that indeed is the limitation, I wonder if it would work just to have alternating lines that are the same; e.g. %s%t5%It;%s%t5%It.  (Or, for that matter, alternating lines where the second line is given no time, e.g. %s%t5%It;%s%t0%It.)

Oftentimes, more than 1 way to skin a cat with a WPS.
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: This wps line is not update: am I doing anything wrong?
« Reply #5 on: August 09, 2007, 07:00:35 PM »
Quote from: Lear on August 09, 2007, 04:06:42 PM
Sorry, no scrolling for next file information, as it is considered dynamic.
Yes it is dynamic and can cause problems with updating, but: I disagree with this absolute statement from my experience as a "user" because it usually works on the higher RAM targets I've seen so far.

I've got the following line in my M5-wps which works perfectly there (also tried on Ipod Mini and H10):
%s%?Fn<%?It<%It|%Fn>|%?pn<%pn|dynamic> playlist>
And for example the iCatcher.wps that is in SVN uses next song info on a scrolling line too - and I haven't noticed any problems on M5.*

It wouldn't work reliably without forcing updates with sublines (or removing "%s") on my Ondio though (an Archos target with low RAM) where the next track info is usually only available within 1...1.5 minutes before the end of the currently playing track and obviously dynamic (that's why there is this workaround with duplicated sublines in the Archos-iCatcher for example - which causes the line to start scrolling again when subline changes, but I've found changes of "all 5 or 6" seconds are often almost not noticable, or at least not disturbing).

*) Recently I found a weird dependency while trying to display a graphic in this place when next song info is not present though.

Edit: @Mikerman: I tried both of your ideas - duplicating sublines worked, a %t0 subline didn't.
« Last Edit: August 09, 2007, 08:05:37 PM by pixelma »
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: This wps line is not update: am I doing anything wrong?
« Reply #6 on: August 09, 2007, 09:51:38 PM »
Thanks--very interesting and humorous to hear.  At times, I find the writing of a WPS to be like trying to solve the NYTimes crossword puzzle ...

 ;)
Logged

DervishD

  • Guest
Re: This wps line is not update: am I doing anything wrong?
« Reply #7 on: August 10, 2007, 03:43:53 AM »
Quote from: Mikerman on August 09, 2007, 06:56:48 PM
Hmm, if that indeed is the limitation, I wonder if it would work just to have alternating lines that are the same; e.g. %s%t5%It;%s%t5%It.  (Or, for that matter, alternating lines where the second line is given no time, e.g. %s%t5%It;%s%t0%It.)

Oftentimes, more than 1 way to skin a cat with a WPS.

I've tried that, and the problem is that the scroll resets. I mean, everytime the line is "switched" the scroll starts from the beginning, and in long lines this is a problem (you won't be able to read it). A partial solution is to use a high value in %t, but then you have to be careful: a value small enough so you don't have to wait ages for the line to update once the information is available, a value big enough so you can scroll the line at least once in that period of time.

Tricky, at best ;)

Anyway, it's an interesting (and inspiring) solution. Thanks a lot!

Raúl Núñez de Arenas Coronado.
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: This wps line is not update: am I doing anything wrong?
« Reply #8 on: August 10, 2007, 11:10:01 AM »
Thanks for pointing the dynamic information/scrolling issue out.  I had never faced it before, because I always had alternating lines.  An interesting issue.
Logged

Offline NicolasP

  • Developer
  • Member
  • *
  • Posts: 195
Re: This wps line is not update: am I doing anything wrong?
« Reply #9 on: August 11, 2007, 12:08:41 PM »
Yes, it's a tricky issue. I didn't manage to find an elegant way around it, and it's mostly a (quite understandable) limitation of the scrolling code: you can't change the contents of a scrolling line without resetting its position.

I filed a bug report for it (FS#7006), but I don't really expect it to be solved any time soon...

pixelma: the %t0 subline doesn't force an update because it's never actually displayed.
Logged

DervishD

  • Guest
Re: This wps line is not update: am I doing anything wrong?
« Reply #10 on: August 12, 2007, 07:11:32 AM »
Quote from: NicolasP on August 11, 2007, 12:08:41 PM
Yes, it's a tricky issue. I didn't manage to find an elegant way around it, and it's mostly a (quite understandable) limitation of the scrolling code: you can't change the contents of a scrolling line without resetting its position.
Which, by itself, is not a problem. IMHO, it's better to update the scrolling line and reset the position (hence, the scroll) than not being able to see the information.

I'll take a look at your bug report.

Thanks!
Raúl
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  This wps line is not update: am I doing anything wrong?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.086 seconds with 15 queries.