In reply to:

Mark, could you explain the following?

;; Min/max A/D pairs for all ten buttons on a Right mounted Stalk
;; Button order is: KOff,KSource,KAtt,KFront,KNext,KPrev,KVolUp,KVolDown,KRear,KBottom

;; min/max A/D pairs for all ten buttons on a Left mounted Stalk
stalk_lhs=aa,aa,bb,bb,cc,cc,dd,dd,ee,ee,ff,ff,gg,gg,hh,hh,ii,ii,jj,jj




Each of those labelled buttons (KOff,KSource,...) on the Stalk are implemented in hardware with a simple resistor and a switch. The stalk interface consists of three wires: Power supply out, and two returns: one return from the "Shift" switch, and another from all of the buttons wired together. What the software sees, is an A/D conversion value based on the size of resistor attached to the button that is being pressed. This gives a number in the range 00..255. Different resistors give different numbers. Even the same resistors can give different numbers, depending upon component variations, and environmental conditions (temperature), quality of the electrical connections, etc..

There is a default "range" of acceptable A/D values from each button, wired into the player software, and also now in Hijack (the same for both).

The stalk_lhs and stalk_rhs parameters in config.ini allow the advanced user to override the built-in A/D values with a custom set of ranges, two numbers (low,high) per button. This allows compensating for an out-of-spec Stalk, or even use of a third-party (or hacked together) stalk-style control that plugs into the same hardware interface.

The reason for separate stalk_lhs (Left Hand Side) and stalk_rhs (Right Hand Side) values is just a coding convenience within Hijack.

Here is the default (built-in) setting for stalk_rhs:

stalk_rhs=0x00,0x07,0x10,0x1c,0x24,0x30,0x34,0x40,0x42,0x4e,0x54,0x60,0x68,0x74,0x7e,0x8a,0x94,0xa0,0xa0,0xb5


Note that the final two buttons listed overlap -- which is an error, but that's what the documentation on RioCar.Org claims for the player software, so the bug is faithfully duplicated in Hijack.

Cheers