From c34e913ff8844eec27a8db2ee5ecc702d146dece Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 27 Nov 2013 15:41:36 +0100 Subject: POuet poUET --- cfg/sli_left_functions.ecfg | 84 +++++++++++++++++++-------------------- cfg/sli_right_functions.ecfg | 90 +++++++++++++++++++++--------------------- cfg/slipro_status.ecfg | 4 +- scripts/gugus/digits.lua | 93 ++++++++++++++++++++++++++++++-------------- scripts/gugus/functions.lua | 25 ++++++------ 5 files changed, 167 insertions(+), 129 deletions(-) diff --git a/cfg/sli_left_functions.ecfg b/cfg/sli_left_functions.ecfg index 99af136..2bd7fab 100644 --- a/cfg/sli_left_functions.ecfg +++ b/cfg/sli_left_functions.ecfg @@ -1,57 +1,57 @@ -1.speed [ rpm/gear ] -2.rpm -3.rpm/gear +1.speed [ rpm/gear ] +2.rpm [ rpm/gear ] +3.rpm/gear [ speed ] 4.position/speed 5.sector/speed -6.laps/sector +6.laps/sector [ remaining laps/total ] 7.laps/position -8.laps/total +8.laps/total [ remaining laps/total ] 9.remaining laps/total 10.fuel 11.fuel/speed -12.fuel/remaining laps with fuel -13.water temp [ oil temp ] -14.oil temp [ water temp ] -15.wheels temp FL [ RL ] -16.wheels temp FR [ RR ] -17.wheels temp L/R FRONT [ L/R REAR ] -18.wheels temp L/R FRONT [ wheels press L/R FRONT ] -19.wheels temp L/R REAR [ wheels press L/R REAR ] -20.wheels/brake temp left FRONT [ REAR ] -21.brake/wheels temp right FRONT [ REAR ] -22.wheels temp FL/ press FL [ RL/RL ] -23.wheels press FR/ temp FR [ RR/RR ] -24.wheels press FL [ RL ] -25.wheels press FR [ RR ] -26.wheels press L/R FRONT [ L/R REAR ] -27.brakes temp FL [ RL ] -28.brakes temp FR [ RR ] -29.brakes temp L/R FRONT [ L/R REAR ] -30.track percent [ track size ] +12.fuel/remaining laps with fuel [ remaining laps/total ] +13.water temp [ oil temp ] +14.oil temp [ water temp ] +15.wheels temp FL [ wt RL ] +16.wheels temp FRr [ wt RR ] +17.wheels temp L/R FRONT [ wt L/R REAR ] +18.wheels temp L/R FRONT [ wheels press L/R FRONT ] +19.wheels temp L/R REAR [ wheels press L/R REAR ] +20.wheels/brake temp left FRONT [ w/b t L REAR ] +21.brake/wheels temp right FRONT [ b/w t R REAR ] +22.wheels temp/press FL [ w temp/press RL ] +23.wheels press FR/ temp FR [ w press/temp RR ] +24.wheels press FL [ RL ] +25.wheels press FR [ RR ] +26.wheels press L/R FRONT [ L/R REAR ] +27.brakes temp FL [ RL ] +28.brakes temp FR [ RR ] +29.brakes temp L/R FRONT [ L/R REAR ] +30.track percent [ track size ] 31.total distance 32.kers 33.kers max 34.kers percent 35.drs -36.current lap time [ last lap time ] -37.current lap time + sector splits [ current sector time ] -38.current lap time + best sector splits [ current sector time ] -39.best lap time [ virtual best lap time ] -40.best lap time + best sector splits [ virtual best lap time ] -41.last lap time [ last sector ] -42.last lap time + sector splits [ last sector ] -43.diff vs best [ bestlap time ] -44.diff vs best + best sector split [ best sector time ] -45.diff vs best + bestlap sector split [ bestlap sector time ] -46.diff vs last [ last lap time ] -47.diff vs last + sector split [ last sector time ] -48.last sector time [ last sector best time ] -49.sector split [ last sector time ] +36.current lap time [ last lap time ] +37.current lap time + sector splits [ current sector time ] +38.current lap time + best sector splits [ current sector time ] +39.best lap time [ virtual best lap time ] +40.best lap time + best sector splits [ virtual best lap time ] +41.last lap time [ last sector ] +42.last lap time + sector splits [ last sector ] +43.diff vs best [ bestlap time ] +44.diff vs best + best sector split [ best sector time ] +45.diff vs best + bestlap sector split [ bestlap sector time ] +46.diff vs last [ last lap time ] +47.diff vs last + sector split [ last sector time ] +48.last sector time [ last sector best time ] +49.sector split [ last sector time ] 50.last sector best time -51.best sector split [ best sector time ] -52.virtual best lap time (best sectors) [ best lap time ] -53.time remaining [ time elapsed ] -54.time elapsed [ time remaining ] +51.best sector split [ best sector time ] +52.virtual best lap time (best sectors) [ best lap time ] +53.time remaining [ time elapsed ] +54.time elapsed [ time remaining ] 55.system time 56.PIT 57.Safety Car diff --git a/cfg/sli_right_functions.ecfg b/cfg/sli_right_functions.ecfg index 3f5b30b..2bd7fab 100644 --- a/cfg/sli_right_functions.ecfg +++ b/cfg/sli_right_functions.ecfg @@ -1,55 +1,57 @@ -1.speed [ rpm/gear ] -2.rpm -3.rpm/gear +1.speed [ rpm/gear ] +2.rpm [ rpm/gear ] +3.rpm/gear [ speed ] 4.position/speed 5.sector/speed -6.laps/sector +6.laps/sector [ remaining laps/total ] 7.laps/position -8.laps/total +8.laps/total [ remaining laps/total ] 9.remaining laps/total 10.fuel 11.fuel/speed -12.fuel/remaining laps with fuel -13.water temp [ oil temp ] -14.oil temp [ water temp ] -15.wheels temp FL [ RL ] -16.wheels temp FR [ RR ] -17.wheels temp L/R FRONT [ L/R REAR ] -18.wheels temp L/R FRONT [ wheels press L/R FRONT ] -19.wheels temp L/R REAR [ wheels press L/R REAR ] -20.wheels/brake temp left FRONT [ REAR ] -21.brake/wheels temp right FRONT [ REAR ] -22.wheels temp FL/ press FL [ RL/RL ] -23.wheels press FR/ temp FR [ RR/RR ] -24.wheels press FL [ RL ] -25.wheels press FR [ RR ] -26.wheels press L/R FRONT [ L/R REAR ] -27.brakes temp FL [ RL ] -28.brakes temp FR [ RR ] -29.brakes temp L/R FRONT [ L/R REAR ] -30.track percent [ track size ] +12.fuel/remaining laps with fuel [ remaining laps/total ] +13.water temp [ oil temp ] +14.oil temp [ water temp ] +15.wheels temp FL [ wt RL ] +16.wheels temp FRr [ wt RR ] +17.wheels temp L/R FRONT [ wt L/R REAR ] +18.wheels temp L/R FRONT [ wheels press L/R FRONT ] +19.wheels temp L/R REAR [ wheels press L/R REAR ] +20.wheels/brake temp left FRONT [ w/b t L REAR ] +21.brake/wheels temp right FRONT [ b/w t R REAR ] +22.wheels temp/press FL [ w temp/press RL ] +23.wheels press FR/ temp FR [ w press/temp RR ] +24.wheels press FL [ RL ] +25.wheels press FR [ RR ] +26.wheels press L/R FRONT [ L/R REAR ] +27.brakes temp FL [ RL ] +28.brakes temp FR [ RR ] +29.brakes temp L/R FRONT [ L/R REAR ] +30.track percent [ track size ] 31.total distance 32.kers 33.kers max 34.kers percent 35.drs -36.current lap time [ last lap time ] -37.current lap time + sector splits [ current sector time ] -38.current lap time + best sector splits [ current sector time ] -39.best lap time [ virtual best lap time ] -40.best lap time + best sector splits [ virtual best lap time ] -41.last lap time + sector splits [ last sector ] -42.real time diff vs best [ bestlap time ] -43.real time diff vs best + best sector split [ best sector time ] -44.real time diff vs best + bestlap sector split [ bestlap sector time ] -45.real time diff vs last [ last lap time ] -46.real time diff vs last + sector split [ last sector time ] -47.last sector time [ last sector best time ] -48.sector split [ last sector time ] -49.best sector split [ best sector time ] -50.virtual best lap time (best sectors) [ best lap time ] -51.time remaining [ time elapsed ] -52.time elapsed [ time remaining ] -53.system time -54.PIT -55.Safety Car +36.current lap time [ last lap time ] +37.current lap time + sector splits [ current sector time ] +38.current lap time + best sector splits [ current sector time ] +39.best lap time [ virtual best lap time ] +40.best lap time + best sector splits [ virtual best lap time ] +41.last lap time [ last sector ] +42.last lap time + sector splits [ last sector ] +43.diff vs best [ bestlap time ] +44.diff vs best + best sector split [ best sector time ] +45.diff vs best + bestlap sector split [ bestlap sector time ] +46.diff vs last [ last lap time ] +47.diff vs last + sector split [ last sector time ] +48.last sector time [ last sector best time ] +49.sector split [ last sector time ] +50.last sector best time +51.best sector split [ best sector time ] +52.virtual best lap time (best sectors) [ best lap time ] +53.time remaining [ time elapsed ] +54.time elapsed [ time remaining ] +55.system time +56.PIT +57.Safety Car diff --git a/cfg/slipro_status.ecfg b/cfg/slipro_status.ecfg index 44a1b7d..d407c1b 100644 --- a/cfg/slipro_status.ecfg +++ b/cfg/slipro_status.ecfg @@ -4,5 +4,5 @@ TCLEVEL = 0 SPDLMTLEVEL = 0 BRITLEVEL = 0 -SPEEDPOS = 4 -TIMEPOS = 1 +SPEEDPOS = 44 +TIMEPOS = 32 diff --git a/scripts/gugus/digits.lua b/scripts/gugus/digits.lua index 27bde1d..cfaab0e 100644 --- a/scripts/gugus/digits.lua +++ b/scripts/gugus/digits.lua @@ -12,13 +12,13 @@ require("scripts/gugus/functions") function leftDigitsEvent(swFunction) lPanel = DigitsEvent(swFunction, "L") - if lPanel == nil then lPanel = "-.--.---" end + if lPanel == nil then lPanel = "}.{~._]-" end SetLeftDigits( lPanel ) return 1 end function rightDigitsEvent(swFunction) rPanel = DigitsEvent(swFunction, "R") - if rPanel == nil then rPanel = "-:--.---" end + if rPanel == nil then rPanel = "-[_.~}.{" end SetRightDigits( rPanel ) return 1 end @@ -65,6 +65,13 @@ function DigitsEvent(swFunction, where) elseif swValue == 48 then qi = false ; swValue = 47 end end + if qi then + if where == "L" then + swValue = 36 -- last lap time + else + swValue = 48 -- last sector + end + end local NotQI = qi == false -- 1.speed [ rpm/gear ] @@ -77,7 +84,11 @@ function DigitsEvent(swFunction, where) -- 3.rpm/gear elseif swValue == 3 then - Output = GetString("rpm", where .. "l") .. ":" .. GetString("gear", where .. "r") + if where == "R" then + Output = GetString("rpm", where .. "l") .. ":" .. GetString("gear", where .. "r") + else + Output = GetString("gear", where .. "r") .. ":" .. GetString("rpm", where .. "l") + end -- 4.position/speed elseif swValue == 4 then @@ -142,57 +153,57 @@ function DigitsEvent(swFunction, where) -- 17.wheels temp L/R FRONT [ L/R REAR ] elseif swValue == 17 then if NotQI then - Output = GetString("wtfl", where .. "l") .. lr .. GetString("wtfr", where .. "r") + Output = GetString("wtfl", where .. "l") .. "." .. GetString("wtfr", where .. "r") else - Output = GetString("wtrl", where .. "l") .. lr .. GetString("wtrr", where .. "r") + Output = GetString("wtrl", where .. "l") .. "." .. GetString("wtrr", where .. "r") end - -- 18.wheels temp L/R FRONT [ wheels press L/R FRONT ] + -- 18.wheels temp L/R FRONT [ wheels press L/R FRONT"." elseif swValue == 18 then if NotQI then - Output = GetString("wtfl", where .. "l") .. lr .. GetString("wtfr", where .. "r") + Output = GetString("wtfl", where .. "l") .. "." .. GetString("wtfr", where .. "r") else - Output = GetString("wpfl", where .. "l") .. lr .. GetString("wpfr", where .. "r") + Output = GetString("wpfl", where .. "l") .. "." .. GetString("wpfr", where .. "r") end - -- 19.wheels temp L/R REAR [ wheels press L/R REAR ] + -- 19.wheels temp L/R REAR [ wheels press L/R REAR ]"." elseif swValue == 19 then if NotQI then - Output = GetString("wtrl", where .. "l") .. lr .. GetString("wtrr", where .. "r") + Output = GetString("wtrl", where .. "l") .. "." .. GetString("wtrr", where .. "r") else - Output = GetString("wprl", where .. "l") .. lr .. GetString("wprr", where .. "r") + Output = GetString("wprl", where .. "l") .. "." .. GetString("wprr", where .. "r") end -- 20.wheels/brake temp left FRONT [ REAR ] elseif swValue == 20 then if NotQI then - Output = GetString("wtfl", where .. "l") .. lr .. GetString("btfl", where .. "r") + Output = GetString("wtfl", where .. "l") .. "." .. GetString("btfl", where .. "r") else - Output = GetString("wtrl", where .. "l") .. lr .. GetString("btrl", where .. "r") + Output = GetString("wtrl", where .. "l") .. "." .. GetString("btrl", where .. "r") end -- 21.brake/wheels temp right FRONT [ REAR ] elseif swValue == 21 then if NotQI then - Output = GetString("btfr", where .. "l") .. lr .. GetString("wtfr", where .. "r") + Output = GetString("btfr", where .. "l") .. "." .. GetString("wtfr", where .. "r") else - Output = GetString("btrr", where .. "l") .. lr .. GetString("wtrr", where .. "r") + Output = GetString("btrr", where .. "l") .. "." .. GetString("wtrr", where .. "r") end -- 22.wheels temp FL/ press FL [ RL/RL ] elseif swValue == 22 then if NotQI then - Output = GetString("wtfl", where .. "l") .. lr .. GetString("wpfl", where .. "r") + Output = GetString("wtfl", where .. "l") .. "." .. GetString("wpfl", where .. "r") else - Output = GetString("wtrl", where .. "l") .. lr .. GetString("wprl", where .. "r") + Output = GetString("wtrl", where .. "l") .. "." .. GetString("wprl", where .. "r") end -- 23.wheels press FR/ temp FR [ RR/RR ] elseif swValue == 23 then if NotQI then - Output = GetString("wpfr", where .. "l") .. lr .. GetString("wtfr", where .. "r") + Output = GetString("wpfr", where .. "l") .. "." .. GetString("wtfr", where .. "r") else - Output = GetString("wprr", where .. "l") .. lr .. GetString("wtrr", where .. "r") + Output = GetString("wprr", where .. "l") .. "." .. GetString("wtrr", where .. "r") end -- 24.wheels press FL [ RL ] @@ -214,9 +225,9 @@ function DigitsEvent(swFunction, where) -- 26.wheels press L/R FRONT [ L/R REAR ] elseif swValue == 26 then if NotQI then - Output = GetString("wpfl", where .. "l") .. lr .. GetString("wpfr", where .. "r") + Output = GetString("wpfl", where .. "l") .. "." .. GetString("wpfr", where .. "r") else - Output = GetString("wprl", where .. "l") .. lr .. GetString("wprr", where .. "r") + Output = GetString("wprl", where .. "l") .. "." .. GetString("wprr", where .. "r") end -- 27.brakes temp FL [ RL ] @@ -238,9 +249,9 @@ function DigitsEvent(swFunction, where) -- 29.brakes temp L/R FRONT [ L/R REAR ] elseif swValue == 29 then if NotQI then - Output = GetString("btfl", where .. "l") .. lr .. GetString("btfr", where .. "r") + Output = GetString("btfl", where .. "l") .. "." .. GetString("btfr", where .. "r") else - Output = GetString("btrl", where .. "l") .. lr .. GetString("btrr", where .. "r") + Output = GetString("btrl", where .. "l") .. "." .. GetString("btrr", where .. "r") end -- 30.track percent [ track size ] @@ -253,7 +264,7 @@ function DigitsEvent(swFunction, where) -- 31.total distance elseif swValue == 31 then - Output = GetString("distance", where) + Output = GetString("trip", where) -- 32.kers elseif swValue == 32 then @@ -301,24 +312,47 @@ function DigitsEvent(swFunction, where) -- 41.last lap time [ last sector ] elseif swValue == 41 then + Output = GetTimeString("lastlaptime", where) -- 42.last lap time + sector splits [ last sector ] elseif swValue == 42 then + if displaysectorsplit == false then + Output = GetTimeString("lastlaptime", where) + else + Output = GetTimeString("lastsectorsplitVSbest", where) + end -- 43.real time diff vs best [ bestlap time ] elseif swValue == 43 then + Output = GetTimeString("realdiffbest", where) -- 44.real time diff vs best + best sector split [ best sector time ] elseif swValue == 44 then + if displaysectorsplit == false then + Output = GetTimeString("realdiffbest", where) + else + Output = GetTimeString("lastsectorsplitVSbest", where) + end -- 45.real time diff vs best + bestlap sector split [ bestlap sector time ] elseif swValue == 45 then + if displaysectorsplit == false then + Output = GetTimeString("realdiffbest", where) + else + Output = GetTimeString("lastsectorsplitVSbestlap", where) + end -- 46.real time diff vs last [ last lap time ] elseif swValue == 46 then + Output = GetTimeString("realdifflast", where) -- 47.real time diff vs last + sector split [ last sector time ] elseif swValue == 47 then + if displaysectorsplit == false then + Output = GetTimeString("realdifflast", where) + else + Output = GetTimeString("lastsectorsplitVSlast", where) + end -- 48.last sector time [ last sector best time ] elseif swValue == 48 then @@ -326,10 +360,11 @@ function DigitsEvent(swFunction, where) -- 49.sector split [ last sector time ] elseif swValue == 49 then + Output = GetTimeString("lastsectorsplitVSlast", where) -- 50.last sector best time elseif swValue == 50 then - Output = GetTimeString("lastsectorbest", where) + Output = GetTimeString("bestsector", where) -- 51.best sector split [ best sector time ] elseif swValue == 51 then @@ -354,17 +389,17 @@ function DigitsEvent(swFunction, where) -- 56.PIT elseif swValue == 56 then if GetContextInfo("inpits") then - Output = " Pits " + Output = "{Pits}" else - Output = " " + Output = "{ }" end -- 57.Safety Car elseif swValue == 57 then if GetContextInfo("safetycar") then - Output = "Safety" + Output = "[SafE]" else - Output = " " + Output = "[ ]" end end diff --git a/scripts/gugus/functions.lua b/scripts/gugus/functions.lua index 81ffcf6..7a58dcb 100644 --- a/scripts/gugus/functions.lua +++ b/scripts/gugus/functions.lua @@ -208,23 +208,23 @@ function GetString(what, where) -- WHEEL PRESS -- BRAKE TEMP elseif what == "wtfl" or what == "wtfr" or what == "wtrl" or what == "wtrr" - or what == "btfl" or what == "btfr" or what == "btrl" or what == "btrr" then + or what == "btfl" or what == "btfr" or what == "btrl" or what == "btrr" then if fullSize then - Output = string.format("%s.%3d", what, GetWheelTemp(what)) + Output = string.format("%3s.%3d", what, GetWheelTemp(what)) else Output = string.format("%3d", GetWheelTemp(what)) end - elseif what == "wpfl" or what == "wpfr" or what == "wprl" or what == "wprr" then + elseif what == "wpfl" or what == "wpfr" or what == "wprl" or what == "wprr" then if fullSize then - Output = string.format("%s.%3d", what, GetWheelPressure(what)) + Output = string.format("%3s.%3d", what, GetWheelPressure(what)) else Output = string.format("%3d", GetWheelPressure(what)) end -- DISTANCES -- track size - elseif what == "track" then + elseif what == "tracksize" then track = GetContextInfo("tracksize") / 1000 if fullSize then Output = string.format(" %2.3f", track) @@ -439,9 +439,7 @@ function GetSectorSplit(what, which) end function TimeToString(time, where, splitTime) - - local Output = "000" - if where == "R" or where == "L" then Output = "0.00.000" end + local Output if time ~= nil then @@ -523,16 +521,19 @@ function TimeToString(time, where, splitTime) end else + local minus=" " + if time < 0 then minus = "-" end + -- splittimes -- if hr > 0 then -- -HHhMM - Output = string.format("%3dh%02d", hr, mn) + Output = string.format("%s%2dh%02d", minus, hr, mn) elseif mn > 0 then -- -MM.SS.m - Output = string.format("%3d.%02d.%d", mn, sc, cs/10) + Output = string.format("%s%2d.%02d.%d", minus, mn, sc, cs/10) else -- -SS.mmm - Output = string.format("%3d.%03d", sc, ms) + Output = string.format("%s%2d.%03d", minus, sc, ms) end end @@ -574,7 +575,7 @@ function TimeToString(time, where, splitTime) if time == nil then time = "NIL" end if Output == nil then Output = "NIL" end print ( time .. " [" .. where .. "] " .. Output ) - mDebug = ticks + 10000 + mDebug = ticks + 1000 end return Output -- cgit v1.2.3