summaryrefslogtreecommitdiff
path: root/tricks/k2000_test.lua
blob: 2ac27f9e4946351864686aeaf7ac619e4306dd9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function global_custom_enterSessionEvent(devType)
 
    Marquee( GetContextInfo("carname") , 50 )
 
    -- trying to play with Ext/Warn LEDS
    -- 1 to activate, then 0 to deactivate
    for j = 1,0 do
        -- i will set/unset outtermost leds, then innermost leds recursively, to get a funny 'K2000' behaviour. <img src="http://www.eksimracing.com/forum/Smileys/default/wink.gif" alt=";)" title="Wink" class="smiley" border="0">
        for i = 0,2 do
 
            -- outter most, from left
            SetWarnLed(1+i, j)
            -- outter most from right
            SetWarnLed(6-i, j)
 
            -- same as above, with external leds (yeah, with i=2, the SAME led will be set twice. That’s not a problem)
            SetExtLed(1+i, j)
            SetExtLed(5-i, j)
 
            -- The following doesn’t change anything to led status... they are definitely OFF ...
            SLISendReport(1)
            SLISleep(200)
        end
    end
 
    -- same trick with RPMleds
    for j = 1, 0 do
        for i = 0, 6 do
            led = led.format("RPM%d",   i)
            mRPMLedTable[led] = j
            led = led.format("RPM%d",12-i)
            mRPMLedTable[led] = j
            SetRPMLed("mRPMLedTable")
            SLISendReport(1)
            SLISleep(200)
        end
    end
 
    return 1
end