diff options
-rw-r--r-- | scripts/slipro_gus.lua | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/scripts/slipro_gus.lua b/scripts/slipro_gus.lua index fa6f1f7..a83c6eb 100644 --- a/scripts/slipro_gus.lua +++ b/scripts/slipro_gus.lua @@ -22,7 +22,6 @@ -- ================================
-- custom globals
-mGugusse_Ignition = 0
-- ================================
-- custom functions
@@ -112,33 +111,34 @@ end function global_custom_gearEvent(gear)
-- manage gear when ŽEŽ
if gear == 69 then
- local update = 0
-
- if mGugusseIgnition == 1 then
- mGugusseIgnition = 0
-
- SetLeftDigits(" ")
- SetRightDigits(" ")
- toggleAllLed(0)
-
- update = 1
- end
-
+ local ignition = 1
+ if GetContextInfo("simulation") == "rFactor2.exe" then
+ ignition = GetCarInfo("ignition")
+ end
local g = GetCarInfo("gear")
- if oldGear == 0 or oldGear ~= g then
- oldGear = g
- SetGearDigit(GetCurrentGear())
+ --print ( string.format("gear %d/ignition %d" , g, ignition))
- update = 1
- end
+ toggleAllLed(0)
+ if ignition == 2 then
+ SetLeftDigits(" ---- ")
+ SetRightDigits(" ---- ")
+ else
+ SetLeftDigits(" ")
+ SetRightDigits(" ")
+ end
- if update ~= 0 then SLISendReport(1) end
+ if ignition == 0 then
+ SetGearDigit(" ")
+ elseif ignition == 1 then
+ SetGearDigit(GetCurrentGear())
+ end
+
+ SLISendReport(1)
return 1
end
- mGugusseIgnition = 1
- return 2
+ return 2
end
function global_custom_ledEvent(idx, ledFunction, state)
|