PDA

View Full Version : Confused about remote mapping



Bill Moseley
2006-11-12, 20:36
http://localhost:9000/html/docs/buttons.html left me with a lot of
questions.

Ok, so the .ir files map a remote's buttons to the IR code.
So if I have a "power" button on the remote I might enter
the .ir file:

power = a25d48b7

Then in a .map file I might map that key to turn my SBII on or off:

power = power_toggle

What I don't understand is how the server knows which .map file
goes with which .ir file. I assume that when the IR code a25d48b7
is generated that the server looks for the first "power" in any of
the .map files.

Or should I prefix with the name of the remote. I have a Bose
programmable remote, so:

bose_power = a25d48b7

Then in the map file

bose_power = power_toggle

The reason that makes sense is the Bose remote control can be
programmed to act like a number of different remotes, so I might have
multiple .ir files. So, when the remote is programmed to act as a
Toshiba DVD remote I would have this .ir file:

bose_toshiba_dvd_1503.ir



"power" seems like an obvious example. But, say I have a record "rec"
button that I'd like to make use of -- say to toggle the brightness.
So, which do I use:

# in .ir file
rec = a25d5da2

# in .map file
rec = brightness_toggle

Or would I do this?

# in .ir file
brightness = a25d5da2

# in .map file
brightness = brightness_toggle


Finally, is there a list of all the functions I can use in the .map
file listed someplace?

And from the docs, I really don't understand where [INPUT.Text]
applies. Are there any more docs on this?






--
Bill Moseley
moseley (AT) hank (DOT) org

kdf
2006-11-12, 20:49
On 12-Nov-06, at 7:36 PM, Bill Moseley wrote:

> http://localhost:9000/html/docs/buttons.html left me with a lot of
> questions.
>
> Ok, so the .ir files map a remote's buttons to the IR code.
> So if I have a "power" button on the remote I might enter
> the .ir file:
>
> power = a25d48b7
>
> Then in a .map file I might map that key to turn my SBII on or off:
>
> power = power_toggle
>
> What I don't understand is how the server knows which .map file
> goes with which .ir file.

you choose which ir files are active, and you choose which single map
file is active for each player.
look in player settings->remote.
>
> Finally, is there a list of all the functions I can use in the .map
> file listed someplace?
>
note really, as this can change at any time. Plugins and new features
regularly add functions. Look in Slim/Buttons/*.pm and in Plugins
folder. Any functions in those modules are valid for use.

> And from the docs, I really don't understand where [INPUT.Text]
> applies. Are there any more docs on this?
>
look in the docs for the input modes. They are generic input types
that help to reduce the need for every different mode to have it's own
code for a BAR ui, inputting a text value, choosing an item from a
list, etc.

-kdf

Bill Moseley
2006-11-12, 22:19
On Sun, Nov 12, 2006 at 07:49:20PM -0800, kdf wrote:
> you choose which ir files are active, and you choose which single map
> file is active for each player.
> look in player settings->remote.

Ah, right there in front of me!

I guess I could create more than one map file so I could have more
then one set of functions for the buttons on the remote. It would be
nice if I could assign a button to toggle through different map files.


> >And from the docs, I really don't understand where [INPUT.Text]
> >applies. Are there any more docs on this?
> >
> look in the docs for the input modes. They are generic input types
> that help to reduce the need for every different mode to have it's own
> code for a BAR ui, inputting a text value, choosing an item from a
> list, etc.

I see. Is there a way to tell what is the current input mode?

I thought I could use [INPUT] to define things then override with
[INPUT.Text], but that didn't seem to work.

And the logs are confusing, for example I see the following.
Why does it say repeat_toggle is not defined then it executes it?
The repeat function is working.

2006-11-12 21:07:39.4720 found button bose_repeat for a25d24db
2006-11-12 21:07:39.4728 found function repeat_toggle for button bose_repeat in mode common from map /home/moseley/SlimServer_v5.4.0/IR/Bose.map
2006-11-12 21:07:39.4735 irCode = [repeat_toggle] timer = [382590.719] timediff = [321.429999999993] last = [left]
2006-11-12 21:07:39.4740 irCode: repeat_toggle, 00:04:20:05:87:0e
2006-11-12 21:07:39.4748 irCode not defined: repeat_toggle
2006-11-12 21:07:39.4754 trying to execute button: repeat_toggle
2006-11-12 21:07:39.4763 executing button: repeat_toggle

--
Bill Moseley
moseley (AT) hank (DOT) org

kdf
2006-11-13, 00:37
On 12-Nov-06, at 9:19 PM, Bill Moseley wrote:

> On Sun, Nov 12, 2006 at 07:49:20PM -0800, kdf wrote:
>> you choose which ir files are active, and you choose which single map
>> file is active for each player.
>> look in player settings->remote.
>
> Ah, right there in front of me!
>
> I guess I could create more than one map file so I could have more
> then one set of functions for the buttons on the remote. It would be
> nice if I could assign a button to toggle through different map files.
>
there is a way to create a shift key that switches maps, but it is
undocumented, unused and
more or less unsupported. There is mention of it in this thread:
http://forums.slimdevices.com/showthread.php?t=15108

>
>>> And from the docs, I really don't understand where [INPUT.Text]
>>> applies. Are there any more docs on this?
>>>
>> look in the docs for the input modes. They are generic input types
>> that help to reduce the need for every different mode to have it's own
>> code for a BAR ui, inputting a text value, choosing an item from a
>> list, etc.
>
> I see. Is there a way to tell what is the current input mode?
>
Slim::Button::Common::mode($client) if you are using code.
otherwise, look at the d_ui logs.
>
> And the logs are confusing, for example I see the following.
> Why does it say repeat_toggle is not defined then it executes it?
>
probably a case of an overly verbose debug flag or not showing the full
information.
The ir routine does search for the current mode ir map, but then will
fall back to what is found in the [common] section
the repeat function works because it is there. if you trace the
messages through the Slim/Hardware/IR.pm,
you should be able to see that path.

-kdf