Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by Rincewind - 2006-06-16
Last edited by Llorean - 2008-03-25

FS#5555 - Record Button Configuration

With this patch you can configure some actions for a short press of the record button, a long press and a press of Play + Rec.
Works only with iRiver H1xx and H3xx series and on the Sansa e200 series at the moment (due to lack of buttons on other targets).

A Menu entry is added under General Settings → System ⇒ Button Config
Button definitions are added to WPS Screen and File Browser Screen.

These actions are available for Rec Short, Rec Long and Play + Rec:
* None
* View the current playlist (default short)
* View the Plugin Dir
* View the Themes Dir
* Recording Screen (default long)
* Go to Recording Screen and start recording instantly
* Go to the FM Radio
* Insert current track in playlist (only available in the file browser)
* Insert next (only file browser)

You have to get the patch file from the last of my comments.

*UPDATED* March 03, 2008

Closed by  Llorean
2008-03-25 17:27
Reason for closing:  Rejected
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

As it's obvious this patch isn't working toward inclusion.

The patch also changes the behavior of the NAVI button on the H3x0 which is undesirable IMO..

hm, it really shouldn’t. I try to find the bug and fix it.

paulheu, could you please tell what happens exactly?
Right now I can’t see how the NAVI button could be affected by my patch at all.

I do my own build, available on http://www.misticriver.net/showthread.php?t=38915&page=4

Somehow when I add your patch the NAVI button acts weird, a short press won’t do anything while it should go into ‘browse while playing’.

A long press acts as it should. It’s most likely a conflict with another patch I use although have no idea which at this point..

could you send me your gwps.c and gwps.h at my E-Mail: rockbox@almost-blue.de
I have a look at it. My suspicion is, that a hunk is applied in the wrong position, because the code in gwps.c is pretty repetitive anyway.

I’m not experiencing any problems with the NAVI button as paulheu does, I just want to report a little glitch. Status bar (when it is enabled of course) doesn’t show up instantly when it goes to the current playlist. You can see part of the WPS in the area where status bar should be. After a while, usually (not always), after pressing a button the status bar appears as it should.

Genre9mp3: I try to fix this (what was this status bar thing anyway? ;-) ). But it could be a bit tricky. Current playlist thinks it is entered with the help of a menu so it doesn’t update the status bar.

FYI, the issue of paulheu had to do with some other patches he made. It doesn’t happen when patching against a clean CVS.

Would anyone want to make a patch similar to this that would make use of the rec button while in the file brower. I’d love to have the rec button be used as queue. IMHO the several button pushes it requires to queue a file is alot. I’ve got very limited experience with programming so unfortionatly i can’t start a patch of my own.

Fixed the statusbar glitch on request from Genre9mp3.

thanks xaviergr, last night I figured out how to do it myself but was to lazy to upload it… @John Rhine: I think I’ve seen a similiar patch which could work for you mentioned some time ago in the forums. Or you can use party mode. I had no experience programming in C a month ago, it really isn’t that hard. It just requieres some time reading the existing code over and over trying to understand what some functions are supposed to do. It helps to examine what other patches do. I did my patch by copy and pasting some code that was already there and changing some variables and function calls.
By the way, the right thing to do if you don’t want to do it yourself is filing a feature request. That way it gets more attention than a comment on an existing patch.

I guess I’ll search for that patch and see if i can’t teach myself some C while updating it. Either that or I can wait til next semester when I’m taking my second programming class at school, it will be in C. My intro class was in java and we only got to some simple recusion stuff.

I made a huge extension to this patch!
New feature:
- the actions of rec_long and rec_short can be customized with a menu option (general settings → system → button config)
- possible actions: none, current playlist, view plugin dir, view theme dir
the fix from xaviergr is included.

Install: Unzip, Apply the patch, and copy ‘rec_button.c’ and ‘rec_button.h’ in /apps/

Next thing on my Todo-List: a second quick menu as an option (with sound settings), make the button work in the file browser as well.

If someone with mod access to flyspray reads this: I can’t edit my own tasks, could someone please change the task itself, and edit the text and the files of this comment as an update notice? Would be nice if I could do it myself…

the above version doesn’t work because of a typo (*argghh*)

Use this one:

Hi!
I had to add
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#include “recording.h” #include “rec_button.h” #endif
to the gui/gwps.c file to make it compile without problems. Does it make sense?
Ciao
Norb

