diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-27 15:41:36 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-27 15:41:36 +0100 |
commit | c34e913ff8844eec27a8db2ee5ecc702d146dece (patch) | |
tree | c2500d9f31c412b5f3fe67eabd1ef23e3ef33775 /scripts/gugus/functions.lua | |
parent | a22a3d9da2f77f0273c5178bd13e79a0cd643c4e (diff) |
POuet poUETgus
Diffstat (limited to 'scripts/gugus/functions.lua')
-rw-r--r-- | scripts/gugus/functions.lua | 25 |
1 files changed, 13 insertions, 12 deletions
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 |