From 43da8901ecb4511b44deb06351d96b786cd418e1 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 13 Feb 2013 17:13:16 +0100 Subject: [scripts] global: get gear even when engine/ignition is Off --- scripts/global_custom_scripts.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/global_custom_scripts.lua b/scripts/global_custom_scripts.lua index c39db3e..fcdfcf7 100755 --- a/scripts/global_custom_scripts.lua +++ b/scripts/global_custom_scripts.lua @@ -71,7 +71,32 @@ function global_custom_spdLmtMethodEvent(idx) end function global_custom_gearEvent(gear) - -- type your custom script related to gear here + -- 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) + + -- 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 + return 2 end -- cgit v1.2.3