From afd0dfff414923f24706922f0f3092219e37ac9a Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 18 Nov 2013 12:46:40 +0100 Subject: [Controls] debug OSPfactor feedback --- scripts/controls.lua | 25 ++++++++++++++----------- 1 file 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 -- cgit v1.2.3