AH, and yes, there is another problem: in apps/settings_menu.c you reference LANG_BT_SECOND_THEMES which does not exists, you have to change it to LANG_BT_THEMES! I will upload a fixed patch soon.

Ok, here is a fixed patch which includes also the two files in the patch, so no zip needed.

Maybe I had uploaded the wrong file again, because everything you added is in my current build, too. It is possible that I did my fixes to make it work again and forgot to update the patch file. Making the patch was really difficult, because I was developing with a source where othere patches were added before, so I had to apply the changes by hand to a different source tree and diff from there…

thank you for including the two files inside the patch, I don’t know how to do this (I use ediff in emacs to do my patches).

How to include the full files: easy, touch the files rec_button.c.orig and you have empty ones. Then ediff should include also ediff the files.

iPood commented on 2006-06-22 19:43

Nice updated patch! However there is still a glitch when you press the record button from the WPS. The status bar (when enabled) now shows before the rest of the menu and appears in the WPS. There is also quite a long pause before the menu is shown.

@norbusan: I don’t have .orig files. Are they created automatically by your editor? I think I understand what you mean: I use two source trees, one modified and one clean cvs and diff against directories. So I have to make an empty rec_button.c in my clean cvs source and it gets “filled” by the patch. If you know an easier way to do my diffs in emacs, could you send me a mail? (rockbox@almost-blue.de)

@iPood: Do you have dircache enabled? I just checked with my H120, it is almost instant for me (the only thing that takes a little bit longer is the recording screen because it spins up the disc).
The statusbar is before the rest of the menu because i call the statusbar update befor I call the menu function. Otherwise I would have to modify the code for quite a few functions directly, which then is a modification which affects more parts of rockbox, not only my own code. I don’t know if it is clear what I try to say…
If this really is an annoying issue I try to fix it, but it seems rather cosmetical to me.

Hi Simon!
(BTW Rincewind is great, I have completely forgotten the books and the series of games, nice that you reminded me!)
Concerning the diff: Yes, create a empty file in the clean CVS dir, OR even better, call diff with -N which means that absent files are treated as empty. Probably you can adjust the setting of emacs diff ediff to do the same, ad a cmd line or so.
You can also do the same by diff -urN cleandir patcheddir and get a decent with everything included.
Best wishes
Norbert

iPood commented on 2006-06-22 21:49

@Rincewind: Enabling dircache solved the laginess, thanks :)

Update:
- option “recording screen” added to rec_short and rec_long
- option “start recording instantly” added to rec + play. It works for me, but I only tested it briefly. I don’t know if it is compatible to recording enhancement pack.
- now the keys work in file browser too!

I have found some problems with the new patch:

1. There is a problem exiting the “Recording-screen” and “Plugins” when you open either with a long-press. If assigned to “Recording-screen” you need to exit it “twice” in order to return to the file-tree. If assigned to “Plugins” you will get stuck there, and the unit needs resetting to get the file-tree working properly again. I have not tested the Themes page.
2. If long-press is set to “None”, pressing it in the WPS is the equivalent of pressing NAVI – you’ll see the file-tree.

Other than that, short-pressing to get the playlist works fine and does not interfere with the status-bar. :)

Thanks for the patch, keep up the good work,
/Brown

I have to do some more testing. Does your problem Nr.1 only happen when calling from file tree or from wps too?
Nr2. is a stupid mistake by me, I forgot to put the code which I used on short press on long press too…

I will upload a fix soon.

quick fix:
- long press set to “none” should work as expected now
- you don’t have to exit recording screen twice anymore

setting plugins to rec long works fine for me, maybe my fix fixed that too, or the problem is more difficult…

iPood commented on 2006-06-24 02:12

I’m having preblems with using the long press from the wps and file tree. You get stuck in the assigned screen and pressing < continuously to try and exit causes the player to freeze requiring a reset. Long press worked fine with the previous version.

iPood commented on 2006-06-24 02:31

Did more testing. It only gets stuck if the long press is assigned to either themes or plugins. Trying to get out of the screen by pressing various buttons causes the player to freeze.

Any chance of adding the capabilities of this patch to the radio screen (on those platforms that support FM - esp H300 :))?

I would like the option to record radio at least as instantly as the OF.

