summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-03-01 10:19:34 +0100
committerHugues Hiegel <hugues@hiegel.fr>2013-03-01 10:32:24 +0100
commit51993d8213578b0cb4d0c57cc1f86f6ed92bbdba (patch)
tree330afa2a15d6be7a3acfe61b81f08bc959d066c4
parent6ea53840c9cb9b99c41fbb4d87a1acac8c0889e5 (diff)
SLI-Pro Gus.
-rwxr-xr-xscripts/slipro_gus.lua211
-rwxr-xr-xslipro_gus.sli20
2 files changed, 221 insertions, 10 deletions
diff --git a/scripts/slipro_gus.lua b/scripts/slipro_gus.lua
new file mode 100755
index 0000000..cd281d6
--- /dev/null
+++ b/scripts/slipro_gus.lua
@@ -0,0 +1,211 @@
+-- Custom SLIMax Manager Scripts v3
+-- Copyright ©2012-2013 by Zappadoc - All Rights Reserved.
+-- last change by Zappadoc - 2013-02
+
+-- add you global custom functions and globals variables here
+-- patch the std SLIMax Events with your global custom scripts if needed
+-- see the scripting section of the forum for more info...
+
+-- IMPORTANT:
+-- this script will not be deleted by uninstalling the software
+
+-- ================================
+-- CONSTANTS
+
+
+-- ================================
+-- additional lua extension module dll
+
+
+-- ================================
+-- additional scripts file ( use 'require' statement )
+
+-- ================================
+-- custom globals
+mGugusse_Ignition = 0
+
+-- ================================
+-- custom functions
+
+-- ================================
+-- custom events
+
+function global_custom_controlsEvent(devType, ctrlType, ctrlPos, value, funcIndex)
+ -- type your custom controls script here (manage buttons, switches and encoders)
+ return 2
+end
+
+function global_custom_deviceReport(devType)
+ -- type your script here (just before sending report to the device )
+ return 2
+end
+
+function global_custom_enterSessionEvent(devType)
+ -- type your custom script on session start, here
+ print ()
+ print ( "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv")
+ print (string.format("simu : %s",GetContextInfo("simulation")))
+ print (string.format("car : %s",GetContextInfo("carname")))
+ print (string.format("track : %s",GetContextInfo("trackname")))
+ --print (string.format("session: %s",GetContextInfo("session")))
+ print ()
+ if GetContextInfo("ospcustom") then print ("has ospcustom") end
+ print (string.format("shiftlightsmethod: %s",GetContextInfo("shiftlightsmethod")))
+ print (string.format("ospmethod : %s",GetContextInfo("ospmethod")))
+ print (string.format("speedlimitemethod: %s",GetContextInfo("speedlimitermethod")))
+ return 2
+end
+
+function global_custom_exitSessionEvent(devType)
+ -- type your custom script on session ending, here
+ if GetContextInfo("ospcustom") then print ("has ospcustom") end
+ print ()
+ print (string.format("shiftlightsmethod: %s",GetContextInfo("shiftlightsmethod")))
+ print (string.format("ospmethod : %s",GetContextInfo("ospmethod")))
+ print (string.format("speedlimitemethod: %s",GetContextInfo("speedlimitermethod")))
+ print ( "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
+ print ()
+ return 2
+end
+
+
+-- ================================
+-- SLI-PRO, SLI-M, BU0710 SUPPORT
+
+function global_custom_ospMethodEvent(idx)
+ -- type your custom Optimal Shift Points (OSP) method here
+ return 2
+end
+
+function global_custom_shiftLightsMethodEvent(idx)
+ -- type your custom shiftlights method here
+ return 2
+end
+
+function global_custom_shiftLightsBU0710Event(idx)
+ -- type your custom shiftlights method for BU0710 device only here
+ return 2
+end
+
+function global_custom_leftDigitsEvent(swPosition)
+ -- type your custom script related to left SLI-PRO digits panel here
+ return 2
+end
+
+function global_custom_rightDigitsEvent(swPosition)
+ -- type your custom script related to right SLI-PRO digits panel here
+ return 2
+end
+
+function global_custom_spdLmtMethodEvent(idx)
+ -- type your custom speedlimiter method here
+ return 2
+end
+
+function global_custom_gearEvent(gear)
+ -- manage gear when ŽEŽ
+ if gear == 69 then
+ local update = 0
+
+ if mGugusseIgnition == 1 then
+ mGugusseIgnition = 0
+
+ SetLeftDigits(" ")
+ SetRightDigits(" ")
+ toggleAllLed(0)
+
+ update = 1
+ end
+
+ local g = GetCarInfo("gear")
+ if oldGear == 0 or oldGear ~= g then
+ oldGear = g
+
+ SetGearDigit(GetCurrentGear())
+
+ update = 1
+ end
+
+ if update ~= 0 then SLISendReport(1) end
+ return 1
+ end
+
+ mGugusseIgnition = 1
+ return 2
+end
+
+function global_custom_ledEvent(idx, ledFunction, state)
+ -- type your custom script on session ending, here
+ return 2
+end
+
+-- ================================
+-- LOGITECH G27 SUPPORT
+
+function global_custom_shiftLightsG27LedsMethodEvent(idx)
+ -- type your custom shiftlights method for G27 device only here
+ return 2
+end
+
+function global_custom_ospG27MethodEvent(idx)
+ -- type your custom Optimal Shift Points (OSP) method here
+ return 2
+end
+
+function global_custom_spdLmtG27MethodEvent(idx)
+ -- type your custom speedlimiter method here
+ return 2
+end
+
+-- ================================
+-- FANATEC WHEELS SUPPORT
+
+function global_custom_shiftLightsFanatecMethodEvent(idx)
+ -- type your custom shiftlights method for Fanatec device only here
+ return 2
+end
+
+function global_custom_fanatecDigitsEvent(swPosition)
+ -- type your custom script related to Fanatec digits panel here
+ return 2
+end
+
+function global_custom_ospFanatecMethodEvent(idx)
+ -- type your custom Optimal Shift Points (OSP) method here
+ return 2
+end
+
+function global_custom_spdLmtFanatecMethodEvent(idx)
+ -- type your custom Optimal Shift Points (OSP) method here
+ return 2
+end
+
+function global_custom_gearFanatecEvent(gear)
+ -- type your custom gear event script here
+ return 2
+end
+
+-- ================================
+-- local custom events PLACEHOLDERS
+-- DO NOT CHANGE THE SCRIPT BELOW
+-- ================================
+function custom_controlsEvent(deviceIdx, ctrlType, ctrlPos, value, funcIndex) return 2 end
+function custom_deviceReport(devType) return 2 end
+function custom_ospMethodEvent(idx) return 2 end
+function custom_ospG27MethodEvent(idx) return 2 end
+function custom_ospFanatecMethodEvent(idx) return 2 end
+function custom_shiftLightsMethodEvent(idx) return 2 end
+function custom_shiftLightsBU0710Event(idx) return 2 end
+function custom_shiftLightsG27LedsMethodEvent(idx) return 2 end
+function custom_shiftLightsFanatecMethodEvent(idx) return 2 end
+function custom_leftDigitsEvent(swPosition) return 2 end
+function custom_rightDigitsEvent(swPosition) return 2 end
+function custom_fanatecDigitsEvent(swPosition) return 2 end
+function custom_spdLmtMethodEvent(idx) return 2 end
+function custom_spdLmtG27MethodEvent(idx) return 2 end
+function custom_spdLmtFanatecMethodEvent(idx) return 2 end
+function custom_gearEvent(gear) return 2 end
+function custom_gearFanatecEvent(gear) return 2 end
+function custom_enterSessionEvent(devType) return 2 end
+function custom_exitSessionEvent(devType) return 2 end
+function custom_ledEvent(idx, ledFunction, state) return 2 end
diff --git a/slipro_gus.sli b/slipro_gus.sli
index 64762a6..188f74c 100755
--- a/slipro_gus.sli
+++ b/slipro_gus.sli
@@ -2,19 +2,19 @@
<settings version="SLIPREFS02" flag="4" value=" " info="SLI-PRO Default Settings #~http://www.eksimracing.com">
<GENERAL info="Common device options" flag="15">
<REVERSE flag="15" value="r" info="choose the reverse char (* for blank char)"/>
- <NEUTRAL flag="15" value="-" info="choose the neutral char (* for blank char)"/>
+ <NEUTRAL flag="15" info="choose the neutral char (* for blank char)" value="-"/>
</GENERAL>
<SLIPRO info="SLI-PRO device options" flag="4">
<HELP flag="4" value=" " info="Define the default value for speed-limiter method, left and right panel function, max left and right functions, Quick-Info left and right function"/>
<SPDLMTMETHOD flag="6" info="SPD LMT Methods functions are defined in speedlimiter.lua script. Enter a value from 0 to 5 (default 3)" value="1"/>
<SPDLMTRPMLEDONLY flag="6" value="false" info="Enter true if you want to blink the RPM led without the speedlimiter led when speedlimiter is activated."/>
- <LEFTDIGITSPANELS flag="4" info="Double-Click 'LEFTDIGITSPANELS' tag to assign left panel functions and apply your change. These functions are defined in slipro.lua script#~Custom Script can change the default behavior.#~These Functions ARE Not Available In All Simulation/Game" value="5,1,3,4,2,6,7,8"/>
- <RIGHTDIGITSPANELS flag="4" info="Double-Click 'RIGHTDIGITSPANELS' tag to assign right panel functions (time related functions) and apply your change. These functions are defined in slipro.lua script#~Custom Script can change the default behavior.#~These Functions ARE Not Available In All Simulation/Game" value="1,3,2,11,27,22,23,20"/>
- <QIFUNCTIONLEFT flag="6" value="3" info="Enter the corresponding function number (0 to deactivate) to show the info on left digits while you keep the button assigned to QIButton pressed (see the functions list in the slipro.lua script or by editing LEFTDIGITSPANELS tag)."/>
- <QIFUNCTIONRIGHT flag="6" value="3" info="Enter the corresponding function number (0 to deactivate) to show the info on right digits while you keep the button assigned to QIButton pressed (see the functions list in slipro.lua script or by editing RIGHTDIGITSPANELS tag)."/>
+ <LEFTDIGITSPANELS flag="4" info="Double-Click 'LEFTDIGITSPANELS' tag to assign left panel functions and apply your change. These functions are defined in slipro.lua script#~Custom Script can change the default behavior.#~These Functions ARE Not Available In All Simulation/Game" value="23,1,2,3,4,5,7,8,6"/>
+ <RIGHTDIGITSPANELS flag="4" info="Double-Click 'RIGHTDIGITSPANELS' tag to assign right panel functions (time related functions) and apply your change. These functions are defined in slipro.lua script#~Custom Script can change the default behavior.#~These Functions ARE Not Available In All Simulation/Game" value="1,2,11,3,12,21,27"/>
+ <QIFUNCTIONLEFT flag="6" info="Enter the corresponding function number (0 to deactivate) to show the info on left digits while you keep the button assigned to QIButton pressed (see the functions list in the slipro.lua script or by editing LEFTDIGITSPANELS tag)." value="6"/>
+ <QIFUNCTIONRIGHT flag="6" info="Enter the corresponding function number (0 to deactivate) to show the info on right digits while you keep the button assigned to QIButton pressed (see the functions list in slipro.lua script or by editing RIGHTDIGITSPANELS tag)." value="21"/>
<BUTTONSCHARSMAPPING flag="38" value="false" info="Buttons from 1 to 16: Activate (true) or deactivate (false) button mapping to char function"/>
<BTNCHARLIST flag="38" value="NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" info="Map each button to char (from button 1 to 16)"/>
- <SW3CHARSMAPPING value="false" flag="38" info="Switch 3: Activate (true) or deactivate (false) switch mapping to char function"/>
+ <SW3CHARSMAPPING flag="38" info="Switch 3: Activate (true) or deactivate (false) switch mapping to char function" value="false"/>
<SW3CHARS value="NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" flag="38" info="set each position of switch to map it to char (up to 12 mapping per switch)"/>
<SW4CHARSMAPPING value="false" flag="38" info="Switch 4: Activate (true) or deactivate (false) switch mapping to char function"/>
<SW4CHARS value="NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA" flag="38" info="set each position of switch to map it to char (up to 12 mapping per switch)"/>
@@ -70,14 +70,14 @@
</SHIFTLIGHTS>
<BRIGHTNESS info="Global and indivudual brightness options" flag="6">
<MAXBRIGHTNESS flag="6" value="145" info="Calibrate your device brightness by adjusting the maximum brightness value from 128 to 220 (default 145 for SLI-PRO).#~To calibrate your device, Choose the Test Device... menu and check if the device do not reset by itself during the testing process, if it does, decrease the maximum value."/>
- <GLOBALBRIGHTNESS flag="6" value="0" info="GLOBAL BRIGHTNESS from 1 to 100%, (default 98%), use an encoder (2 inputs) to decrease or increase brightness."/>
+ <GLOBALBRIGHTNESS flag="6" info="GLOBAL BRIGHTNESS from 1 to 100%, (default 98%), use an encoder (2 inputs) to decrease or increase brightness." value="0"/>
<BRIGHTSTEP flag="6" value="10" info="Set the step for brightness adjustment (default 10)"/>
<TCBRIGHTNESS value="6" info="Max TC brightness from 3 to 8 (Default 6)" flag="6"/>
<ABSBRIGHTNESS value="6" info="Max ABS brightness from 3 to 8 (Default 6)" flag="6"/>
- <RPMBRIGHTNESS flag="6" value="1,1,1,1,8,8,8,8,8,1,1,1,1" info="Individual brightness for shiftlights, for all 13 leds #~set the value of each led from 1 to 8"/>
- <EXTRABRIGHTNESS flag="6" value="5,7,7,7,7,5" info="Individual brightness for the 6 extra leds #~set the value of each led from 1 to 8"/>
+ <RPMBRIGHTNESS flag="6" info="Individual brightness for shiftlights, for all 13 leds #~set the value of each led from 1 to 8" value="1,1,1,1,8,8,8,8,8,4,4,4,4"/>
+ <EXTRABRIGHTNESS flag="6" info="Individual brightness for the 6 extra leds #~set the value of each led from 1 to 8" value="8,7,7,7,5,8"/>
<EXTERNALBRIGHTNESS value="7,7,7,7,7" info="Individual brightness for the 5 external leds #~set the value of each led from 1 to 8" flag="6"/>
- <GEARDIGITBRIGHTNESS info="Individual Digits brightness from 1 to 8" flag="6" value="7"/>
+ <GEARDIGITBRIGHTNESS info="Individual Digits brightness from 1 to 8" flag="6" value="8"/>
<TIMEDIGITBRIGHTNESS info="Individual Digits brightness from 1 to 8" flag="4" value="7"/>
<SPEEDDIGITBRIGHTNESS flag="4" value="8" info="Individual Digits brightness from 1 to 8"/>
</BRIGHTNESS>