FS#2725 - fm presets navigation on iRiver - and more!

Attached to Project: Rockbox
Opened by Tony Lenox (lenox) - Sunday, 23 October 2005, 13:28 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Friday, 18 November 2005, 18:31 GMT
Task Type Patches
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


SOURCE/BITRATE buttons on iRiver's remote are
assigned next/previous preset functions.
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Friday, 18 November 2005, 18:31 GMT
Reason for closing:  Accepted
Comment by Tony Lenox (lenox) - Thursday, 27 October 2005, 20:00 GMT

v3 - no longer via remote, but also using main unit. Radio
screen can be in two states (displayed on radio
screen): "Scan mode" when it behaves as it used to
and "Preset mode" when LEFT/RIGHT buttons are preset
navigation. Press and hold joystick to switch between modes.

Additional features:
- automatically detect if preset was played before and
entering Preset Mode on radio startup
- always show status bar on radio screen irrespectively of
global settings
Comment by Tony Lenox (lenox) - Friday, 28 October 2005, 20:43 GMT

v4 - forgot to migrate SOURCE/BITRATE remote buttons from
the the first versions into v3
Comment by Linus Nielsen Feltzing (linusnielsen) - Sunday, 30 October 2005, 08:56 GMT

I have taken a look at your patch, and it looks good. I have
a few comments:

1) Don't use TAB characters for indenting (see

2) What's the point with the status bar override?

3) Wouldn't it be better to use an enum or macros for the
radio mode?
Comment by Tony Lenox (lenox) - Sunday, 30 October 2005, 10:22 GMT

1) sure

2) At the moment code in radio.c already has constant offset
to write stuff on LCD, so space for displaying status bar is
already there - why not use it (its not like we have something
else to display there like on other screens). In the future when
there is more information to show it can be done conditionally
as for other screens, but now there is no reason not to
display it (there were requests about it in the forum).

3) yeah, I can define macros instead of using 0/1

I wanted to do overhaul of button assignments as well... (as
was discussed in the forum)
Comment by Tony Lenox (lenox) - Sunday, 30 October 2005, 11:21 GMT

v5 - implemented (1) and (3) of Linus' comments
Comment by Tony Lenox (lenox) - Sunday, 06 November 2005, 00:58 GMT

full radio patch including previous plus:
- remote support using new GUI API
- reassigned buttons for iRiver (including remote)
- pause fuctionality for radio
- play/pause in status bar for radio
- fixed bug when file playback didn't stop radio for iRiver
- general cleanup

- archos support for radio status bar (atm it doesn't compile)
- buttonbar using new GUI API (after initial commit)
- archos/ondio button assignments (after initial commit)

although not yet production quality (mostly archos support
needed to be done) - this needs to be looked at so that there
are no surprises when i start commiting stuff.
Comment by Tony Lenox (lenox) - Sunday, 06 November 2005, 16:26 GMT

Made it working with Archos and Ondio as it is now (tested
with simulators) - no new key assignments yet.
Comment by Tony Lenox (lenox) - Sunday, 13 November 2005, 14:33 GMT

new version
Comment by Linus Nielsen Feltzing (linusnielsen) - Sunday, 13 November 2005, 18:04 GMT

Added scan mode for Archos FM recorder.
Long press of ON toggles mode.
Added setting of ADC_GAIN.
Comment by Anonymous Submitter - Friday, 18 November 2005, 16:53 GMT

Can you please close this as it got committed.