@david lee: do you have other patches applied as well? I have no problems exiting the themes or plugins from long press or short press. (the same code is used for both events, so normally they can’t behave differently). It is really strange, that you have problems with the current version and Mr. Brownstone has problems with the previous version. I can’t think of a way to adress this problem, since I don’t have it. Are you shure that the patch was applied properly? (maybe the patch tool got some line numbers wrong, this can happen if other patches are applied to the files that get patched).

@phil jones: I don’t know how rockbox selects the radio as a source. If I have time and nothing else to do I look into it.

another possibility why you experience errors: I changed the settings to incorporate more options, but i didn’t increase the settings version counter. If you upgrade the patch you have to reset settings at boot (Edit: hold down REC just after bootloader).

iPood commented on 2006-06-25 16:09

Clearing settings on boot didn’t solve the problem. I am using Kosh’s experimental build which contains various other patches so there is a possiblilty there’s a conflict with your patch. I’ll make sure it works with an official build next time before placing a bug report ;)

Many thanks, keep up the good work!

iPood commented on 2006-06-25 16:11

Clearing settings on boot didn’t solve the problem. I am using Kosh’s experimental build which contains various other patches so there is a possiblilty there’s a conflict with your patch. I’ll make sure it works with an official build next time before posting a problem here ;)

Many thanks, keep up the good work!

simon menzel: the recording screen can use the line in as the FM source, if entered while the radio is selected

Concerning the difference between long and short presses; I noticed this behaviour i the buils I do as well, it really weird. on long presses you get stuck in either the plugin or themes folder, you can scroll up and down, but cannot get out of the screen.. I have no idea what is causing this and I guess it would mean doing a new build, adding each patch and trying to see which causes the problem.. Maybe I’ll get around to it later this week, but from what I can see it’s no issue with your patch..

I just did a clean CVS build with only the re button patch and the bug is there as well.. So clean CVS tree and only rec_button_new patch will freeze when long press goes to either themes or plugins..

This one shoold fix the freezings, if not, I have no idea how to fix it…

Edit: File removed, this “fix” was worse

Still freezes, also I am now getting stack overflow panic from the player..

damn!
I removed the last file, It was obviously the wrong thing.

Update:
- (hopefully) fixes the freezes for themes and plugins on Rec_long
- Added a sound quickmenu (with options Equalizer on/off, Crossfeed on/off, Channel Setup (mono, stereo…))
The Settings in the sound quickmenu are not applied instantly, they only take effect if the quickscreen is exited

I was trying to put the record button for the radio screen in, too. But this is more difficult than I expected, perhaps I get round to do it next week.

It my be a good idea to clear settings once at boot if applying this patch to a build which had this patch before.

Project Manager

If you want your code to be merged into CVS one of those days, I suggest that you don’t put all functionality into one patch, but instead keep the features as separate patches.

I haven’t thought at all that there is a possibility that my patch gets included!!

I think it is reasonable to put the sound quickmenu in seperate patch, but the other functionality that is there already has to go together, since it depends on a configurable button.I try to make the radio recording thing seperate when it is done.

Right now I want to wait with the seperationg until the feature freeze is over, so that users have everything in one place and it easier for me too.
Hopefully the freeze is over soon. I had a short look at the open critical bugs, but they are too dificult for me, so I can’t help now.

Project Manager

Eh, if you don’t want your patch included in Rockbox, why are you submitting it to the patch tracker in the first place?

of course I want it to be included, I just thought that my patch would be considered as option bloat, since it adds a bunch of options to menu and only works for irivers. If there are some things I have to do better to get my patch included after the freeze, feel free to tell me, I am willing to try hard to make it right.

Update to current CVS (11. July). No other changes.

I hear what ‘Rhino369’ is saying. I would LOVE to see a queue option for the patch….one button queueing would be amazing! Maybe an option for either ‘insert last’ or ‘queue last’. I couldnt tell how awesome that would be…..

jungmin: that would have to be a seperate patch, because my patch is designed in a way that the actions are the same in file viewer and wps. Queueing would be of no use in the wps. So I would have to double the options and for me it won’t be intuitive anymore If I have to think in which screen I am when I want to press REC. If someone else wants to change my patch in this way, feel free to do it and make a seperate task of it.
You can use the party mode, though. Maybe extend it so that it supports options for which insert action is taken. There is a chance I do this at some time when I have more time to sit at the PC again. Then I might add an option for “turn party mode on/off” to this patch.

Linus: now that the freeze is lifted, are there chances for my patch (or parts of it)? If only some of the functionality should make it in cvs, please tell me and I put a seperate patch up.

