Skip to content
Wieland Schöbl edited this page Mar 15, 2021 · 3 revisions

Return Values

Return Value Explanation
TOO_FEW_PARAM Too few parameters
INVALID_ACTION Action not found
SUCCESS Action succeeded
LED_NOT_FOUND Unknown LED ID
LED_STATE_NOT_FOUND Unknown LED State
ENTRY_NOT_FOUND MFD Entry could not be found

LED IDs

ID Name Note
0 FIRE The button with the cover, only on/off
1 FIRE_A_RED
2 FIRE_A_GREEN
3 FIRE_B_RED
4 FIRE_B_GREEN
5 FIRE_D_RED
6 FIRE_D_GREEN
7 FIRE_E_RED
8 FIRE_E_GREEN
9 TOGGLE_1_2_RED Left two-way toggle
10 TOGGLE_1_2_GREEN
11 TOGGLE_3_4_RED Middle two-way toggle
12 TOGGLE_3_4_GREEN
13 TOGGLE_5_6_RED Right two-way toggle
14 TOGGLE_5_6_GREEN
15 POV_2_RED The DPAD to the left of the Fire button
16 POV_2_GREEN
17 CLUTCH_RED The button under the Fire D button
18 CLUTCH_GREEN
19 THROTTLE Only on/off

LED states

ID Name Note
0 OFF LED off state
1 ON LED on state, equivalent to YELLOW
n/a GREEN Green LED, not supported for THRUSTER and FIRE
n/a YELLOW
n/a RED

Functions

Name Parameters Return Note
setLED LED NAME, LED COLOR SUCCESS Set the color of a specific LED
resetLED SUCCESS Turns off all LEDs and soft-syncs their states
advSetLED LED ID, STATE ID, repeats?: INT, repeatOffset: FLOAT, flashDuration: FLOAT, flashOffset: FLOAT SUCCESS Use this when you want to iterate through all LEDs in a loop. For blinking, refer to the explanation image.
setString line: INT, text: STRING, entryID?: STRING, callbackName?: STRING SUCCESS Sets String on MFD at specified line. entryID can be used for editing, callbackName can be used for implementing clicking
getLinesCount INT Returns the amount of lines on the MFD
resetMFD SUCCESS Clears the MFD
setLine line: INT SUCCESS Scrolls to specified line on MFD
reset SUCCESS Resets both MFD and LEDs
turnAllLEDOff SUCCESS Turns off all LEDs at once, but does not sync them
syncFlashPatterns Soft-syncs all flash patterns (they might drift out of sync after time)
permaSyncTo syncTo: LED ID, led: LED ID SUCCESS Two LEDs will use the variable of the first LED, so they will be in sync forever. However, the LED with the lowest time to complete its cycle will win. Make sure the Flash pattern you are syncing to is active.
desync led: LED ID SUCCESS Breaks perma-sync links
peakMFD text: STRING, peakTimeSeconds: FLOAT, peakInteractionCallback?: STRING SUCCESS Temporarily overrides MFD display with in-game info (For example a message received)
removeMFDEntry entryId: STRING SUCCESS
editMFDEntry entryId: STRING, text: STRING, interactionCallback?: STRING SUCCESS

#LED Flash Patterns

LED Flash Pattern Image

Clone this wiki locally