From 19d68837528e52a2facd61c86129e3201b59cce6 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 18 Nov 2013 12:46:59 +0100 Subject: [Gugus] Gear : ignition/starter tests. --- scripts/gugus/gear.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/gugus/gear.lua b/scripts/gugus/gear.lua index 1f72d4b..57820e6 100644 --- a/scripts/gugus/gear.lua +++ b/scripts/gugus/gear.lua @@ -1,24 +1,27 @@ + function custom_gearEvent(gear) -- manage gear when ´E´ if gear == 69 then - local ignition = 1 - if GetContextInfo("simulation") == "rFactor2.exe" then - ignition = GetCarInfo("ignition") - end + local ignition = GetCarInfo("ignition") local g = GetCarInfo("gear") --print ( string.format("gear %d/ignition %d" , g, ignition)) toggleAllLed(0) + if ignition == 2 then - SetLeftDigits(" ---- ") - SetRightDigits(" ---- ") + initLedTable(mRPMLedTable, 1) + SetRPMLed("mRPMLedTable") + SetLeftDigits("[ ]") + SetRightDigits("[ ]") else + initLedTable(mRPMLedTable, 0) + SetRPMLed("mRPMLedTable") SetLeftDigits(" ") SetRightDigits(" ") end - if ignition == 0 then + if ignition == 0 and GetContextInfo("simulation") == "rFactor2.exe" then SetGearDigit(" ") elseif ignition == 1 then SetGearDigit(GetCurrentGear()) -- cgit v1.2.3