-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
TPro - Port of OpenTX function switches management #1694
Conversation
…getx into cpn-function-switches-port
My initial tests on TPro with this seem to have a few hiccups still...
functionSwitchNames:
0: SL
1: HOR
2: AIR
3: RTH
4: PH
5: BP should be switchNames:
0:
val: "SL"
1:
val: "HOR" Other than that, this seems to be working fine :) |
Thanks a lot for this report, have some homework for this evening 😺 |
I've retracted one issue, so it's a bit less now ;) |
Hi, I've just pushed some corrections on YAML generation as per the recommendations (tested with jumper TPro radio). I also noted that radio does not display function switches the same way through model setup, inputs/mixes and logical/custom screens. Function switches names are only displayed on model setup screen. Other screens mix "SW1" to "SW6" for sources and "SE" to "SJ" for switches. I am not comfortable with that part yet as the firmware handles function switches sometimes like normal switches and sometimes like function switches so I left it as is for now. |
Yeah, there are some oddites on the TPro function switches stuff still, i.e. #1488 ... so it will be a work in progress. |
Much better! :) And I think I finally have a handle on what was bugging me before... it seems like does not light up 1, 3 and 5 when that model is switched to (but curiously, it is if it is the active model and the radio is turned on). i.e. this is what companion is writing functionSwitchConfig: 2730
functionSwitchGroup: 1365
functionSwitchStartConfig: 1092
functionSwitchLogicalState: 0
switchNames:
0:
val: SL
1:
val: HOR
2:
val: AIR
5:
val: BEP after changing a setting (i.e. I just changed a character in the model name so the firmware updated the file), this is what the radio changes it to the following, and now it correctly lights up when switching models. functionSwitchConfig: 2730
functionSwitchGroup: 1365
functionSwitchStartConfig: 1092
functionSwitchLogicalState: 21
switchNames:
0:
val: "SL"
1:
val: "HOR"
2:
val: "AIR"
5:
val: "BEP" |
I'm not going to hold it against this PR though, as I don't think it's completely it's fault, there is something rather strange going on with function switches generally, so it could also be something on the radio side still. |
Suggest you check the code from these has been ported: |
Thanks for those Neil. opentx/opentx#8832 and opentx/opentx#8834 were both imported via #1479, even though the first PR was effectively overwritten by the second. It also pulled in opentx/opentx#8837 opentx/opentx#8845 should be pulled in shortly via #1705 So still on the hunt 🕵️🐛 |
I checked on main branch and companion was already writing |
Yes, I'll have to read through and try to decode what JC is up to with the function switches to see what that setting is actually for, as it seems to change on the radio... Regardless, I think the current issues arrise from the firmware, not companion, so in this goes... merge conflicts in other PRs (I'm assuming)... here we go! 😆 |
…X#1694) * TPro - Port of OpenTX function switches management (opentx/opentx#8847) * cleanup * Corrections * Fix YAML generation and adjusted switches to match TPRO firmware Co-authored-by: Batam <batam@macbook-pro.home>
Summary of changes:
Port of opentx/opentx#8847
Credits go to @elecpower and @3djc who did all the work for OpenTX.
Function switches of Jumper T-Pro can be setup and used in inputs, mixes, etc. and saved / loaded.