Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA:

Documentation for the "SwitchItem" structure? 22 Jan 2017 05:07 #7

  • pvogel
  • pvogels Avatar Autor
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Beiträge: 22
  • Dank erhalten: 3
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?"

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Documentation for the "SwitchItem" structure? 22 Jan 2017 10:36 #8

  • TeroS
  • TeroSs Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • RC-Thoughts
  • Beiträge: 527
  • Dank erhalten: 370

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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
  • 2
Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.319 Sekunden
Powered by Kunena Forum