Bitte ändert euer Passwort!

Im März 2026 wurde das Forum gehackt. Dabei hatten die Angreifer Zugriff auf die Datenbank und somit Zugriff auf eure Passwörter. Auch wenn das Forum kein Passwort im Klartext speichert, können die Angreifer eure Passwörter knacken. Bitte ändert daher dringend euer Passwort für das Forum. Solltet ihr das gleiche Passwort auch an anderer Stelle verwenden, ändert es bitte unbedingt an allen Stellen!

Documentation for the "SwitchItem" structure?

  • pvogel
  • Autor
  • Offline
  • Junior Mitglied
  • Junior Mitglied
  • Beiträge: 22
  • Thanks: 3

Re: 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?"

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • TeroS
  • Offline
  • Platinum Mitglied
  • Platinum Mitglied
  • RC-Thoughts
  • Beiträge: 527
  • Thanks: 370

Re: Documentation for the "SwitchItem" structure?

22 Jan. 2017 09:36
#
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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.491 Sekunden
Powered by Kunena Forum