if ( page == browser ) enqueue(track); else do_something_in_wps();

:p

lenny commented on 2006-08-11 14:01

what do you think about adding the ability to toggle tagcache/directory view as in flyspray 5752?

It is a nice idea, but I want to have the same functionality of the record button in wps and in dir browser, otherwise it would double the entries in the config menu and the code would get more complex because some actions would only work in file browser, some only in wps and some in both. If you want to try to merge these two patches and create one yourself, do it! But for me this would be much work for a feature I wouldn’t use regularily, because I have my favorite actions for record button already.

*UPDATE*

* Works with current CVS * Uses the new Button Action system
* Code is cleaner now
* removed 2nd quickscreen
* all options are available for Play + Rec
* I added and used ACTION_WPS_USER[123] to action.h. With this it should be easy to use this patch with other targets that have a button combo that is currently not used.

The patch is tested by me on my H120 and should work on H3x0 too, but I think it would break other builds right now. If it gets decided that this patch should be included in CVS it is no problem to add a few #ifdef to it.

Please test if all the functionality is still there and if there are bugs, I rewrote most of the code.

useraction.c is not in the patch

sorry :-(

now it is:

update to current cvs.

sync to cvs.

thank you for this greatful patch… and i would like to some suggestion.
as yo know, favorites plugin was deleted now… but i think playlist catalogue has too many button presses.
so could you consider add “add to specific(?) playlist…” to the option list? then we can manage our favorite list with “only one” button!
have a nice day… and sorry for my poor english.^^

This just happened recently…

In the Button Config menu, I have “Action on long press REC” set to enter the Recording Screen, and I noticed that the Source menu has disappeared whenever I enter the Recording Screen through the Button Config shortcut. I have tried to enter the Recording Screen through all the other Button Config options and the Source menu is still missing.

The Source menu does appear when I go to the Recording Settings menu and when I enter the Recording Screen from the A-B menu screen then going into the recording options menu.

bilko commented on 2006-12-04 07:55

I heartily aggree with Cho.H.M. rec Button is a really useful patch and also regret the passing of the Favourites plugin. I use my player most when I am driving, and I renamed “favourites” to “1favourites” so that it appeared at the top of the plugins list. Then I could use a short press of record and a click on the Navi button to add any song to the favourites list without taking my eyes off the road. This was used to mark any track, either for deletion if it was faulty, or for further listening. Please consider adding the “add to specific playlist” function that Cho suggests.

Thanks

Norman: I look into it. I haven’t used my patch recently myself, because I was too lazy to set up the whole dev environment again after a fresh system install. I hope to find time before christmas.

Steve and Cho.H.M: If it is easy to do, I add it and make a special version, because I don’t think that this is a common feature, so I won’t add it to my “official” patch.

If Jonathan Gordon applies his Settings rework, then a “favorite menu entries” menu is possible (and he programmed it already, but had to take it out again) so then this will result in a cleaner way to accomplish your request.

I love this patch! I usually use my playlist to find my songs (rather than go through all the directories) so just clicking one button to bring it up has been a great help. The 10/27 patch will only work with source no later than 11/7 though. Thanks!

bilko commented on 2006-12-11 11:12

Would there be any chance of bringing the patch up to date so it will work with more recent versions of the source? Or am I talking rubbish?

It is possible and it isn’t much work but I haven’t had time to set up my build environment again because I have to do a lot for my study at the moment.
Watch this patch, there will be at least an update to cvs soon, I promise.

Here is an update to current cvs. No new features.
Norman Rivera: please report if you still get the same bug, I can’t reproduce it (or I haven’t understand it right, I don’t use recording much).

It’s working fine now.. thanks!

This patch is great.
But it would be really handy if you could press the button again to return to your original spot. So if a short press of Rec enters the playlist, then another short press would take you back to the WPS or File Menu (depending on where you were). And if a long press brought you to the recording screen, another long press would take you back to the WPS.

Is this possible?

Apologies if it’s been implemented, I’ve been using a build from Aug.

This would not be possible to implement for all actions, because on recording screen for instance, the rec button has a special purpose. And it is not easy to do anyway, because if a different screen is displayed then there is a different button handler routine responsible, so I would have to program my code in every screen that can be called from the record button.

If you exit the screen you entered the normal way, you already get back to the place where you started, so I don’t really see the need for this. The only exception is recording screen, because if you enter this screen then playback is stopped, so it is not possible to return to wps.

Suggestion…

1. How about more key combination? Play + A-B ; Play + NAVI … 2. Can you add “WPS Context Menu → Playlist Catalogue → Add to Playlist” action to the option list?

 Or something quick playlist adding method anything else...?

3. How about “Sleep Timer”?

Thanks for this great patch… Sorry for my poor English…

Cho.H.M:
1. Play +AB is already taken and the general problem here is, if I put more button combinations in my patch then it becomes even less likely to get commited.
2. I’m planning to do this (or something similar) already. I just need some time to do it.
3. I don’t think that sleep timer should be on a button. However, I made a small patch for myself that puts sleeptimer in the root of the main menu, because I don’t like it in System, either. It is together with some more menu tweaks, that’s why I havn’t uploaded it to Flyspray. If you are interested, write me at “rockbox * almost-blue * de”.

Very quick reply…^^

1. Yes, I agree. My thought was short. Sorry~
2. Great! I’m waiting.
3. I’m interested. But I rarely do patches to make my own build. I’m lazy man…

 Even if i get that patch from you, I think i won't be helpful to you... Then, what is "rockbox * almost-blue * de"? E-mail?

Thanks for everything.

Update!
Only to current svn at the momement (thanks to the REP). No new features, soon more to come.

The root menu commit broke my patch badly, so here is a new update.
Now it is possible to use the PLAY and MENU buttons in the Theme and Plugin browser to exit to wps and menu. LEFT to exit works as well.

New Version with new features!

it is now possible to have different actions in WPS and file browser. In file browser, there is a new action “Insert” which inserts the current selected track/directory/playlist in the current playlist (same function as from the context menu → playlist → Insert).

Please test if you are experiencing any bugs, it was a rather large change in the code.

It is possible to include different insert/queue options in the future, if that is wanted, but I don’t want to add all of them, because there are so many.
There is a splash message “insert…“, I don’t know if this is a good idea or not, please tell me your opinion.

Next Update

now with the two insert options “Insert” and “Insert next”. I think they are the most common ones.
after inserting the cursor moves to the next item in file browser.
I removed the splash message, the change of the selection cursor is a better visual feedback that something happened.
And I made the language strings shorter.

update to current svn and fixing of a bad #ifdef.

Hey does anyone have a compiled build for the H300 that includes this patch? I can’t get any builds to compile, and I’m too lazy to figure it out. If anyone would be nice enough to post one I’d appreciate it very much. If not I’ll have to wait until the weekend when I have time to figure out what I’m doing wrong. Thanks in advance.

Mmmm’s Recording Enhancement Pack has this patch included.
Look here: http://forums.rockbox.org/index.php?topic=2513.0

Could this patch be adapted to the x5 as well? It also has both play and record buttons.

If the x5 allows button combos and there are unused combos that could be used, then it is possible to adapt the patch for the x5.
You just have to apply the changes I did to the iriver keymap file to the x5 keymap file. Then you have to change a few #if in my patch code so that they look like this:
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)

