summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-11-18 17:42:57 +0100
committerHugues Hiegel <hugues@hiegel.fr>2013-11-18 17:42:57 +0100
commit30fe750fb68cf5efcac9c65f650ab7631463cb5c (patch)
tree2c8123e07d92d39c600f961c4bf81c0d96bd921e
parent19d68837528e52a2facd61c86129e3201b59cce6 (diff)
[slipro] laps + current sector
-rw-r--r--scripts/gugus/sliproDigits.lua22
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/gugus/sliproDigits.lua b/scripts/gugus/sliproDigits.lua
index 821dcf6..a8c1c07 100644
--- a/scripts/gugus/sliproDigits.lua
+++ b/scripts/gugus/sliproDigits.lua
@@ -266,9 +266,27 @@ function leftDigitsEvent(swFunction)
lPanel = string.format("%5.0f", dist )
elseif swValue == 27 then
- --27.lap completed
+ --27.laps completed:sector
local laps = GetContextInfo("laps")
- lPanel = string.format(" L%3.0f ", laps )
+ local sLaps = " "
+ if laps >= 100 then
+ sLaps = string.format("%3d", laps )
+ else
+ sLaps = string.format("L%02d", laps )
+ end
+
+ local sSector = " "
+ local sectors = GetCarInfo("sector")
+ if sectors ~= nil then
+ if sector > 9 then
+ sSector = string.format("S%2d", sect)
+ else
+ sSector = string.format(" S%1d", sect)
+ end
+ end
+
+ lPanel = sLaps .. ":" .. sSector
+
elseif swValue == 28 then
--28.total laps