From 30fe750fb68cf5efcac9c65f650ab7631463cb5c Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 18 Nov 2013 17:42:57 +0100 Subject: [slipro] laps + current sector --- scripts/gugus/sliproDigits.lua | 22 ++++++++++++++++++++-- 1 file 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 -- cgit v1.2.3