summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-11-18 12:46:40 +0100
committerHugues Hiegel <hugues@hiegel.fr>2013-11-18 12:46:40 +0100
commitafd0dfff414923f24706922f0f3092219e37ac9a (patch)
tree3aecdab17351830117e0d563d57336a4793a064f
parent8e816f576f334e664955575ec24a9fb47fe51cbf (diff)
[Controls] debug OSPfactor feedback
-rw-r--r--scripts/controls.lua25
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