Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUA: retrive more information about the model #4684

Closed
frankiearzu opened this issue Oct 31, 2024 · 5 comments
Closed

LUA: retrive more information about the model #4684

frankiearzu opened this issue Oct 31, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@frankiearzu
Copy link

frankiearzu commented Oct 31, 2024

I need to retrive more information about the current model.

1. info about the output channels.

  • Channel name
  • Direction: Normal/Reverse
  • Min/Max percent
  • Center/Subtrim
  • PWM center

Propose API: model.getOutput(i) where "i" is the channel number.. similar API to model.getCurve(i)

image

2. Current module Information

  • Module type (Multi-Module, CRFS, etc) .. i think is already there by model.getModule()
  • Need to get the "options" for a module.. specially for me if the External multi-module is doing channel mapping or not.
    image
    image

The Options comming from the /scripts/multi/main.lua:
image
image

@mawzthefinn mawzthefinn added the enhancement New feature or request label Oct 31, 2024
@mawzthefinn
Copy link
Collaborator

One thing to note, like Spektrum (and unlike OTX/ETX), you should be able to get the core surface mapping from the function mixers. You still obviously need the Outputs portion as well for Forward Programming.

@frankiearzu
Copy link
Author

frankiearzu commented Oct 31, 2024

@mawzthefinn You are correct... at minimum i need the outputs so that i can display the name to make it easy to select channels in Forward Prog.. Specially if the MM is mapping from AETR->TAER. Ail:Ch1->Ch2, Ele:Ch2->Ch3, Thr: Ch3->Ch1
My plan is still to port the UI where you set the what Ch is use for each surface (Wing and Tail settings/mix).. Later on, if i can get all that info from the Radio will be great. Still could be dificult to understand the intent of a mix, specually the not usual ones..VTail, Taileron, Delta, two Ail, Canard, Canard-Aileron, etc.

@bsongis-frsky
Copy link
Collaborator

Ready for the next 1.6.0 nightlies!

@frankiearzu
Copy link
Author

Verified and working as expected.
The only thing is that "module" class is not documented in the LUA doc, but was able to inspect its methods/functions via code.

@bsongis
Copy link
Contributor

bsongis commented Nov 5, 2024

The doc should be fixed now. Also I have improved it a little bit, see the release notes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants