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