Skip to main content
FW version: Stable

Input Mapping

Lynx enables mapping of logical inputs to physical inputs on specific devices, providing flexible hardware configuration options.

info

All referenced variables are located in the /io folder.

Input Parameter List

ParameterDescriptionInput Type
in_accPrimary accelerator signal inputAnalog input
in_acc_2Secondary accelerator signal inputAnalog input ID for 2-channel accelerator
Digital input ID for endstop switch
in_cadencePAS cadence inputDigital input ID
in_clutchClutch inputAnalog input ID
in_cruiseCruise control activation inputDigital input
in_dbrakeDynamic brake inputAnalog input ID
in_lightLight control inputDigital input
in_maplockSecondary map set activation inputDigital input
in_mapswitchMap selection inputDigital input
in_reverseReverse mode activation inputDigital input
in_sbrakeStatic brake activation inputDigital input
in_speedExternal speed sensor inputAnalog input ID for SX,SL,SC
Digital input ID for AX, AM
in_torqueTorque sensor inputAnalog input ID
in_lockLock function inputDigital input
in_seatswitchSeat switch inputDigital input

Parameter Values

Input parameters consist of two-value arrays: Physical input ID and Input options.

input mapping

Physical Input ID

Physical input ID identifies the specific physical input on the device, linking logical inputs to hardware inputs. Available IDs are listed here: Input ID documentation

Input Options

Input options combine two components: 4 MSB bits for Active state option and 4 LSB bits for device address.

input mapping

Device Address

info

Addressing functionality is pending implementation. Currently, always use address 0 for your device.

Active State

tip

Active state options apply only to digital inputs.

This option defines which GDIN state is interpreted as True. By default (active state 0), any non-zero GDIN value is considered true.

True ConditionPhysical StateInput Option (DEC)Input 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/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

* Requires activated internal pull-up

Special Input Values

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