From 17ef33a3fc62a31565193320f1f5583077403b19 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 15 Nov 2013 10:09:12 +0100 Subject: SliMax Manager 3.++ --- scripts/global_custom_scripts.lua | 103 +++++++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 29 deletions(-) mode change 100755 => 100644 scripts/global_custom_scripts.lua (limited to 'scripts/global_custom_scripts.lua') diff --git a/scripts/global_custom_scripts.lua b/scripts/global_custom_scripts.lua old mode 100755 new mode 100644 index 752dce5..bbf5e8b --- a/scripts/global_custom_scripts.lua +++ b/scripts/global_custom_scripts.lua @@ -1,6 +1,6 @@ --- Global Custom SLIMax Manager Scripts v3 +-- Global Custom SLIMax Manager Scripts v3.6 -- Copyright ©2012-2013 by Zappadoc - All Rights Reserved. --- last change by Zappadoc - 2013-02 +-- last change by Zappadoc - 2013-09 -- add you global custom functions and globals variables here -- patch the std SLIMax Events with your global custom scripts if needed @@ -25,26 +25,36 @@ -- ================================ -- custom functions - +function _DebugCarInfo(deviceType) + -- see debug console window + -- get car name + local dev = GetDeviceType(deviceType) + local cNm = "NA" --GetContextInfo("carname") + local mxG = GetCarInfo("maxgear") + local rdz = GetCarInfo("redzone") + local ospf = GetContextInfo("ospfactor") + print("\n----------\nDevice:"..dev.."\nMax RPM (Red Zone):" .. rdz .. "\nMaxGear:" .. mxG .. "\nOSP Factor:" .. ospf .. "\n"); +end -- ================================ -- custom events -function global_custom_controlsEvent(devType, ctrlType, ctrlPos, value, funcIndex) +function global_custom_controlsEvent(deviceType, ctrlType, ctrlPos, value, funcIndex, targetDevice) -- type your custom controls script here (manage buttons, switches and encoders) return 2 end -function global_custom_deviceReport(devType) +function global_custom_deviceReport(deviceType) -- type your script here (just before sending report to the device ) return 2 end -function global_custom_enterSessionEvent(devType) +function global_custom_enterSessionEvent(deviceType) -- type your custom script on session start, here + _DebugCarInfo(deviceType) return 2 end -function global_custom_exitSessionEvent(devType) +function global_custom_exitSessionEvent(deviceType) -- type your custom script on session ending, here return 2 end @@ -83,6 +93,9 @@ function global_custom_spdLmtMethodEvent(idx) return 2 end +-- ================================ +-- SIM RACE Deluxe, SLI-PRO, SLI-M, BU0710 SUPPORT + function global_custom_gearEvent(gear) -- type your custom gear event script here return 2 @@ -139,27 +152,59 @@ function global_custom_gearFanatecEvent(gear) return 2 end + -- ================================ --- local custom events PLACEHOLDERS --- DO NOT CHANGE THE SCRIPT BELOW +-- SIM RACE DELUXE SUPPORT + +function global_custom_shiftLightsSRDlxMethodEvent(idx) + -- type your custom script related to right SLI-PRO digits panel here + return 2 +end + +function global_custom_srdlxLeftDigitsEvent(swPosition) + -- type your custom script related to left SLI-PRO digits panel here + return 2 +end + +function global_custom_srdlxRightDigitsEvent(swPosition) + -- type your custom script related to right SLI-PRO digits panel here + return 2 +end + +function global_custom_ospSRDlxMethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here + return 2 +end + +function global_custom_spdLmtSRDlxMethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here + return 2 +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 +-- SIM RACE F1 SUPPORT + +function global_custom_shiftLightsSRF1MethodEvent(idx) + -- type your custom script related to right SLI-PRO digits panel here + return 2 +end + +function global_custom_srf1LeftDigitsEvent(swPosition) + -- type your custom script related to left SLI-PRO digits panel here + return 2 +end + +function global_custom_srf1RightDigitsEvent(swPosition) + -- type your custom script related to right SLI-PRO digits panel here + return 2 +end + +function global_custom_ospSRF1MethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here + return 2 +end + +function global_custom_spdLmtSRF1MethodEvent(idx) + -- type your custom Optimal Shift Points (OSP) method here + return 2 +end \ No newline at end of file -- cgit v1.2.3