This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5555 - Record Button Configuration
Attached to Project:
Rockbox
Opened by Simon Menzel (Rincewind) - Friday, 16 June 2006, 18:56 GMT+1
Last edited by Paul Louden (Llorean) - Tuesday, 25 March 2008, 18:27 GMT+1
Opened by Simon Menzel (Rincewind) - Friday, 16 June 2006, 18:56 GMT+1
Last edited by Paul Louden (Llorean) - Tuesday, 25 March 2008, 18:27 GMT+1
|
DetailsWith 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 |
This task depends upon
Closed by Paul Louden (Llorean)
Tuesday, 25 March 2008, 18:27 GMT+1
Reason for closing: Rejected
Additional comments about closing: As it's obvious this patch isn't working toward inclusion.
Tuesday, 25 March 2008, 18:27 GMT+1
Reason for closing: Rejected
Additional comments about closing: As it's obvious this patch isn't working toward inclusion.
Right now I can't see how the NAVI button could be affected by my patch at all.
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..
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.
FYI, the issue of paulheu had to do with some other patches he made. It doesn't happen when patching against a clean CVS.
@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.
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...
Use this one:
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
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).
@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.
(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
- 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!
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
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.
- 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...
I would like the option to record radio at least as instantly as the OF.
@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.
Many thanks, keep up the good work!
Many thanks, keep up the good work!
Edit: File removed, this "fix" was worse
I removed the last file, It was obviously the wrong thing.
- (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.
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.
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.
:p
* 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.
now it is:
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.^^
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.
Thanks
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.
Watch this patch, there will be at least an update to cvs soon, I promise.
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).
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.
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.
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...
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".
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.
Only to current svn at the momement (thanks to the REP). No new features, soon more to come.
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.
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.
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.
Look here: http://forums.rockbox.org/index.php?topic=2513.0
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:
http://www.rockbox.org/twiki/bin/view/Main/DevCon2007#H1xx_REC_button
#include "main_menu.h"
in user_actioms.c (line 26), since there is no such header in my tree.
Charles
I removed your //-style comment completely, to make it compliant with the coding standards. No functional change.
http://build.rockbox.org/cvsmod/chlog-20070802T121404Z.html
will probably require re-syncing
I'm still going to maintain it and post updates to it, because I use it every day.
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?
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)
>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.
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...
Where it says:
*UPDATED* June 22, 2007
Because I just updated it.
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.
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
- 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.
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)
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. :-)
svn diff >patchfile from the root of your source tree.
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.
-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?
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.
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.
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.
This patch won't get commited in the current form, anyway :(
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 ;).
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.
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
I also did resync with r16048.
PS. ever=never in the post above ;]
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 :/