summaryrefslogtreecommitdiff
path: root/tricks/k2000_test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tricks/k2000_test.lua')
-rw-r--r--tricks/k2000_test.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/tricks/k2000_test.lua b/tricks/k2000_test.lua
new file mode 100644
index 0000000..2ac27f9
--- /dev/null
+++ b/tricks/k2000_test.lua
@@ -0,0 +1,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