summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-11-21 16:48:03 +0100
committerHugues Hiegel <hugues@hiegel.fr>2013-11-21 16:48:03 +0100
commitef05ec7850db7b0d9a11ae2d09ed09cc906c91bc (patch)
tree41a1bf55ac6c05dbdea8289b67bfee8d7ed00f6f /scripts
parente0a7da2c352a1e70c7768642381a4525a4d2fce7 (diff)
readme
Diffstat (limited to 'scripts')
-rw-r--r--scripts/README.txt793
1 files changed, 397 insertions, 396 deletions
diff --git a/scripts/README.txt b/scripts/README.txt
index 6a22a4f..06690c6 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -32,41 +32,41 @@ Events received from SLIMax Manager
====================================
function custom_initEvent(scriptFile)
-param = custom script file name
-Notes: this event is triggered at startup or when loading your custom script,
-this is the good opportunity to init your preferences and global vars
+ param = custom script file name
+ Notes: this event is triggered at startup or when loading your custom script,
+ this is the good opportunity to init your preferences and global vars
-All event functions below must return 1 if the event has been fully managed or
-2 to skip and give control to SLIMax Mgr
+ All event functions below must return 1 if the event has been fully managed or
+ 2 to skip and give control to SLIMax Mgr
---------------------------------------------
GLOBAL EVENTS (ALL DEVICES)
---------------------------------------------
function controlsEvent(deviceType, ctrlType, ctrlPos, value, funcIndex, targetDevice) and custom_controlsEvent
-params = see the control.lua script
-Devices supported: global event
-Notes: Controls Event, Manage buttons and switches. (see controls.lua script)
+ params = see the control.lua script
+ Devices supported: global event
+ Notes: Controls Event, Manage buttons and switches. (see controls.lua script)
---------------------------------------------
function deviceReport(deviceType) and custom_deviceReport
-param = the current targeted device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
-Devices supported: global event
-Notes: This function is called periodically and outputs the previously processed data to the device when it returns
-back to the manager, if needed, patch any previous function here to
-display additional info or to change everything. (see devhook.lua script)
+ param = the current targeted device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+ Devices supported: global event
+ Notes: This function is called periodically and outputs the previously processed data to the device when it returns
+ back to the manager, if needed, patch any previous function here to
+ display additional info or to change everything. (see devhook.lua script)
---------------------------------------------
function enterSessionEvent(deviceType) and custom_enterSessionEvent
-param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
-Notes: Triggered when the session starts
-(see enter_exit_session.lua script)
+ param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+ Notes: Triggered when the session starts
+ (see enter_exit_session.lua script)
---------------------------------------------
function exitSessionEvent(deviceType) and custom_exitSessionEvent
-param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
-Devices supported: global event
-Notes: Triggered when the session ends
-(see enter_exit_session.lua script)
+ param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+ Devices supported: global event
+ Notes: Triggered when the session ends
+ (see enter_exit_session.lua script)
---------------------------------------------
LOCAL EVENTS (SPECIFIC TO DEVICES)
@@ -77,10 +77,10 @@ function shiftLightsFanatecMethodEvent(idx) and custom_shiftLightsFanatecMethodE
function shiftLightsG27LedsMethodEvent(idx) and custom_shiftLightsG27LedsMethodEvent
function shiftLightsSRDlxMethodEvent(idx) and custom_shiftLightsSRDlxMethodEvent
function shiftLightsSRF1MethodEvent(idx) and custom_shiftLightsSRF1MethodEvent
-param = current method index
-Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
-Notes: shiftlights method event, computes all shiftlights methods
-(see shiftlights.lua script)
+ param = current method index
+ Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
+ Notes: shiftlights method event, computes all shiftlights methods
+ (see shiftlights.lua script)
---------------------------------------------
function ospMethodEvent(idx) and custom_ospMethodEvent
@@ -88,10 +88,10 @@ function ospSRDlxMethodEvent(idx) and custom_ospSRDlxMethodEvent
function ospSRF1MethodEvent(idx) and custom_ospSRF1MethodEvent
function ospFanatecMethodEvent(idx) and custom_ospFanatecMethodEvent
function ospG27LedsMethodEvent(idx) and custom_ospG27LedsMethodEvent
-param = current method index
-Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
-Notes: OSP method event, computes all Optimal Shift-Points methods
-(see osp.lua script)
+ param = current method index
+ Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
+ Notes: OSP method event, computes all Optimal Shift-Points methods
+ (see osp.lua script)
---------------------------------------------
function spdLmtMethodEvent(idx) and custom_spdLmtMethodEvent
@@ -99,10 +99,10 @@ function spdLmtSRDlxMethodEvent(idx) and custom_spdLmtSRDlxMethodEvent
function spdLmtSRF1MethodEvent(idx) and custom_spdLmtSRF1MethodEvent
function spdLmtFanatecMethodEvent(idx) and custom_spdLmtFanatecMethodEvent
function spdLmtG27MethodEvent(idx) and custom_spdLmtG27MethodEvent
-param = current method index
-Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
-Notes: speedlimiter method event, computes all speedlimiter methods
-(see speedlimiter.lua script)
+ param = current method index
+ Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
+ Notes: speedlimiter method event, computes all speedlimiter methods
+ (see speedlimiter.lua script)
---------------------------------------------
function leftDigitsEvent(swPosition) and custom_leftDigitsEvent
@@ -112,45 +112,45 @@ function srdlxRightDigitsEvent(swPosition) and custom_srdlxRightDigitsEvent
function srf1LeftDigitsEvent(swPosition) and custom_srf1LeftDigitsEvent
function srf1RightDigitsEvent(swPosition) and custom_srf1RightDigitsEvent
function fanatecDigitsEvent(swPosition) and custom_fanatecDigitsEvent
-param = switch position
-Devices supported: SLI-PRO, SIM RACE Deluxe, SIM RACE F1 and Fanatec Wheels and emulators SLI-EMU and SRF1-EMU
+ param = switch position
+ Devices supported: SLI-PRO, SIM RACE Deluxe, SIM RACE F1 and Fanatec Wheels and emulators SLI-EMU and SRF1-EMU
-Notes: computes data to be displayed on digits panel of the device
-(see scripts: slipro.lua, simracedlx.lua, simracef1.lua and fanatec.lua)
+ Notes: computes data to be displayed on digits panel of the device
+ (see scripts: slipro.lua, simracedlx.lua, simracef1.lua and fanatec.lua)
---------------------------------------------
function gearEvent(gear) and custom_gearEvent
function gearFanatecEvent(gear) and custom_gearFanatecEvent
Devices supported: SLI Boards series and Fanatec Wheels
-param = current seleted gear ( -1 = reverse, 0 = neutral, 1 ... 7)
-Notes: gear event, show the current selected gear on central digit
-(see gear.lua script)
+ param = current seleted gear ( -1 = reverse, 0 = neutral, 1 ... 7)
+ Notes: gear event, show the current selected gear on central digit
+ (see gear.lua script)
---------------------------------------------
function ledEvent(idx, ledFunction, state) and custom_ledEvent
-param = index of the led, std state of the led and corresponding function
-1=LowFuel
-2=TC
-3=ABS
-4=Green Flag
-5=Yellow flag
-6=Red Flag
-7=Over Heating
-8=Damage
-9=Pit request
-10=Power
-11=Rev Limit
-12=HeadLights
-13=Blue Flag
-14=DRS
-15=Safe Prefs
-
-Devices supported: SLI Boards series only
-Notes: patch std led behaviors (i.e. tc, abs, lowfuel,
- dammage, rev limit, drs, pit request, flags, ... )
-IMPORTANT: your script must be optimized as the function is
-called several time by second to report all activated leds
-(see led.lua script)
+ param = index of the led, std state of the led and corresponding function
+ 1=LowFuel
+ 2=TC
+ 3=ABS
+ 4=Green Flag
+ 5=Yellow flag
+ 6=Red Flag
+ 7=Over Heating
+ 8=Damage
+ 9=Pit request
+ 10=Power
+ 11=Rev Limit
+ 12=HeadLights
+ 13=Blue Flag
+ 14=DRS
+ 15=Safe Prefs
+
+ Devices supported: SLI Boards series only
+ Notes: patch std led behaviors (i.e. tc, abs, lowfuel,
+ dammage, rev limit, drs, pit request, flags, ... )
+ IMPORTANT: your script must be optimized as the function is
+ called several time by second to report all activated leds
+ (see led.lua script)
-----------------------------------------------
All functions starting with custom_ can created
@@ -168,164 +168,162 @@ functions to change SLIMax Manager information
Fanatec additions:
---------------------------------------------
SetFanatecDigitsAllowed(boolean)
-param boolean = true or false
-by default the 3 digits are showed but sometime we need to temporarily
-hide them to set our custom information, pass false to this function to hide digits
-and true to show them again
+ param boolean = true or false
+ by default the 3 digits are showed but sometime we need to temporarily
+ hide them to set our custom information, pass false to this function to hide digits
+ and true to show them again
---------------------------------------------
SetFanatecDigits(string)
-param string = 3 chars string + dots
-Set the alpha-numerical text (including the . delimiter) to the digits panel (see fanatec.lua script)
+ param string = 3 chars string + dots
+ Set the alpha-numerical text (including the . delimiter) to the digits panel (see fanatec.lua script)
---------------------------------------------
SetFanatecOneDigit(digit,a,b,c,d,e,f,g,dot)
-param digit = from 0 to 2
-param a,b,c,d,e,f,g = false or true
-param dot = false or true
-Set the 7 segments + dot of each digit
+ param digit = from 0 to 2
+ param a,b,c,d,e,f,g = false or true
+ param dot = false or true
+ Set the 7 segments + dot of each digit
---------------------------------------------
SetFanatecCspMotor(power,delay)
-param power: from 0 to 100
-param delay: from 0 to 1000 ms (1sec max)
+ param power: from 0 to 100
+ param delay: from 0 to 1000 ms (1sec max)
SetFanatecWheelMotor(motor,power,delay)
-param motor = 0 or 1 (left or right motor )
-param power: from 0 to 100
-param delay: from 0 to 1000 ms (1sec max)
+ param motor = 0 or 1 (left or right motor )
+ param power: from 0 to 100
+ param delay: from 0 to 1000 ms (1sec max)
SetFanatecLed(string table) <<<<< DEPRECATED use SetRPMLed()
-param string = name of lua table (default mRPMLedTable)
-set RPM led of Fanatec rim ( see shiftlights.lua script)
+ param string = name of lua table (default mRPMLedTable)
+ set RPM led of Fanatec rim ( see shiftlights.lua script)
SetFanatecGear(gear) <<<<< DEPRECATED use SetGearDigits()
-param string = one char string (i.e. "r" or "n" or "1" ... )
-set the gear value in center of the Fanatec digits panel (see fanatec.lua script)
+ param string = one char string (i.e. "r" or "n" or "1" ... )
+ set the gear value in center of the Fanatec digits panel (see fanatec.lua script)
---------------------------------------------
Logitech Additions:
---------------------------------------------
SetG27Led(int)
-param integer = number, each bit represent one led from 0 to 0x1F
-set leds of G27 device ( see shiftlights.lua script)
+ param integer = number, each bit represent one led from 0 to 0x1F
+ set leds of G27 device ( see shiftlights.lua script)
---------------------------------------------
SetBU0710Led(int)
-param integer = number from 0 to 10
-set leds of BU0710 device ( see shiftlights.lua script)
+ param integer = number from 0 to 10
+ set leds of BU0710 device ( see shiftlights.lua script)
---------------------------------------------
SetGeadDigit(string)
-param string = one char string (i.e. "r" or "n" or "1")
-set gear digit of current targeted SLI device ( see gear.lua script)
+ param string = one char string (i.e. "r" or "n" or "1")
+ set gear digit of current targeted SLI device ( see gear.lua script)
---------------------------------------------
SetRPMLed(string)
-param string = name of lua table (default mRPMLedTable)
-set RPM led of current targeted SLI device, SLI-M or SLI-PRO or SIM RACE Deluxe ( see shiftlights.lua script)
+ param string = name of lua table (default mRPMLedTable)
+ set RPM led of current targeted SLI device, SLI-M or SLI-PRO or SIM RACE Deluxe ( see shiftlights.lua script)
---------------------------------------------
SetWarnLed(idx, val)
-param integer = index of led from 1 to 6
-param integer = value 1 or 0
-set the 6 extra leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
+ param integer = index of led from 1 to 6
+ param integer = value 1 or 0
+ set the 6 extra leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
---------------------------------------------
SetExtLed(idx, val)
-param integer = index of led from 1 to 5
-param integer = value 1 or 0
-set the 5 external leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
+ param integer = index of led from 1 to 5
+ param integer = value 1 or 0
+ set the 5 external leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
---------------------------------------------
SetOSPStatus(boolean)
-param boolean = true or false
-in Optimal ShiftPoints (OSP) Methods compute your own OSP curve and set
-the corresponding OSP state with this function (true or false - see osp.lua script)
+ param boolean = true or false
+ in Optimal ShiftPoints (OSP) Methods compute your own OSP curve and set
+ the corresponding OSP state with this function (true or false - see osp.lua script)
---------------------------------------------
========== SLI-PRO or SIM RACE Deluxe DIGITS PANELs ==========
SetRightDigits(string)
SetLeftDigits(string)
-param string = 6 chars string + delimiter
-set the alpha-numerical text (including the . and : delimiter) to the right
-and left digits (see slipro.lua or simracedlx.lua script)
+ param string = 6 chars string + delimiter
+ set the alpha-numerical text (including the . and : delimiter) to the right
+ and left digits (see slipro.lua or simracedlx.lua script)
---------------------------------------------
SetDigitsAllowed(boolean)
-param boolean = true or false
-by default the 6 + 6 SLI-PRO digits or 4 x 4 SIM RACE Deluxe digits are showed but sometime we need to temporarily
-hide them to set our custom information, pass false to this function to hide digits
-and true to show them again
-
+ param boolean = true or false
+ by default the 6 + 6 SLI-PRO digits or 4 x 4 SIM RACE Deluxe digits are showed but sometime we need to temporarily
+ hide them to set our custom information, pass false to this function to hide digits
+ and true to show them again
---------------------------------------------
SetKeystroke(keycode, delay, modifier, modifier2)
-param string or integer = the key as a string (see the special keycode table below ) or Microsoft VKey code as integer
-param int = the delay from 50 to 1000 ms
-param modifier = SHIFT or CONTROL or ALT or ""
-param optional modifier2 = SHIFT or CONTROL or ALT or ""
-
-SPECIAL KEYCODE TABLE IN ADDITION TO A...Z CHARS:
- BACKSPACE
- DEL
- INSERT
- PRTSCREEN
- END
- HOME
- SCROLL
- PGDOWN
- PGUP
- PAUSE
- UP
- DOWN
- LEFT
- RIGHT
- F1
- F10
- F11
- F12
- F13
- F14
- F15
- F16
- F2
- F3
- F4
- F5
- F6
- F7
- F8
- F9
- NUMLOCK
- NUMPAD0
- NUMPAD1
- NUMPAD2
- NUMPAD3
- NUMPAD4
- NUMPAD5
- NUMPAD6
- NUMPAD7
- NUMPAD8
- NUMPAD9
- ENTER
- ESC
- TAB
- ARROWUP
- ARROWDOWN
- ARROWLEFT
- ARROWRIGHT
-
-Modifier:
-
-SHIFT
-CONTROL
-ALT
+ param string or integer = the key as a string (see the special keycode table below ) or Microsoft VKey code as integer
+ param int = the delay from 50 to 1000 ms
+ param modifier = SHIFT or CONTROL or ALT or ""
+ param optional modifier2 = SHIFT or CONTROL or ALT or ""
+
+ SPECIAL KEYCODE TABLE IN ADDITION TO A...Z CHARS:
+ BACKSPACE
+ DEL
+ INSERT
+ PRTSCREEN
+ END
+ HOME
+ SCROLL
+ PGDOWN
+ PGUP
+ PAUSE
+ UP
+ DOWN
+ LEFT
+ RIGHT
+ F1
+ F10
+ F11
+ F12
+ F13
+ F14
+ F15
+ F16
+ F2
+ F3
+ F4
+ F5
+ F6
+ F7
+ F8
+ F9
+ NUMLOCK
+ NUMPAD0
+ NUMPAD1
+ NUMPAD2
+ NUMPAD3
+ NUMPAD4
+ NUMPAD5
+ NUMPAD6
+ NUMPAD7
+ NUMPAD8
+ NUMPAD9
+ ENTER
+ ESC
+ TAB
+ ARROWUP
+ ARROWDOWN
+ ARROWLEFT
+ ARROWRIGHT
+
+ Modifiers:
+ SHIFT
+ CONTROL
+ ALT
-----------------------------------------------------------------------------------
TelemetryTools(selector, value)
-Param "value" boolean activate or deactivate the function
-Param "selector" (string), this string contains the following value:
-"dumplastlap" if it's activated it creates a telemetry log after each lap
+ Param "value" boolean activate or deactivate the function
+ Param "selector" (string), this string contains the following value:
+ "dumplastlap" if it's activated it creates a telemetry log after each lap
-----------------------------------------------------------------------------------
SLISleep(ms)
@@ -334,6 +332,7 @@ SLISleep(ms)
Force sending report (not recommended)
SLISendReport()
FanatecSendReport() <<<<< DEPRECATED use SLISendReport()
+
-----------------------------------------------------------------------------------
SetGlobalBrightness(int)
@@ -345,38 +344,37 @@ SetTCBrightLevel(int)
---------------------------------------------
SetMaxGear(int)
-param integer = from 4 to 7
-Set the number of gears available
+ param integer = from 4 to 7
+ Set the number of gears available
---------------------------------------------
SetDeltaTimeDelay(int)
-param integer = from 0 to 5000
-set interval to update the display for easy reading of time
-the deltatime delay is in ms (1000 = 1s )
+ param integer = from 0 to 5000
+ set interval to update the display for easy reading of time
+ the deltatime delay is in ms (1000 = 1s )
---------------------------------------------
result = SetSMXGlobal(globalVarName, stringValue)
-param globalVarName = ref name to global
-param stringValue = value (if you want to store a number convert it to string)
-result return = -2 exceed capacity (20 global max); -1 Error; 0 create new record; 1 update new record
+ param globalVarName = ref name to global
+ param stringValue = value (if you want to store a number convert it to string)
+ result return = -2 exceed capacity (20 global max); -1 Error; 0 create new record; 1 update new record
---------------------------------------------
result, stringValue = GetSMXGlobal(globalVarName )
-param globalVarName = ref name to global
-return string in stringValue or empty
-result return = -1 Error; 0 not found; 1 ok
+ param globalVarName = ref name to global
+ return string in stringValue or empty
+ result return = -1 Error; 0 not found; 1 ok
---------------------------------------------
SMXMessageBox(text, title, buttons_style, icon_style)
-param text = message text
-param title (optional) = title of the dialog box
-param buttons_style (optional) = see global.lua or Microsoft MessageBox buttons flags
-param icon_style (optional) = see global.lua or Microsoft MessageBox icon flags
+ param text = message text
+ param title (optional) = title of the dialog box
+ param buttons_style (optional) = see global.lua or Microsoft MessageBox buttons flags
+ param icon_style (optional) = see global.lua or Microsoft MessageBox icon flags
=========================================
functions to get SLI Manager Information
=========================================
-
GetContextInfo("selector")
GetCarInfo("selector")
GetTimeInfo("selector")
@@ -386,235 +384,238 @@ GetDeviceType(deviceID)
-----------------------------------------------------------------------------------
GetContextInfo("selector")
-returns contextual info (internal function)
-Param "selector" (string), this string contains the following value:
-
-IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
-
-"devicelist" return the coma delimited list of current detected devices IDs (included game controllers)
-Reminder regarding device ID: if ID < 40 this is a shiftlight/Digits device; if >=40 this is a game controller
-
-Fanatec additions:
-"bypass" return the state of BYPASS preference (see advanced options panel)
-"fanatecdigitscount" return the number of digits default = 3
-"wheelmotorcount" return the number of wheel motors default = 2
-"cspmotorcount" return the number of Clubsport pedals motors default = 1
-"fanatecwheeltype" return the type of wheel
-"fanatecrimtype" return the type of rim ( BMW = 1; Formula = 2)
-"cspdetected" return true if CSP are present
-"gearshock" return state of GEARSHOCK effect preference (see advanced options panel)
-"gearshockdelay" return the value in ms of GEARSHOCKDELAY preference (see advanced options panel)
-"fanatecdigits" return the current position of digits panel
-"fanatecquickinfo" return the current selected quick-info function
-
-
-"shiftlightsmethod" return current selected method of targeted device
-"ospmethod" return current selected method of targeted device
-"speedlimitermethod" return current selected method of targeted device
-"pitfeedback" return true when car is on pit lane
-"ospcustom" return true if an OSP record to the current car has been found
-"neutral" return ascii code of neutral char (default 'n')
-"reverse" return ascii code of reverse char (default 'r')
-"sessiontype" see here: http://www.eksimracing.com/forum/index.php?topic=891.msg4560#msg4560
-"ticks" return system tick count (int)
-"speedmetric" return display unit true if imperial/MPH and false if metric/KMH
-"simulation" return current simulation name (string) if available
-"paused" return true if simulation is paused if available
-"pluginactive" return 1 if a plugin has been activated
-"pluginready" return true if plugin is ready to send data from simulation
-"devicetype" return current targeted SLI USB device (integer - see also GetDeviceType())
-"tracksize" return current track size (meter) if available
-"lapdistance" return the traveled distance of the car (meter) if available
-"trackame" return current track name if available
-"carname" return current car name if available
-"position" return current car position if available
-"laps" return laps completed (current lap) if available
-"lapscount" return total lap (race) if available
-"partialcount" or "sectorcount" number total of partial time
-"blinktime" blinking delay (default 32)
-"ospblinktime" blinking delay (default 8 )
-"spdlmtrpmledonlyflag" rpm leds only when speedlimiter active? (boolean)
-"noblinkflag" blinking allowed or not? (boolean)
-"limitercharflag" limiter char must be showed? (boolean)
-"ledspeedlimiterindex" return the current speedlimiter index (position) led (default 4 of value from 1 to 6)
-"displaylaptime" lap time need to be showed or not (boolean)
-"quickinfobutton" quick-info button is pressed or not (boolean)
-"quickinfoleft" quick-info left panel index (position) function (integer)
-"quickinforight" quick-info right panel index (position) function (integer)
-"osptracking" osp tracking button activated or not (boolean)
-"ospfactor" current osp factor (float)
-"ospwithfirstgear" osp at first gear allowed (boolean)
-"osplimitrpm" OSP rpm limit, result from my own OSP curve (integer)
-"ospled1" OSP led 1 index (position) (integer)
-"ospled2" OSP led 2 index (position) (integer)
-"yellowflag" return status of flags
-"greenflag"
-"redflag"
-"blueflag"
-"lastgearnorpm" return true if no shiftlights (RPM) on last gear
-"rightdigits" return current position of right panel (int)
-"leftdigits" return current position of left panel (int)
-"globalbrightness" return current global brightness value
-"lowfuel" return low fuel status
-"dumplastlap" return status of telemetry report (true = activated)
-"safetycar" return status of SC (true = ON TRACK ) if available
+ returns contextual info (internal function)
+ Param "selector" (string), this string contains the following value:
+
+ IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
+
+ "devicelist" return the coma delimited list of current detected devices IDs (included game controllers)
+ Reminder regarding device ID: if ID < 40 this is a shiftlight/Digits device; if >=40 this is a game controller
+
+ "shiftlightsmethod" return current selected method of targeted device
+ "ospmethod" return current selected method of targeted device
+ "speedlimitermethod" return current selected method of targeted device
+ "pitfeedback" return true when car is on pit lane
+ "ospcustom" return true if an OSP record to the current car has been found
+ "neutral" return ascii code of neutral char (default 'n')
+ "reverse" return ascii code of reverse char (default 'r')
+ "sessiontype" see here: http://www.eksimracing.com/forum/index.php?topic=891.msg4560#msg4560
+ "ticks" return system tick count (int)
+ "speedmetric" return display unit true if imperial/MPH and false if metric/KMH
+ "simulation" return current simulation name (string) if available
+ "paused" return true if simulation is paused if available
+ "pluginactive" return 1 if a plugin has been activated
+ "pluginready" return true if plugin is ready to send data from simulation
+ "devicetype" return current targeted SLI USB device (integer - see also GetDeviceType())
+ "tracksize" return current track size (meter) if available
+ "lapdistance" return the traveled distance of the car (meter) if available
+ "trackame" return current track name if available
+ "carname" return current car name if available
+ "position" return current car position if available
+ "laps" return laps completed (current lap) if available
+ "lapscount" return total lap (race) if available
+ "partialcount" or "sectorcount" number total of partial time
+ "blinktime" blinking delay (default 32)
+ "ospblinktime" blinking delay (default 8 )
+ "spdlmtrpmledonlyflag" rpm leds only when speedlimiter active? (boolean)
+ "noblinkflag" blinking allowed or not? (boolean)
+ "limitercharflag" limiter char must be showed? (boolean)
+ "ledspeedlimiterindex" return the current speedlimiter index (position) led (default 4 of value from 1 to 6)
+ "displaylaptime" lap time need to be showed or not (boolean)
+ "quickinfobutton" quick-info button is pressed or not (boolean)
+ "quickinfoleft" quick-info left panel index (position) function (integer)
+ "quickinforight" quick-info right panel index (position) function (integer)
+ "osptracking" osp tracking button activated or not (boolean)
+ "ospfactor" current osp factor (float)
+ "ospwithfirstgear" osp at first gear allowed (boolean)
+ "osplimitrpm" OSP rpm limit, result from my own OSP curve (integer)
+ "ospled1" OSP led 1 index (position) (integer)
+ "ospled2" OSP led 2 index (position) (integer)
+ "yellowflag" return status of flags
+ "greenflag"
+ "redflag"
+ "blueflag"
+ "lastgearnorpm" return true if no shiftlights (RPM) on last gear
+ "rightdigits" return current position of right panel (int)
+ "leftdigits" return current position of left panel (int)
+ "globalbrightness" return current global brightness value
+ "lowfuel" return low fuel status
+ "dumplastlap" return status of telemetry report (true = activated)
+ "safetycar" return status of SC (true = ON TRACK ) if available
+
+ Fanatec additions:
+ "bypass" return the state of BYPASS preference (see advanced options panel)
+ "fanatecdigitscount" return the number of digits default = 3
+ "wheelmotorcount" return the number of wheel motors default = 2
+ "cspmotorcount" return the number of Clubsport pedals motors default = 1
+ "fanatecwheeltype" return the type of wheel
+ "fanatecrimtype" return the type of rim ( BMW = 1; Formula = 2)
+ "cspdetected" return true if CSP are present
+ "gearshock" return state of GEARSHOCK effect preference (see advanced options panel)
+ "gearshockdelay" return the value in ms of GEARSHOCKDELAY preference (see advanced options panel)
+ "fanatecdigits" return the current position of digits panel
+ "fanatecquickinfo" return the current selected quick-info function
-----------------------------------------------------------------------------------
GetCarInfo("selector")
-returns car info (internal function)
-Param "selector" (string), this string contains the following value:
-
-IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
-
-"ignition" return the ignition state in rFactor2, 0=off 1=ignition 2=ignition+starter
-"kers" return kers value
-"kers max" return max kers energy
-"drs" return ON or OFF status
-"brakebiais" return current brake biais status
-"rawspeed" return current car speed (meter/sec)
-"speed" return current car speed in kph or mph depending the current display unit (metric or imperial)
-"gear" return current car gear (-1 reverse; 0 = neutral; 1 = gear1,...)
-"maxgear" return the current gear max of engine
-"inpits" car is in pitlane? (integer) 0= on track; 1= pit stall area; 2= Approaching Pits (Pit Road)
-"rpm" return current car rpm (r/mn)
-"redzone" return current max engine rpm
-
-"fuel" return current fuel in tank
-"fuelmax" return the max capacity of fuel tank
-"fuelperlap" return the consumption of fuel during the previous lap, updated after each lap
-"averagefuelperlap" return the average of consumption of fuel during a lap
-"remainlapsintank" get an average consumption of fuel per lap and return the remaining laps
-"fuelatstart" return the fuel in tank at the beginning of each lap
-
-"watertemp" return water engine temp (celsius)
-"oiltemp" return oil engine temp (celsius)
-"sector" return current sector (integer)
-"abs" return abs level (integer)
-"tractioncontrol" return TC level (integer)
-"speedlimiter" return spd lmt status (integer)
-"headlights"
-"overheating"
-"detachedparts" return true if car is damaged
-
-"wheeltempfrontleft", return front left average temp (celsius)
-"wheeltempfrontright", return front right average temp (celsius)
-"wheeltemprearleft", return rear left average temp (celsius)
-"wheeltemprearright", return rear right average temp (celsius)
-
-"wheelpressfrontleft", return front left average pressure (kpa)
-"wheelpressfrontright", return front right average pressure (kpa)
-"wheelpressrearleft", return rear left average pressure (kpa)
-"wheelpressrearright", return rear right pressure (kpa)
-
-"braketempfrontleft", return front left temp (celsius)
-"braketempfrontright", return front right temp (celsius)
-"braketemprearleft", return rear left temp (celsius)
-"braketemprearright", return rear right temp (celsius)
+ returns car info (internal function)
+ Param "selector" (string), this string contains the following value:
+
+ IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
+
+ "ignition" return the ignition state in rFactor2, 0=off 1=ignition 2=ignition+starter
+ "kers" return kers value
+ "kers max" return max kers energy
+ "drs" return ON or OFF status
+ "brakebiais" return current brake biais status
+ "rawspeed" return current car speed (meter/sec)
+ "speed" return current car speed in kph or mph depending the current display unit (metric or imperial)
+ "gear" return current car gear (-1 reverse; 0 = neutral; 1 = gear1,...)
+ "maxgear" return the current gear max of engine
+ "inpits" car is in pitlane? (integer) 0= on track; 1= pit stall area; 2= Approaching Pits (Pit Road)
+ "rpm" return current car rpm (r/mn)
+ "redzone" return current max engine rpm
+
+ "fuel" return current fuel in tank
+ "fuelmax" return the max capacity of fuel tank
+ "fuelperlap" return the consumption of fuel during the previous lap, updated after each lap
+ "averagefuelperlap" return the average of consumption of fuel during a lap
+ "remainlapsintank" get an average consumption of fuel per lap and return the remaining laps
+ "fuelatstart" return the fuel in tank at the beginning of each lap
+
+ "watertemp" return water engine temp (celsius)
+ "oiltemp" return oil engine temp (celsius)
+ "sector" return current sector (integer)
+ "abs" return abs level (integer)
+ "tractioncontrol" return TC level (integer)
+ "speedlimiter" return spd lmt status (integer)
+ "headlights"
+ "overheating"
+ "detachedparts" return true if car is damaged
+
+ "wheeltempfrontleft", return front left average temp (celsius)
+ "wheeltempfrontright", return front right average temp (celsius)
+ "wheeltemprearleft", return rear left average temp (celsius)
+ "wheeltemprearright", return rear right average temp (celsius)
+
+ "wheelpressfrontleft", return front left average pressure (kpa)
+ "wheelpressfrontright", return front right average pressure (kpa)
+ "wheelpressrearleft", return rear left average pressure (kpa)
+ "wheelpressrearright", return rear right pressure (kpa)
+
+ "braketempfrontleft", return front left temp (celsius)
+ "braketempfrontright", return front right temp (celsius)
+ "braketemprearleft", return rear left temp (celsius)
+ "braketemprearright", return rear right temp (celsius)
-----------------------------------------------------------------------------------
GetTimeInfo("selector")
-returns time info (internal function)
-Param "selector" (string), this string contains the following value:
-return float value
-
-IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
-
-"laptime" return current lap time if available
-"bestlaptime" return best lap time if available
-"lastlaptime" return last lap time if available
-"realdifftimeready" return true when telemetry data of at least one lap has been collected if available
-"realdiffbest" return real-time diff (delta) vs best if available
-"realdifflast" return real-time diff (delta) vs last if available
-"sector1" return current sector 1 if available
-"sector2" return current sector 2 if available
-"sector3" return current sector 2 if available
-"bestsector1" return best sector 1 if available
-"bestsector2" return best sector 2 if available
-"bestsector3" return best sector 2 if available
-"lastsector1" return last sector 1 if available
-"lastsector2" return last sector 2 if available
-"lastsector3" return last sector 2 if available
-"timeremaining" return session time remaining if available
-"systemtime" return current PC time if available
+ returns time info (internal function)
+ Param "selector" (string), this string contains the following value:
+ return float value
+
+ IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
+
+ "laptime" return current lap time if available
+ "bestlaptime" return best lap time if available
+ "lastlaptime" return last lap time if available
+ "realdifftimeready" return true when telemetry data of at least one lap has been collected if available
+ "realdiffbest" return real-time diff (delta) vs best if available
+ "realdifflast" return real-time diff (delta) vs last if available
+
+ "sector1" return current sector 1 if available
+ "sector2" return current sector 2 if available
+ "sector3" return current sector 3 if available
+
+ "bestsector1" return best sector 1 (rFactor: sector 1 of best lap) if available
+ "bestsector2" return best sector 2 (rFactor: sector 2 of best lap) if available
+ "bestsector3" return best sector 3 (rFactor: sector 3 of best lap) if available
+
+ "lastsector1" return last sector 1 if available
+ "lastsector2" return last sector 2 if available
+ "lastsector3" return last sector 3 if available
+
+ "timeremaining" return session time remaining if available
+ "systemtime" return current PC time if available
-----------------------------------------------------------------------------------
GetPartialTimeInfo("selector", index)
-returns partial time info of iRacing Simulation
-(internal function)
-Param index (number) contains the targeted sector
-Param "selector" (string), contains the following value:
-return float value
-see GetContextInfo() to get the total number of partials
-
-IMPORTANT ** THESE VALUES ARE AVAILABLE ONLY IN IRACING SIMULATIONS ** IMPORTANT
-
-"currentpartial" return current partial time if available
-"vsbestlap" return best partial time of this sector if available
-"vsoptimallap" return optimal partial time of this sector if available
-"vssessionbestlap" return session best partial time of this sector
-"vsoptimalsector" return session optimal partial time of this sector
-"vssessionoptimallap" return diff from session optimal if available
-"vssessionoptimalsector" return diff from optimal if available
+ returns partial time info of iRacing Simulation
+ (internal function)
+ Param index (number) contains the targeted sector
+ Param "selector" (string), contains the following value:
+ return float value
+ see GetContextInfo() to get the total number of partials
+
+ IMPORTANT ** THESE VALUES ARE AVAILABLE ONLY IN IRACING SIMULATIONS ** IMPORTANT
+
+ "currentpartial" return current partial time if available
+ "vsbestlap" return best partial time of this sector if available
+ "vsoptimallap" return optimal partial time of this sector if available
+ "vssessionbestlap" return session best partial time of this sector
+ "vsoptimalsector" return session optimal partial time of this sector
+ "vssessionoptimallap" return diff from session optimal if available
+ "vssessionoptimalsector" return diff from optimal if available
-----------------------------------------------------------------------------------
IsSLIFunction("selector", function_index)
-returns boolean
-(internal function)
-return boolean value, true if function name matches the function index
-Param index (number) contains the targeted function index returned by controlsEvent()
-Param "selector" (string), contains the following value:
-see controls.lua scripts for more info.
-
-"fanatecdigits"
-"brightness"
-"quickinfo"
-"speedmetric"
-"lastgearnorpm"
-"osptracking"
-"safeprefs"
-"laptimedelay"
-"blinktime"
-"lowfuel"
-"speedlimitermethod"
-"shiftlights"
-"ospmethod"
-"rightdigits"
-"leftdigits"
-"ospfactor"
-"drivingsetup"
-"maxgear"
+ returns boolean
+ (internal function)
+ return boolean value, true if function name matches the function index
+ Param index (number) contains the targeted function index returned by controlsEvent()
+ Param "selector" (string), contains the following value:
+ see controls.lua scripts for more info.
+
+ "fanatecdigits"
+ "brightness"
+ "quickinfo"
+ "speedmetric"
+ "lastgearnorpm"
+ "osptracking"
+ "safeprefs"
+ "laptimedelay"
+ "blinktime"
+ "lowfuel"
+ "speedlimitermethod"
+ "shiftlights"
+ "ospmethod"
+ "rightdigits"
+ "leftdigits"
+ "ospfactor"
+ "drivingsetup"
+ "maxgear"
-----------------------------------------------------------------------------------
GetDeviceType(deviceID)
-returns the corresponding name of device ID
-Param deviceID (integer)
-return string value
+ returns the corresponding name of device ID
+ Param deviceID (integer)
+ return string value
-----------------------------------------------------------------------------------
GetLedIndex("selector")
-returns the corresponding index of the led
-Param led function (string) see the list below
-return integer value
-
-"speedlimiter"
-"osp1"
-"osp2"
-"lowfuel"
-"tractioncontrol"
-"abs"
-"greenflag"
-"yellowflag"
-"redflag"
-"overheating"
-"damage"
-"pitrequest"
-"power"
-"revlimit"
-"headlights"
-"blueflag"
-"drs"
-"safeprefs"
-"drslegal"
+ returns the corresponding index of the led
+ Param led function (string) see the list below
+ return integer value
+
+ "speedlimiter"
+ "osp1"
+ "osp2"
+ "lowfuel"
+ "tractioncontrol"
+ "abs"
+ "greenflag"
+ "yellowflag"
+ "redflag"
+ "overheating"
+ "damage"
+ "pitrequest"
+ "power"
+ "revlimit"
+ "headlights"
+ "blueflag"
+ "drs"
+ "safeprefs"
+ "drslegal"
===============================
Script Developpment