Here is a new update to current svn, btw:

Update tu current svn.

mlind commented on 2007-06-07 07:19

What stops the patch from being committed? The DevCon seems to approve… http://www.rockbox.org/twiki/bin/view/Main/DevCon2007#H1xx_REC_button

Fed commented on 2007-06-16 23:50

Can I use this patch for sansa?

Make it work on the e200 (Sansa) target. In order to compile it I needed to comment out:

#include “main_menu.h”

in user_actioms.c (line 26), since there is no such header in my tree.

Charles

thanks for the update, cpchan!
I removed your //-style comment completely, to make it compliant with the coding standards. No functional change.

amar commented on 2007-08-02 13:34

Jonathan Gordon just commited:Finally use the rec button to get to the rec screen on sansa and iriver hxxx. hold rec to get there… short press still is unused

http://build.rockbox.org/cvsmod/chlog-20070802T121404Z.html

will probably require re-syncing

this means my patch will never make it officially :(

I’m still going to maintain it and post updates to it, because I use it every day.

Anonymous Submitter commented on 2007-09-15 18:30

It doesn’t compile here on a plain SVN

LD rockbox.elf
/home/diablo/rockbox3/build/apps/user_action.o: In function `user_action’:
user_action.c:(.text+0x2d8): undefined reference to `action_signalscreenchange’ /home/diablo/rockbox3/build/apps/gui/gwps.o: In function `gui_wps_show’:
gwps.c:(.text+0xbd8): undefined reference to `action_signalscreenchange’ collect2: ld returned 1 exit status
make[1]: * [/home/diablo/rockbox3/build/apps/rockbox.elf] Error 1
make:
* [build] Fehler 2

Anyone knows how to fix that?

If you want to do it yourself, you can remove each line with ‘action_signalscreenchange()’. If I remember right, you have to remove a definition in the keymap, too.
Or you can wait a few more days, I made a new patch, I just didn’t want to upload it without testing it on target first (only tried the sim yet)

Anonymous Submitter commented on 2007-09-15 21:41

Hmm, I just now very little about C programming, nothing more than basic syncing, but I will have a look. Thanks.

Anonymous Submitter commented on 2007-09-15 23:28

Hmm, it wasn’t that hard at all. I changed what you said, and got it to work. Thanks.

Jonathan Gordon just commited:Finally use the rec button to get to the rec screen on sansa and iriver hxxx. hold rec to get >there… short press still is
>unused

Yes still compiles but your long rec button action doesn’t work any more.
You will need to update it.
Sorry don’t have much time to work on this today.
Also it would be nice if you can press one of the buttons to get to the radio. So could you add this? I will update a resynced version soon.

Resynced to r15033.
Again a long press of rec doesn’t work but everything else is fine.
I am not 100% sure about the visual side of things if they are ok (I am blind) but with voice it is working great.

All that was needed to be done was:
-Remove an action that was never declared.
-Update the h300 keymap file.

H300 users probably weren’t able to use this patch (there were errors in the keymap file) but now you can! (Tested on h300)

Here it is…

O yeah update your first description.
Where it says:
*UPDATED* June 22, 2007
Because I just updated it.

Daniel Dalton:
Thank you for your work!
I started resyncing the patch a few weeks ago but didn’t finish it completely because I have exams at the moment.
I think I solved the long rec issue, too.
If I find the time tomorrow, I try to add the radio, this shouldn’t be very difficult.
It is nice that voice is working with my patch out of the box, I haven’t tested it at all.

It wasn’t actually too hard to resync.

Yes I guess you just need to remove his button_rec from the keymap file or remove his actions from everywhere.
What about this working in all of rockbox? Like JdGordon’s rec button commit?

We just need to add the case statement to all the different screens.
Comments?

The radio would be nice because I use it a lot.
There are a couple of other things that I will try and implement into this patch as well. like:
-Quick way to hear the time (rec button setting)
-Maybe a quick menu with used menu options a lot. (as a rec button setting)
-Quick way to access the file browser (probably not needed)

Anyway once I finish the patch I am working on I will implement this stuff.
I think to access the radio it requires a call to the function
radio_screen ()

Which from memory is in radio.h
But I got warnings last time I tried with another patch I have here. Anyway I guess I could try again. :-) I am sure it wouldn’t be too hard like you said.

