summaryrefslogtreecommitdiff
path: root/scripts/global_custom_scripts.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/global_custom_scripts.lua')
-rwxr-xr-xscripts/global_custom_scripts.lua40
1 files changed, 8 insertions, 32 deletions
diff --git a/scripts/global_custom_scripts.lua b/scripts/global_custom_scripts.lua
index 9c2d337..ff2fef7 100755
--- a/scripts/global_custom_scripts.lua
+++ b/scripts/global_custom_scripts.lua
@@ -77,29 +77,21 @@ function global_custom_spdLmtMethodEvent(idx)
end
function global_custom_gearEvent(gear)
- -- type your custom gear event script here
- -- check if gear == 'E' (see ascii table )
+
if gear == 69 then
- -- toggle OFF in this example
- toggleAllLed(0)
+ --toggleAllLed(0)
- -- control gear digit display
SetGearDigit(GetCurrentGear())
- -- 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 )
-- refresh SLI board
SLISendReport(1)
- -- return 1 to bypass std behavior
return 1
end
@@ -107,8 +99,8 @@ function global_custom_gearEvent(gear)
end
function global_custom_enterSessionEvent(devType)
- initLedTable(mRPMLedTable,0)
- SetRPMLed("mRPMLedTable")
+
+ Marquee( GetContextInfo("carname") , 50 )
for j = 1, 0 do
for i = 0, 6 do
@@ -117,6 +109,7 @@ function global_custom_enterSessionEvent(devType)
led = led.format("RPM%d",12-i)
mRPMLedTable[led] = j
SetRPMLed("mRPMLedTable")
+ SLISendReport(1)
SLISleep(200)
end
end
@@ -127,40 +120,23 @@ function global_custom_enterSessionEvent(devType)
SetWarnLed(6-i, j)
SetExtLed(1+i, j)
SetExtLed(5-i, j)
+ SLISendReport(1)
SLISleep(200)
end
end
+ SetDigitsAllowed(true)
return 1
end
function global_custom_exitSessionEvent(devType)
- -- type your custom script on session ending, here
- local ldigits = " exit "
- SetLeftDigits( ldigits )
- local rdigits = " exit "
- SetRightDigits( rdigits )
- -- refresh SLI board
- SLISendReport(1)
+ Marquee( "exit" , 50 )
return 1
end
function global_custom_ledEvent(idx, ledFunction, state)
- -- bypass for power led --
- if ledFunction == 10
- then
- if mPowerLED > 0
- then
- if mPowerLED > 6
- then
- setExtLed(mPowerLED - 6, state)
- else
- setWarnLed(mPowerLED, state)
- end
- -- continue
- end
return 2
end