From 2a02bb7ee34d426afe2e974067c4a9ea470c3753 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 12 Feb 2013 05:20:35 +0100 Subject: Test de Marquee --- scripts/global_custom_scripts.lua | 40 ++++++++------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) (limited to 'scripts/global_custom_scripts.lua') 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 -- cgit v1.2.3