Skip to main content
FW version: Stable

Input mapping

Lynx allows mapping its logic inputs to physical inputs on a particular device. This ensures high modifiability of the system used HW.

info

The mentioned variables are located in the folder /io.

Input parameter list

ParameterDescriptionInput type
in_accInput mapped as throttle 1 signalAnalog input
in_acc_2Input mapped as throttle 2 signalAnalog input ID for 2 chanel throttle
Digital input ID for endstop switch
in_cadenceInput mapped as PAS cadenceDigital input ID
in_clutchInput mapped as clutchAnalog input ID
in_cruiseInput mapped as cruise activation signalDigital input
in_dbrakeInput mapped as dynamic brake signalAnalog input ID
in_lightInput mapped as light activation signalDigital input
in_maplockInput mapped as second map set activation signalDigital input
in_mapswitchInput mapped as map change activation signalDigital input
in_reverseInput mapped as reverse activation signalDigital input
in_sbrakeInput mapped as static brake activation signalDigital input
in_speedInput mapped as external speed sensorAnalog input ID for SX,SL,SC
Digital input ID for AX, AM
in_torqueInput mapped as torqueAnalog input ID
in_lockInput mapped as lock.Digital input
IN_seatswitchInput mapped as Seat switchDigital input

Parameters value

The input parameters are arrays of two values. The first value is the Physical input ID, and the second value is the Input options.

input maping

Physical input ID

Physical input ID is the ID of the physical input on the device. It is used to map the logic input to the physical input. Here is list of possible physical input IDs: Input ID documentation

Input options

Input options consist of two parts: 4 MSB bits Active state option and 4 LSB bits device address.

input maping

Device address

info

Addressing is not implemented yet, always use the address of your device - 0.

Active state

tip

Active state option is only used for digital inputs.

Using this option, you can specify which GDIN state is evaluated as True. By default (active state 0), the input is evaluated true when the GDIN value is other than 0.

When evaluated as TrueWhen evaluated as TrueInput option - DECInput option - BIN
GDIN value is NOT 0connected to any voltage or GND00b0000 0000
GDIN value is NOT 1NOT connected to +3V160b0001 0000
GDIN value is NOT 2NOT connected to +5V320b0010 0000
GDIN value is NOT 3NOT connected to +10V480b0011 0000
GDIN value is NOT -1NOT connected to GND*1120b0111 0000
GDIN value is 0NOT connected to any voltage or GND1280b1000 0000
GDIN value is 1connected to +3V1440b1001 0000
GDIN value is 2connected to +5V1600b1010 0000
GDIN value is 3connected to +10V1760b1011 0000
GDIN value is -1connected to GND*2400b1111 0000

* works only the internal pull-up is activated

Special input values

ValueDescription
3,14Bafang display - lights on
5,14Bafang display - walk mode on