LuxLibre

LuxLibre › Documentation › Firmware › Parameters

Firmware parameters

LuxLibre firmware 0.5.0. Every setting of the firmware is a parameter with a name, a range and a default, in the style of ArduPilot. Change them over the console (set NAME VALUE, then save) on boards that have one, or change the default in the board header (LX_DEF_...) and rebuild.

Defaults written as LX_DEF_... come from the board header; the value shown is the one of the simulator board.

Name Default Range Unit Meaning
UI_STYLE 0 (LX_DEF_UI_STYLE) 0 … 2   Button layout: 0 = ramp (smooth dimming), 1 = modes (fixed steps), 2 = simple (modes capped at SIMPLE_MAX, no turbo or blinkies)
PREVIEW 1 (LX_DEF_PREVIEW) 0 … 1   1 = the light shows the floor level while the button is pressed from off (instant feedback)
CLICK_MS 400 150 … 1000 ms Longest press that counts as a click, and the longest pause between clicks of one gesture
RAMP_FLOOR 1 (LX_DEF_RAMP_FLOOR) 1 … 150 level Lowest level of the ramp (moon); also used for momentary moon
RAMP_CEIL 120 (LX_DEF_RAMP_CEIL) 1 … 150 level Highest level reached by holding the button; turbo is above it
RAMP_MS 16 2 … 100 ms Time per level while ramping (150 levels x 16 ms = 2.4 s for the whole ramp)
MODE_CNT 4 (LX_DEF_MODE_CNT) 1 … 5   Number of fixed modes in the modes and simple layouts
MODE_1 30 (LX_DEF_MODE_1) 1 … 150 level Level of mode 1
MODE_2 70 (LX_DEF_MODE_2) 1 … 150 level Level of mode 2
MODE_3 100 (LX_DEF_MODE_3) 1 … 150 level Level of mode 3
MODE_4 120 (LX_DEF_MODE_4) 1 … 150 level Level of mode 4
MODE_5 140 (LX_DEF_MODE_5) 1 … 150 level Level of mode 5
MODE_MS 600 200 … 2000 ms Interval between mode steps while the button is held (modes layout)
MEMORY 1 0 … 1   Switch-on level: 1 = the last level used, 0 = always MEM_LEVEL (or mode 1)
MEM_LEVEL 70 (LX_DEF_MEM_LEVEL) 1 … 150 level Switch-on level when MEMORY = 0 (ramp layout)
TURBO_LVL 150 (LX_DEF_TURBO_LVL) 1 … 150 level Turbo level (double click)
TURBO_S 60 (LX_DEF_TURBO_S) 0 … 600 s Longest turbo burst before the automatic step-down to TURBO_DOWN; 0 = no time limit (the thermal limit always applies)
TURBO_DOWN 120 (LX_DEF_TURBO_DOWN) 1 … 150 level Level after the turbo time has run out
SIMPLE_MAX 100 1 … 150 level Highest level available in the simple layout (for lending the light to others)
SMOOTH_MS 2 0 … 50 ms Soft transitions: time per level when the brightness changes; 0 = instant
BLINK_LVL 60 (LX_DEF_BLINK_LVL) 1 … 150 level Brightness used for battery and temperature read-outs
BLINKY 3 (LX_DEF_BLINKY) 0 … 7 bits Blinky modes after the battery check: 1 = beacon, 2 = SOS, 4 = strobe (add the numbers; 0 = none)
STROBE_HZ 10 1 … 20 Hz Strobe frequency; flashing between 3 and 30 Hz can trigger photosensitive seizures
LOCK_MOON 1 (LX_DEF_LOCK_MOON) 0 … 1   In lockout, holding the button gives momentary moon (0 = lockout stays completely dark)
AUTOLOCK 0 0 … 240 min Lock automatically after this many minutes off; 0 = never
POCKET_S 30 (LX_DEF_POCKET_S) 0 … 600 s Pocket protection: a button held this long while the main LED is on switches the light off and locks it; 0 = off
AUX_MODE 2 (LX_DEF_AUX_MODE) 0 … 2   Indicator LED: 0 = off, 1 = events and charging only, 2 = also the battery colour for 2 s after switch-on
THM_LIMIT 50 (LX_DEF_THM_LIMIT) 30 … 70 °C Temperature the regulator holds (sensor reading + THM_OFFSET); set it so that the hottest touchable surface stays within THM-1 (docs/design-rules.md)
THM_OFFSET 0 -10 … 10 °C Calibration: added to the sensor reading so that it reads the true temperature at the sensor (kept by the factory reset)
THM_KP 20 (LX_DEF_THM_KP) 10 … 20 0.1 lvl/°C Proportional gain of the thermal regulator
THM_KI 8 (LX_DEF_THM_KI) 1 … 12 0.1 lvl/°C/s Integral gain of the thermal regulator (cannot be 0: the regulator always acts)
THM_LEAD 4 (LX_DEF_THM_LEAD) 0 … 10 s Prediction: the regulator acts on temperature + rate of rise x THM_LEAD, to make up for sensor lag
THM_FLOOR 60 (LX_DEF_THM_FLOOR) 1 … 150 level Lowest level the thermal regulator may force (below it only THM_SHUTDN acts)
THM_UP 20 1 … 100 0.1 lvl/s Fastest brightness recovery while the light cools down
THM_SHUTDN 75 (LX_DEF_THM_SHUTDN) 40 … 100 °C Hard limit: the light switches off and stays off until 5 degC cooler
BAT_CELLS 1 (LX_BAT_CELLS) 1 … 4   Number of cells in series
BAT_CHEM 0 0 … 2   Chemistry for the charge estimate: 0 = Li-ion (3.7 V), 1 = LiFePO4 (3.2 V), 2 = NiMH (1.2 V)
LVP_WARN 3200 (LX_DEF_LVP_WARN) 900 … 3700 mV/cell Below this voltage (under load) the light steps down
LVP_CUT 2900 (LX_DEF_LVP_CUT) 900 … 3500 mV/cell Below this voltage the light switches off to protect the cell (never below 2700 mV for Li-ion, 2000 mV for LiFePO4, 900 mV for NiMH, whatever is set)
LVP_RESUME 3300 1000 … 3800 mV/cell After a low-voltage cut-off the light can be switched on again once the cell rests above this
BAT_RINT 80 (LX_DEF_BAT_RINT) 0 … 1000 mOhm Resistance of cell, springs and wiring, for the load compensation of the charge estimate
BAT_CAL 0 -300 … 300 mV Calibration: added to the measured pack voltage (kept by the factory reset)
BAT_MAX_MA 0 (LX_DEF_BAT_MAX_MA) 0 … 30000 mA Cell current limit, 0 = off (needs the board’s LED current model, LX_MAIN_MAX_MA)
CHG_TMIN 0 0 … 20 °C Charging is paused below this temperature (Li-ion must not be charged below 0 degC)
CHG_TMAX 45 30 … 50 °C Charging is paused above this temperature
CHG_MAXLVL 100 (LX_DEF_CHG_MAXLVL) 1 … 150 level Highest level while USB power is connected
LASER_EN 1 (LX_HAS_LASER) 0 … 1   Allow the laser gesture (click, then click-and-hold from off)
LASER_S 60 1 … 300 s Longest laser emission per press
LASER_TMAX 60 30 … 80 °C No laser above this temperature
LASER_VMIN 3200 900 … 3800 mV/cell No laser below this cell voltage (cheap laser modules drift when the supply sags)
SIDE_RED 40 (LX_DEF_SIDE_RED) 1 … 100 % Brightness of the red side light (5 clicks from off)
SIDE_UV 100 (LX_DEF_SIDE_UV) 0 … 100 % Brightness of the UV side light; 0 = no UV (two clicks in the side light then do nothing)
COLOR_SET 135 (LX_DEF_COLOR_SET) 1 … 255 bits Colours that two clicks step through in the colour beam: 1 = red, 2 = green, 4 = blue, 8 = yellow, 16 = cyan, 32 = magenta, 64 = white from the three colours, 128 = the custom colour COL_R / COL_G / COL_B (add the numbers)
COL_R 100 (LX_DEF_COL_R) 0 … 100 % Custom colour: share of the red LED (the strongest of the three runs at the full colour brightness)
COL_G 35 (LX_DEF_COL_G) 0 … 100 % Custom colour: share of the green LED
COL_B 0 (LX_DEF_COL_B) 0 … 100 % Custom colour: share of the blue LED (red, green and blue all 0 = red)
TURBO_ALL 0 (LX_DEF_TURBO_ALL) 0 … 1   1 = turbo of the white beam also lights the three colour LEDs above the top mode: more lumens, a slightly tinted beam