summaryrefslogtreecommitdiff
path: root/scripts/gugus/gear.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gugus/gear.lua')
-rw-r--r--scripts/gugus/gear.lua17
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())