From 6ea53840c9cb9b99c41fbb4d87a1acac8c0889e5 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 1 Mar 2013 10:19:54 +0100 Subject: SLIMaxMgr III beta --- scripts/global_custom_scripts.lua | 97 ++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 33 deletions(-) (limited to 'scripts/global_custom_scripts.lua') diff --git a/scripts/global_custom_scripts.lua b/scripts/global_custom_scripts.lua index fcdfcf7..752dce5 100755 --- a/scripts/global_custom_scripts.lua +++ b/scripts/global_custom_scripts.lua @@ -1,6 +1,6 @@ --- Global Custom SLIMax Manager Scripts v2.2 --- Copyright ©2011-2013 by Zappadoc - All Rights Reserved. --- last change by Zappadoc - 2012-11 +-- Global 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 @@ -18,19 +18,18 @@ -- ================================ --- additional scripts file +-- additional scripts file ( use 'require' statement ) -- ================================ -- custom globals - -- ================================ -- custom functions -- ================================ -- custom events -function global_custom_controlsEvent(deviceIdx, ctrlType, ctrlPos, value, funcIndex) +function global_custom_controlsEvent(devType, ctrlType, ctrlPos, value, funcIndex) -- type your custom controls script here (manage buttons, switches and encoders) return 2 end @@ -40,13 +39,27 @@ function global_custom_deviceReport(devType) return 2 end +function global_custom_enterSessionEvent(devType) + -- type your custom script on session start, here + return 2 +end + +function global_custom_exitSessionEvent(devType) + -- type your custom script on session ending, here + 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 + -- type your custom shiftlights method here return 2 end @@ -66,55 +79,65 @@ function global_custom_rightDigitsEvent(swPosition) end function global_custom_spdLmtMethodEvent(idx) - -- type your custom script related to speed limiter here + -- type your custom speedlimiter method here return 2 end function global_custom_gearEvent(gear) -- type your custom gear event script here - -- check if gear == 'E' (see ascii table ) - if gear == 69 then + return 2 +end - -- toggle OFF in this example - toggleAllLed(0) +function global_custom_ledEvent(idx, ledFunction, state) + -- type your custom script on session ending, here + return 2 +end - -- control gear digit display - SetGearDigit(GetCurrentGear()) +-- ================================ +-- LOGITECH G27 SUPPORT - -- control left panel (6 chars max) - -- nothing display in this example - local ldigits = " " - SetLeftDigits( ldigits ) - -- control right panel (6 chars max) - -- nothing display in this example - local rdigits = " " - SetRightDigits( rdigits ) +function global_custom_shiftLightsG27LedsMethodEvent(idx) + -- type your custom shiftlights method for G27 device only here + return 2 +end - -- refresh SLI board - SLISendReport(1) +function global_custom_ospG27MethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here + return 2 +end - -- return 1 to bypass std behavior - return 1 - 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_enterSessionEvent(devType) - -- type your custom script related to session start here +function global_custom_fanatecDigitsEvent(swPosition) + -- type your custom script related to Fanatec digits panel here return 2 end -function global_custom_exitSessionEvent(devType) - -- type your custom script related to session stop here +function global_custom_ospFanatecMethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here return 2 end -function global_custom_ledEvent(idx, ledFunction, state) - -- type your custom script related to LEDs here +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 @@ -123,12 +146,20 @@ end 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 -- cgit v1.2.3