diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-18 12:46:59 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-18 12:46:59 +0100 |
commit | 19d68837528e52a2facd61c86129e3201b59cce6 (patch) | |
tree | d64196ed781844b4b259a4b55584aa731eaa0612 /scripts/gugus | |
parent | afd0dfff414923f24706922f0f3092219e37ac9a (diff) |
[Gugus] Gear : ignition/starter tests.
Diffstat (limited to 'scripts/gugus')
-rw-r--r-- | scripts/gugus/gear.lua | 17 |
1 files 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()) |