LUA P3&P4 inverted in mode 4 ?

  • borisff
  • borisff's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 65
  • Thank you received: 3

TPL_KUNENA_MESSAGE_CREATED LUA P3&P4 inverted in mode 4 ?

25 Dec 2016 13:36
#1
DC-24 simulator
1) set System/Configuration/stick Mode 4
2) Create a model
3) Load the LUA App P3P4.lua
Moving stick P3, LUA apps shows value of P4.

Are Lua P3&P4 inverted in mode 4 ?

It's same with a DC-16 in mode 4.







local APPNAME = "P3P4"

local function loop()
local p1, p2, p3, p4 = system.getInputs("P1", "P2", "P3", "P4")
print("p1="..p1)
print("p2="..p2)
print("p3="..p3)
print("p4="..p4)
end

local function init(code)
end

return {loop=loop, author="Test", version="1.0", name=APPNAME}

Please Log in or Create an account to join the conversation.

  • TeroS
  • TeroS's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • RC-Thoughts
  • Posts: 527
  • Thank you received: 370

TPL_KUNENA_MESSAGE_REPLIED_NEW LUA P3&P4 inverted in mode 4 ?

25 Dec 2016 13:43
#2
You're right. It's not mode-specific, visible in Mode 2 also.

Looks like Lua reads inputs wrong.

Please Log in or Create an account to join the conversation.

Moderators: ThornIG-Modellbau
Time to create page: 0.310 seconds
Powered by Kunena Forum