Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#4802 : WPS Extensions & Fixes.



FS#4802 - WPS Extensions & Fixes.

Attached to Project: Rockbox
Opened by gl (gl.tter) - Wednesday, 08 March 2006, 11:23 GMT
Task Type Patches
Category Themes
Status Closed
Assigned To No-one
Operating System All players
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


NOTE: Patch against today's CVS. All changes can be demoed easily by applying the patch and
using the attached WPS (use _gl.tter_ext' theme) - or just download my all-inclusive
precompiled H120/140 firmware:

WPS extensions:

- Designers can now use arbitrary battery & volume segment bitmaps. The code counts the maximum number of enums a WPS uses in those conditionals, and works off that (fully backwards compatible with existing WPS'). Counting mechanism is generic and can easily be applied to future tags (no other current tags are suitable).

- optional Progress Bar y coordinate for bitmap displays - decouples progress bars from lines and allows arbitrary height positioning (fully backwards compatible).

usage: %pb|height|leftpos|rightpos|[y coord|]

- new tags:
%fk - file frequency in kHz (saves space & is easier to scan).
%gi - inverted text ('g' = 'graphics effects')

- Experimental: implemented WPS backdrops on iRiver H1x0's. Seems to work fine, except text and images currently block out the background. Already useful, will most likely extend.
(note, backdrop is not cleared when a new WPS is loaded, this is an existing bug that this patch aims to address - not yet included in my patch).


- adjusted volume level conditional so that the first and last enum are only hit on exactly the first and last volume value - this is desirable and required to display 'mute/max' type bitmaps correctly.

- battery conditional now works correctly, eg. when using 5 bitmaps (off + 4 segments), each segment now correctly identifies 25% of battery usage / charging.

(previously this was completely wrong, eg. the 1st segment disappeared at 80%, and all segments were already extinguished at 19%, which is not only nuts but will vary wildly across battery capacities!)

Also the first ('all empty') enum/bitmap is now triggered when the 'danger level' is reached, which is calculated from the estimated remaining battery time (currently set at 15mins). This is far more accurate and should work consistently across all devices / OEM or replacement batteries.

To demo the battery changes more easily, uncomment '#define DEBUG_BATTERY_ENUMS' in 'gwps_common.c' - this will simulate fast battery charging / draining, based on whether the charger is connected or not - note the danger level is simulated by <10%. (my precompiled H120/140 firmware already has this enabled).


- bitmap-only sublines fixed (sublines were disabled when only bitmaps ocurred in them, so only the first bitmap was ever shown).

Everything seems to work well.
This task depends upon

Closed by  Nicolas Pennequin (nicolas_p)
Saturday, 13 January 2007, 02:31 GMT
Reason for closing:  Rejected
Additional comments about closing:  The author refused to give his real name and the patches are now out of date.
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 08 March 2006, 11:39 GMT
Please don't bundle all these changes into one patch. That makes it very hard for me to apply the enum fix alone.
Comment by gl (gl.tter) - Wednesday, 08 March 2006, 11:43 GMT
Some of the changes are interelated, and it makes sense to demo them together (try the WPS).

I'll seperate the enums & level adjustments out from the rest. However except for the H1x0 backdrops, everything seems solid.
Comment by needleboy (needleboy) - Wednesday, 08 March 2006, 11:48 GMT
I'll give it a test run on the H300 Experimental build tomorrow.
You should have reports from all the users in a couple of days.
Comment by gl (gl.tter) - Wednesday, 08 March 2006, 11:53 GMT
Great. Note there seems to be a bug in the %X tag, where if the target doesn't support the backdrop (because it's the wrong dimensions etc), it writes part of the tag into the line and ruins the demo WPS' layout. I'll look into a fix, but if that happens just remove it.
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 08 March 2006, 11:55 GMT
I can imagine that demoing it together might be nice, but some changes might not be wanted in CVS at all. Besides, we'd rather commit one feature at a time, to make it easier for us to keep track of the CVS changes.
Comment by gl (gl.tter) - Wednesday, 08 March 2006, 12:01 GMT
Comment by gl (gl.tter) - Wednesday, 08 March 2006, 12:22 GMT
Enum (ie. Battery and Volume level) related changes only:
Comment by gl (gl.tter) - Wednesday, 08 March 2006, 13:22 GMT
The theme didn't use the font correctly, fixed one attached (or just select 'rockbox_default' font).
Comment by needleboy (needleboy) - Sunday, 12 March 2006, 08:25 GMT
Gives a few errors when patching against latest cvs.
Comment by needleboy (needleboy) - Sunday, 12 March 2006, 13:34 GMT
The errors are only when patching together with Paprica's Scrolling Margins patch. Any chance of this collision being solved?
Comment by gl (gl.tter) - Monday, 13 March 2006, 09:01 GMT
No, just as Linus was about to commit my patch, he then refused it as the project leads won't accept contributions from pseudonyms. There was a lot of debate on the dev list if you want the details, although the leads didn't even participate beyond 'take it or leave it' comments. So I'm withdrawing my patches (and future improvements) indefinitely - if somebody wants to use them, they'll have to rewrite them.
Comment by gl (gl.tter) - Saturday, 01 April 2006, 12:51 GMT
Check out why I originally added all this (and now much more) here: