Documentation for the "SwitchItem" structure?

  • pvogel
  • pvogel's Avatar Offline Autor
  • Junior Mitglied
  • Junior Mitglied
  • Beiträge: 22
  • Dank erhalten: 3

pvogel antwortete auf Documentation for the "SwitchItem" structure?

Posted 22 Jan. 2017 05:07 #7
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?"
von pvogel

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • TeroS
  • TeroS's Avatar Offline
  • Platinum Mitglied
  • Platinum Mitglied
  • RC-Thoughts
  • Beiträge: 527
  • Dank erhalten: 370

TeroS antwortete auf Documentation for the "SwitchItem" structure?

Posted 22 Jan. 2017 10:36 #8

pvogel 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.
von TeroS

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.892 Sekunden