Rockbox Development > Feature Ideas
FM layout
Chronon:
Plus, to reuse an existing .wps file you have to make decisions about how to treat the various tags that won't be supported in the FMPS/RPS. Tags that print text need to be treated as a LF while those that display images should be ignored entirely. This seems to get a bit tricky since conditional tags need to be treated differently depending on the content of the different conditions. From a novice programmer's standpoint, it seems simpler and cleaner to just define new tags to provide functionality that differs from the WPS.
Llorean:
The problem with different tags (and ostensibly a separate .wps file) is that you'll most likely then either need a complicated method for sharing images between them, or be storing many images twice.
FM really only has four applicable fields if I'm thinking clearly -
Frequency
Station name
RDS
Preset Number
Then you could do something like this: frequency could be "track title", "station" could be artist, "RDS" could be album, and "Preset number" could be playlist position, fairly easily. This is a bit 'dumb' but it means probably 98% of existing WPSes would effectively display for FM as is.
Otherwise you end up needing either a "radio" conditional for the WPS, so that one WPS can contain separate radio code (perhaps replacement viewports) or you need to come up with a way to 'share' as much as possible between two .wps (well a .wps and a .wrs) files so that memory use is kept down.
AlexP:
I don't see why it has to be that complicated to share images - you have at the moment mytheme.wps and a directory mytheme with all the images in. Why not just have in addition mytheme.wrs, and both the wps and the wrs can use the images in the mytheme directory? The only downside is that you would be duplicating some code between the two for e.g. volume and battery.
I would add mono/stereo to your list of tags, and also expand RDS - there are various fields within RDS that one may or may not wish to show.
Llorean:
That shares the image files, but you'd still end up having to keep track of them somehow. I can't imagine that the current method wastes space by remembering the filename once the WPS is tokenized and buffered, let alone if a different WPS is loaded, then they change back, etc. Separating them into two files means you need a fair bit of complexity to keep images from existing in memory twice.
JdGordon:
My preferred method is to have a radio conditional, but I dont fiddle with .wps' so thats probably not the preffered way for people that do.
I'm currently working on a patch which completely changes the way RAM is managed in the WPS which could potentially use no extra RAM if an image is shared between both wps type screens, but anyway, I dont think thats an issue... if the radio gets wps'ed then one way or another we will make images work.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version