Finally did I resync it right?
THX

Finally a new version!!

- resync with r15044
- add FM Radio

Daniel: I had to use GO_TO_FM to call the radio. To make my patch work in the menus, something like my code in gwps.c has to be copied to the menu button handler loop. I think I would use the same options in the menu and the wps, otherwise the config gets really bloated. About your other ideas: I like the menu idea. At some point a while ago I had a programmed a second quickmenu, but I don’t like the current quickmenu style, that’s why I removed it. You can find it in an earlier comment here, but don’t expect that it still works. A standard menu would be nice. The time is not very useful for me and the file browser is accessible with one button press already. I don’t mind if you do these yourself.

more updates to this patch from my side have to wait until late Oktober.

Yes I actually did get warnings with radio_screen () so that is good that you used the right function.

Did it need resyncing?
Also don’t worry about the menu thing. I don’t find the current quick screen to useful so I will just replace it with my new one. (I will have a setting of course)

I am not exactly sure what I will do. I was thinking remove all the rec button settings and you can configure a long press of rec short press of rec and rec +play. Then it will do the same thing from anywhere in rockbox.

This would just require editing all the menu button code and other button code like the radio for example. So might take some time. Otherwise if we have different settings for each screen it will get to confusing.

I might implement a few things like quick way to spell something (voice) and maybe a quick way to get to the file browser.
I guess these aren’t really needed so I will just get it to work in the other screens in rockbox like the menus.

