Documentation for the "SwitchItem" structure?
- pvogel
-
Topic Author
- Offline
- Junior Member
-
- Posts: 22
- Thank you received: 3
TPL_KUNENA_MESSAGE_REPLIED_NEW Documentation for the "SwitchItem" structure?
22 Jan 2017 04:07
Tero,
Yes, I understand all the basics of the Lua interface for accessing a control, etc. What you will note is that the Jeti Lua API documentation (page 85 for example, documenting the addInputBox function, or page 88 for the form.getValue function's return value on an inputBox component) refers to a SwitchItem object. I am looking for *documentation on this structure*. I understand that for the most part I just need to sling the structure around to other functions, but, to do what I want to do, which is put the haptic response on the appropriate stick based on the user's selection of a proportional control that should have a "digital detent" to identify a particular stick position, I need to know the proportional control that was selected so I can map it to a stick! Otherwise I have to ask the redundant question "response on left stick or right stick?"
Yes, I understand all the basics of the Lua interface for accessing a control, etc. What you will note is that the Jeti Lua API documentation (page 85 for example, documenting the addInputBox function, or page 88 for the form.getValue function's return value on an inputBox component) refers to a SwitchItem object. I am looking for *documentation on this structure*. I understand that for the most part I just need to sling the structure around to other functions, but, to do what I want to do, which is put the haptic response on the appropriate stick based on the user's selection of a proportional control that should have a "digital detent" to identify a particular stick position, I need to know the proportional control that was selected so I can map it to a stick! Otherwise I have to ask the redundant question "response on left stick or right stick?"
Please Log in or Create an account to join the conversation.
- TeroS
-
- Offline
- Platinum Member
-
- RC-Thoughts
- Posts: 527
- Thank you received: 370
TPL_KUNENA_MESSAGE_REPLIED_NEW Documentation for the "SwitchItem" structure?
22 Jan 2017 09:36pvogel wrote: Tero,
Yes, I understand all the basics of the Lua interface for accessing a control, etc. What you will note is that the Jeti Lua API documentation (page 85 for example, documenting the addInputBox function, or page 88 for the form.getValue function's return value on an inputBox component) refers to a SwitchItem object. I am looking for *documentation on this structure*. I understand that for the most part I just need to sling the structure around to other functions, but, to do what I want to do, which is put the haptic response on the appropriate stick based on the user's selection of a proportional control that should have a "digital detent" to identify a particular stick position, I need to know the proportional control that was selected so I can map it to a stick! Otherwise I have to ask the redundant question "response on left stick or right stick?"
I don't see any possibility to that. The integer value we are getting from the addInputbox can be the same regardless of sick used (it's the stick position-value) and the actual info on what stick it is looks to be deeper in the firmware and we cannot read that. At least I can't find any way to do it. Actually very frustrating.
Looks like you jsut need to accept this and make the user select left or right vibration.
As a sidenote: Change your line 68 from:
form.addLabel({label=lang.bumpValue})
to:
form.addLabel({label=lang.bumpValue,width=200})
to get the whole text visible in form.
i like your way of thinking, to keep so much as possible off from user, but sometimes we just cant.
Please Log in or Create an account to join the conversation.
Moderators: Thorn, IG-Modellbau
Time to create page: 0.307 seconds