diff options
-rw-r--r-- | scripts/controls.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/scripts/controls.lua b/scripts/controls.lua index bef952b..f7a532f 100644 --- a/scripts/controls.lua +++ b/scripts/controls.lua @@ -76,20 +76,23 @@ function controlsEvent(deviceType, ctrlType, ctrlPos, value, funcIndex, targetDe -- set timeout oldTcks = GetTicks() + delay - elseif IsSLIFunction("ospfactor", funcIndex) and mOSPFeedbackAllowed then - -- OSP Factor feedback - leftStr = "OSP " + elseif IsSLIFunction("ospfactor", funcIndex) then + print "ospfactor: " .. ospf + if mOSPFeedbackAllowed then + -- OSP Factor feedback + leftStr = "OSP " - local ospf = GetContextInfo("ospfactor") - rightStr = rightStr.format(" %03d ", ospf) + local ospf = GetContextInfo("ospfactor") + rightStr = rightStr.format(" %03d ", ospf) - -- set digits - UpdateDigits(leftStr, rightStr) - SLISendReport(0) + -- set digits + UpdateDigits(leftStr, rightStr) + SLISendReport(0) - state = 1 - -- set timeout - oldTcks = GetTicks() + delay + state = 1 + -- set timeout + oldTcks = GetTicks() + delay + end elseif IsSLIFunction("speedmetric", funcIndex) and mUnitFeedbackAllowed then -- metric KPH or MPH |