#63850 - 28/01/2002 11:06
Hijack v152: Symbolic button names
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Okay, Hijack v152 is released, at http://empeg-hijack.sourceforge.net/
This version has:
-- Slightly longer timeout for two-drive booting. If not long enough, let me know and I'll increase it some more.
-- The .U and .N flags in [ir_translate] are no longer supported left of the '=' equal sign (were broken anyway).
-- Symbolic button names are now used for [ir_translate]. Hijack does string substitution when echoing back translations to the serial port, and also accepts button "names" as well has hex codes in the translations in config.ini. This means you can now do:
Bottom.LT=Player.N,Bottom.LU,null ;; Tuner active, switch to player
Bottom.LM=Radio.N,Bottom.LU,null ;; Player active, switch to Tuner instead of:
06.LT=b9461E.N,06.LU,ffffff ;; Tuner active, switch to player
06.LM=b9461C.N,06.LU,ffffff ;; Player active, switch to Tuner
The button names are, for the most part, exactly as spelled on the remote(s), except that the numbered buttons are *spelled* ("one" instead of "1"), and a few common synonyms have been included.
For a full and current list, look for "button_names" in the patchfile. Here are the "names" known in v152 (all names are case-insensitive):
Initial, null, One, Two, Three, Source, Four, Five, Six, Tuner, Seven, Eight, Nine, SelectMode, Cancel, Zero, Search, Sound, PrevTrack, Prev, Track-, NextTrack, Next, Track+, Menu, Ok, VolUp, Vol-, VolDown, Vol+, Info, Detail, Visual, Visual+, Play, Pause, Top, Bottom, Left, Right, Knob, KnobLeft, KnobRight, AM, FM, Direct, Star, *, Radio, Auxiliary, Tape, Player, CD, CDMDCH, DNPP
Edited by mlord (28/01/2002 11:13)
|
Top
|
|
|
|
#63851 - 28/01/2002 11:12
Re: Hijack v152: Symbolic button names
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Hijack v153 will be released in a minute or so, with a small fix for the button name lookup's.. so that "CDMDCH" and others work again.
|
Top
|
|
|
|
#63852 - 28/01/2002 13:00
Re: Hijack v152: Symbolic button names
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
If anyone out there has a bunch of [ir_translate] data already defined in their config.ini file, it will still work with the latest Hijack versions (no worries).
And if you want to convert it to the new "easy to read" format, all you have to do is capture the "ir_translate: " lines from the serial port at boot time, and then paste that data back into config.ini.
Cheers
|
Top
|
|
|
|
#63853 - 28/01/2002 13:44
Re: Hijack v152: Symbolic button names
[Re: mlord]
|
old hand
Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
|
Hey Mark,
thats a Way Cool implementation.
How much extra valuable kernel memory [if any] does symbolic buttons liek this take up compared to the hex codes implementation?
|
Top
|
|
|
|
#63854 - 28/01/2002 14:26
Re: Hijack v152: Symbolic button names
[Re: number6]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Quite a bit right now, perhaps around 1KB or so.
But I'm going to rewrite some other features to just leach from the same code/data (already done some of that), and there are some planned features that will also sit on top of it, so not too bad overall.
Building the strings into the kernel is a lot cheaper than providing run-once code to read/parse macro names from config.ini, so I am happier with this form than with other implementations.
But we still must be vigilant.. I don't like the fact that the compressed kernel is now over 500KB in size -- we only have 640KB of flash for kernels.. (some of which I might steal for a MUCH larger Hijack savearea someday).
Cheers
|
Top
|
|
|
|
#63855 - 29/01/2002 11:53
Re: Hijack v152: Symbolic button names
[Re: mlord]
|
pooh-bah
Registered: 15/01/2002
Posts: 1866
Loc: Austin
|
mlord, thanks for your constant attetion to this project and the requests of others. its good to see people like you actively listening as well as creating. one thing i was wondering, if i could. i have a wireless keyboard, is it possible to change your button codes display function to show all the signals that the ir receiver picks up? and i could use my keyboard with the ir translations?
|
Top
|
|
|
|
#63856 - 29/01/2002 12:00
Re: Hijack v152: Symbolic button names
[Re: RobotCaleb]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Doesn't the keyboard use IRDA (which is a different device/interface than the consumer IR)?
|
Top
|
|
|
|
#63857 - 29/01/2002 12:02
Re: Hijack v152: Symbolic button names
[Re: tfabris]
|
pooh-bah
Registered: 15/01/2002
Posts: 1866
Loc: Austin
|
i wouldnt know anything about it more than the fact that the keyboard works.
:P
it was just a thought i was throwing up.
|
Top
|
|
|
|
#63858 - 29/01/2002 12:52
Re: Hijack v152: Symbolic button names
[Re: RobotCaleb]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
This was discussed back in November(?). Basically, the keyboard current will be ignored at a lower-level than Hijack, so Hijack cannot currently capture/display codes from it.
The IR driver (empeg_input.c) doesn't "recognize" the IRDA format, so it just tosses the bits that it sees.
You can edit/instrument that driver to show incoming data, and from that you could add IR-keyboard support to the existing IR driver. This is something I have on the back-burner, for the unlikely day that I actually obtain an IR-keyboard that is frequency-compatible with my Empeg.
cheers
|
Top
|
|
|
|
#63859 - 29/01/2002 15:36
Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Okay, I've just put out Hijack v154.
This version removes the built-in "PopUp" button menu that so many of us love and curse, and instead allows/requires users to define their own version of it.
Details are on the IR translation page at http://empeg-hijack.sourceforge.net/ir_translate.html
Basically, if you want the "old" functionality back, just add this to your config.ini file on the player:
[ir_translate]
PopUp0=Info,Mark,Repeat,SelMode,Shuffle,Source,Tuner,Visuals
But you can now replace any of those buttons with your own choice(s), or add/delete to your heart's content. I would suggest, though, that no more than eight buttons be placed on PopUp0, since only 3-bits are used to keep track of the most recently-pressed button in flash.
Other PopUps can be configured as well, and assigned to the button(s) of your choice, as in:
[ir_translate]
PopUp0=Info,Mark,Repeat,SelMode,Shuffle,Source,Tuner,PopUp1
PopUp1=Artist,Album,Genre,Year,PopUp0
Bottom.LU=PopUp1
[hijack]
PopUp1=Tweak
Hopefully I haven't broken much with all of this.. or at least it all works for me!
Cheers
|
Top
|
|
|
|
#63860 - 29/01/2002 17:09
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
enthusiast
Registered: 26/12/2001
Posts: 386
Loc: Miami, FL - Sioux Falls, SD
|
Nice! Now is there anyway to make a menu load something on the empeg? That would be extreemly cool. Such as:
[hijack]
PopUp1=Tweak ; rename User1 menu to "Empetis" ins
Where User1 would run /usr/emptris&
-Greg
|
Top
|
|
|
|
#63861 - 29/01/2002 18:22
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Now THAT is some sweet functionality. Let me try this sucker out...
|
Top
|
|
|
|
#63862 - 29/01/2002 18:22
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mandiola]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Yes, there is. The author of Emptris (bmihulka) could port it to use Hijack's display commands and bind to the hijack menu... Not sure on Mark's plans to launch arbitrary user programs though...
Edited by yn0t_ (29/01/2002 18:23)
|
Top
|
|
|
|
#63863 - 29/01/2002 18:33
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
I forget, does ir_translate allow you to re-define "chord" keypresses like the early hijack versions? Like I'd like to use front-panel chords for my popup menus...
Also, is there any way you might be able to allow the user to configure the delay between when a press is considered "short" versus "long"? It seems that it's one second or so. I'd like something a bit shorter, maybe 0.5s or something. Just another feature request to pile on...
Also, I didn't see any available symbol for the "source/power" button on the Rio Remote (0x20DF03) It showed up as a hex string instead of a symbol in the Hijack debug output.
That nested popups feature is SLICK! I love it.
So, can Popup definitions have .M and .T qualifiers so they show differently depending on if you're in MP3 or Tuner mode? That'd make my source button easier (I don't like cycling through Aux since i don't use it, so I'd just have the Tuner PopUp menu have "MP3" and the MP3 PopUp have "Tuner.")
Edited by yn0t_ (29/01/2002 18:55)
|
Top
|
|
|
|
#63864 - 29/01/2002 19:19
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
No chords that I know of..
|
Top
|
|
|
|
#63865 - 30/01/2002 02:44
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
enthusiast
Registered: 16/02/2001
Posts: 373
Loc: Switzerland
|
Hello Mark,
I did install V156 and the PopUP0 is not working. I added the ir_translate code in the config.ini with the emplode! Running 2.0B7 on a MK2.
Here my config.ini
[Options]
Name=CrazyMelki's Empeg
[User Info]
[email protected]
Phone=+41796284116
Name=Melkon Torosyan
[Network]
Gateway=10.0.1.5
Netmask=255.255.255.0
IPAddress=10.0.1.10
DHCP=0
[sense]
muteaction=0
mute=-1
[display]
visual_names=1
caching=1
[hush]
hushpercent=10
[volumecap]
enabled=1
[kenwood]
disabled=1
[ramp]
disabled=1
[controls]
stalk_side=left
[tuner]
region=europe
[aux]
source=Only the best
title=MP3 Player
artist=PJBOX100
[power]
off_timeout=120000
[synchronise]
seq_num=75
[wendy]
flag_amount=0
[custom]
wendy=
[searches]
amount=0
[startup]
reservecache=12
[menu]
quit=1
sort_playlist=1
[ir_translate]
PopUp0=Info,Mark,Repeat,SelMode,Shuffle,Source,Tuner,Visuals
do i miss somemthing.
Thanks for your great work once again.
bye
|
Top
|
|
|
|
#63866 - 30/01/2002 08:36
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: crazymelki]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Okay, so now go into the Hijack menus, to the "Knob Press Redefinition", and select "PopUp0" from the menu there.
It should work fine after that.
|
Top
|
|
|
|
#63867 - 30/01/2002 08:51
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
-- I'll add the missing "Source" button definition in v157 (later today?).
-- The 1-second "Long Press" timeout is not configurable, and I'd rather it stay that way -- it has to synchronize with how the player works, and I think the player uses something around 1-second as well. Also, the code size would increase by a few hundred bytes if I made it configurable rather than leaving it as a small constant.
- The Popup menus ignore most/all modifiers, but the translation you use to invoke them can use any modifiers you like, as in:
Bottom.LT=popup1
Bottom.LM=popup2
Cheers
Edited by mlord (30/01/2002 08:52)
|
Top
|
|
|
|
#63868 - 30/01/2002 09:24
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
The 1-second "Long Press" timeout is not configurable, and I'd rather it stay that way -- it has to synchronize with how the player works
In what way? Would things just not work if the timeout was changed? Hmm... If you don't want to make it configurable, can you maybe point me at the constant I need to change to experiment with it? I can see why you might want everyone to have it the way it is, but if it's possible to hack a smaller delay, I'd like to do that...
The Popup menus ignore most/all modifiers, but the translation you use to invoke them can use any modifiers you like, as in:
Bottom.LT=popup1
Bottom.LM=popup2
Ah, yes, but the problem is I wanted to have the PopUp0 (the one bound to the knob) act differently depending on whether it's in tuner or aux. But from your comments on your ir_translate page, it sounded like making the PopUp menus act like the other translations (with modifiers and such) was counterproductive or prohibitively difficult or something. Not a problem.
Oh, what does renaming the popup menus actually do besides change the symbol you use to refer to it in the ir_trans section? I thought it would change the actual "name" of the menu but now it always says "Select Action:" I figured it would say "Tweak:" for the tweak menu, for instance, but on mine (v154) it doesn't.
|
Top
|
|
|
|
#63869 - 30/01/2002 09:50
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: tonyc]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
If I recall correctly, the PopUp1=Tweak, etc lines only change what gets displayed in the PopUp menu, and not what you use in the ir_trans section.
Also, I would reccomend setting it to 'Tweak...' to indicate it's a menu, and not an action.. Makes it easier to navigate through the menus.
Edited by Yang (30/01/2002 09:51)
|
Top
|
|
|
|
#63870 - 30/01/2002 09:56
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: Yang]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
That's mostly it.
Changing the menu label, changes what it is called on any (other) Popup menus that reference it. Changing PopUp0 also affects the name shown in the "Knob Press Redefinition" choices. The [ir_translate] section is processed BEFORE the [hijack] section of config.ini, specifically to PREVENT the new name from confusing any translations you might have (it really does replace the name globally..).
Cheers
|
Top
|
|
|
|
#63871 - 30/01/2002 10:02
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
addict
Registered: 14/01/2002
Posts: 443
Loc: Raleigh, NC
|
Am I right in the understanding that it requires a power-reboot (or through hijack) to reload the config.ini file? I noticed when resync'ing through emplode, that changes to the config.ini didn't take all the time.
|
Top
|
|
|
|
#63872 - 30/01/2002 10:48
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
enthusiast
Registered: 16/02/2001
Posts: 373
Loc: Switzerland
|
Sorry Mark, but it does not! Also the NextSrc is not working. I had until today almost all your great HiJacks installed. And the "Knob Press" was working very well!
Thanks
|
Top
|
|
|
|
#63873 - 30/01/2002 11:04
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Hmm... Gotcha. I just thought the "select action" could be replaced by whatever that redefined name is (Tweak for instance).
Also, I've noticed that if I try to use the knob press while a message box (from the player) is up, it doesn't bring up the pop-up menu, it instead cycles through the conventional volume/balance/fader settings. This prevents me from tapping the knob a whole slew of times to tweak the order a bunch of times (to queue up from the same artist or whatever.) In order to do it, I have to wait for each "Found Matching Artist" message box to disappear first. Any way this can be averted? Definitely falls under the "minor inconvenience" category though. Solve world hunger first.
Edited by yn0t_ (30/01/2002 11:04)
|
Top
|
|
|
|
#63874 - 30/01/2002 12:51
Hijack v154 PopUps: "Visual", not "Visuals"
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Okay, I had a typo in my original posting on getting PopUp0 to work, in that "Visuals" should be spelled "Visual", as shown on the remote.
So, for the "old knob PopUp behaviour", use these lines in config.ini:
[ir_translate]
PopUp0=Info,Mark,Repeat,SelMode,Shuffle,Source,Tuner,Visual
-ml
|
Top
|
|
|
|
#63875 - 30/01/2002 12:53
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: crazymelki]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
The Popup likely is not working because you probably copied my typo.. "Visual" is spelled "Visual", not "Visuals" on the remote.. fix that in your config.ini file and try again.
NextSrc works fine. What makes you suggest otherwise (in other words, GIVE ME SOME FRIGGIN DETAILS, otherwise I cannot fix it).
Cheers
|
Top
|
|
|
|
#63876 - 30/01/2002 12:56
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
Mmm.. I'm not going to touch that one. You could always use any button other than the KNOB for your tweak menu..
Cheers
|
Top
|
|
|
|
#63877 - 30/01/2002 13:01
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: Yang]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
IR translations can be updated by just using Emplode to edit config.ini and restart the player. But things like the kftpd/khttpd parameters are only updated on reboots.
The current versions of hijack also have an issue whereby if you rename the popup's, then the new names "stick" even when restarting the player, which will cause the ir_translate to fail since the names are now different. Thus reboots are required in that case as well.. fixed in the next release.
-ml
|
Top
|
|
|
|
#63878 - 30/01/2002 13:03
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14493
Loc: Canada
|
The 1-second "Long Press" timeout is not configurable, and I'd rather it stay that way -- things are getting hard enough to keep working as is. Kinda makes me appreciate just how amazing Hijack really is, that it even works at all (considering what it is doing to a "blackbox" player).
-ml
|
Top
|
|
|
|
#63879 - 30/01/2002 13:12
Re: Hijack v154: User-Defined Pop-Up Button menus
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Okay... Maybe I wasn't clear... I wasn't asking you to go change it for Hijack, just to point me to where I might try to change it myself in the kernel source, like the name of a constant or something.
And to your other point, we've all been telling you how amazing Hijack is since v1... Where the hell have you been? You sound like an artist who just finally stepped back to see the whole painting and realized "hey, this thing friggin' rules!"
|
Top
|
|
|
|
|
|