Button Mapping

[S HOME] / Technical Information / Button Mapping


Overview

The Player IR interface to the SLIMP3 server associates human actions (pressing a button on the remote) with functions on the server (jumping to the next song). There are a number of translations, or mappings between the human action and the server function.

The remote translates the particular button pressed into a series of pulses of infrared light. The player recieves these pulses, and translates them into a four byte code, which is sent to the server. The server looks up this code in a table and tranlates it into a button name. The button name is then looked up in another table to produce the function which should be called.

The button to IR pulse mapping depends on the remote used, and is not generally customizable, although programmable remotes can be used. The IR pulse to code mapping is controlled in the firmware of the player, and cannot be modified without updating that firmware. The code to button name mapping is controlled through .ir files, typically one for each type of remote used to control the player. The final button name to function mapping is controlled through .map files, consisting of a default mapping file, and any custom maps which may have been created.

The mapping files, both .ir and .map, are stored in the IR subfolder of the folder where the SLIMP3 software was installed. Included with the software are two .ir files: jvc_dvd.ir and SLIMP3_Remote.ir which handle the codesets sent by the JVC DVD player (which is the codeset most commonly used by the SLIMP3 player prior to the production of the SLIMP3 specific remotes) and the SLIMP3 specific remote respectively. One .map file(Default.map), representing the default mapping is included.


Timing

When a code is first received by the server, the plain button mapping is triggered. Also, a timer is set to go off in IRSINGLETIME seconds (currently 0.256).

If the button on the remote is held down, the server will receive additional codes identical to the initial one. If the repeated codes are each received within IRMINTIME seconds (currently 0.128) of each other, the button.repeat mapping is triggered for each repeated code. If one of those repeated codes happens between IRHOLDTIME (currently 0.512) and IRHOLDTIME + IRMINTIME seconds, the button.hold mapping is triggered.

When either IRSINGLETIME seconds pass or a code comes in more than IRMINTIME seconds from the previous code, the pending timer is fired. If the code is different from the code which initiated the timer, the mapping for button.single (for the first code) is triggered. If the new code is the same as the old one, the mapping for button.double is triggered.

If the timer fired as a result of the time elapsing, then it must be determined if the button is still being held. This is the case if the last code received was received within the last IRMINTIME seconds. If the button is no longer being held, the mapping for button.single is triggered. Otherwise the timer is rescheduled for another IRSINGLETIME seconds, or for however long it takes to make the total time be IRHOLDTIME seconds. The same checks apply for the next time the timer is fired.

After IRHOLDTIME seconds have passed, the timer will no longer trigger the button.single or button.double mappings. From that point forward, the mapping triggered will be button.hold_release when it is finally determinied that the button is no longer being held.


More to come...