I am currently studying my programming book so maybe late november I could post an update. As you can probably tell my patches are very basic and I have a lot to learn. :-)

BTW why don’t you diff against svn?

svn diff >patchfile from the root of your source tree.

I don’t diff against svn anymore, because I use a local git repository now that pulls from svn through git.(my command is ‘git diff rec-button:master > file’ That’s why my new patches are in the git format. Applying the patch should work the same way.
There are a few things (i.e. making it work in menu and radio screens) that I didn’t do because I don’t need them myself. The best way to include your voice specific ideas and other specialities like those would probably be a seperate patch that goes on top of my patch.

Ok another idea:
-Add a keymap for ab +stop and play +ab. (Is this even possible?)
-Add a setting for making the voice shut up (using shutup ())
-Make the buttons work in any screen in rockbox (Not including plugins of course) probably just requires editing each button file responsible for that screen.

Suggestions? Comments?

About the shutup function been called. We would just have this as a setting for a button like long rec. So you could make any keypress activate this function.

Allright guys, I love this patch, and this is why I made a small upgrade.

Going to plugins is working again (wasn’t working, since the plugins were seperated into folders).

And, you can assign plugin/games, plugin/apps and plugin/demos the the keys now (plugin/viewers isn’t needed imo).
I hope it’s not too bad that I diff’d it against svn ;)

Great patch, I’d like to see this committed so much.

Don’t comment stuff out… You commented out the old keymaps…

What?

I believe you commented out code in your patch above somewhere.
Line 599 on your diff for example.
There are more cases of it.
That is bad coding… And it won’t be accepted into svn.

Do you mean that: “+ /* { ACTION_WPS_REC, BUTTON_REC|BUTTON_REPEAT, BUTTON_NONE }, */ " ??

That wasn’t me. My version is based on Rincewinds last version. You find this out commented code there too. Look at line 90 and further in rec_button_1009.patch.

I didn’t change much, so I didn’t see those comments. If I saw them I’d removed them.

yes, that comment is mine. I didn’t remove the line because this way I can remember how it used to be. And it tells people looking at the source that something is missing/different there.
This patch won’t get commited in the current form, anyway :(

FiDO commented on 2008-01-09 12:22

I would also like to have a possibility to queue a file in one click instead of inserting it on the playlist. I’m quite addicted to queueing mechanism, that’s why I never gave up with Winamp.
If there will be no other choice then I will write the patch itself :). I program for a living and from what I’ve seen in the code it should be relatively easy. Just need to get familiar with the compiling at all and refresh my C skills ;).

I leave it up to you to implement this, because then we can have you as a new rockbox developer ;-) As you pointed out, it should be easy (look at my changes to onplay.c). If I feel that your implementation is ok then I will include it when I do my next update to the patch.

FiDO commented on 2008-01-09 15:50

Ok, good encouragement is ever bad ;)

I don’t know when I will have time to do this. I just bought my RB-compatible player 5 days ago.. I installed RB on the second day to be able to compare with original firmware and now I shall write patches for it? God damn… isn’t that too fast? :) But the need for fast queuing is strong and I cannot resist infinitely.
Too bad I cannot code it when I’m at work… :P

FiDO commented on 2008-01-10 22:44

Couldn’t resist any longer… ;) Seems to work, but I just did a few simple tests. Please check it out.

I also did resync with r16048.

PS. ever=never in the post above ;]

would it be hard to adapt this patch to address  FS#2004 ? (to add the insert to playlist quick button as right on targets where the central / select button has the same functionality as the right button)

You can insert a song into the actual playlist with this patch, so I guess it’s allready adapted :)

yes i understand that the functionallity is there but having looked at the patch, it will only make changes to H100, H300 and e200
what  FS#2004  asks for is for the RIGHT (ffwd?) direction pad button to have this functionallity on ipods and the archos recorder

I have only limited knowlage of java (in first year of computer science degree…) and do not feel confident enough to start hacking around with this patch to make it do what i want :/

Could this patch please be resynced with the latest svn build? I’d love to get this patch working. thanks a lot.

This is a quick sync to r16494 from my own codebase, so it doesn’t incorporate Ireneusz Patala’s addition.

Here’s another sync’d version. This one includes the work of me and Ireneusz Patalas.

Oops, sorry. You better choose this file :) The previous is flawed.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing