-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add an VTX tab #1569
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
Add an VTX tab #1569
Conversation
|
Does this get us the ability to configure everything VTX related within the configurator? Would the VTX tab showing up be conditional on a port specifying either Smart Audio or Tramp? If that is the case we might want to have the ports information grabbed on connect |
|
Yes, that's the idea. Configure all the VTX from within the Configurator. |
|
This looks good, thank you very much @McGiverGim. I think we should also look into adding a way to easily load a set of values into this tab from a file / snippet, so that manufacturers can publish VTX tables suitable for their hardware. |
|
Yes, my idea is add later a wizard that adds sample values to all fields. But I prefer to do it in a later PR. |
As in 'sample values loaded from a file'? We have to avoid putting any 'default' or 'sample' values into the firmware or configurator, as this will open us up to being accused of enabling users to break the law, and potentially be banned from distribution. |
|
Yes, that is the reason why I didn't add them here. I prefer to discuss later which is the best way to do it. My idea was to add a wizard, where the user can select the "sample" bands to use, and the wizard will complete the VTX Table, showing a message that "the user must verify that the bands are valid for the country and adjust them to the law before saving". But as I say, is better to discuss it. We have samples too in the VTX Table wiki page, so I don't think this is very different for that. |
|
Well, with the samples over on the wiki, a user has to leave the configurator and go over there. I can kind of see this going both ways, if its made too difficult to get the right sort of information, users will end up just internet searching the best thing to shove in, which might have all channels unlocked. It sounds like FCC and CEPT might have clear limitations, the thing to avoid would be a third option that just unlocks everything. If we get a nastygram on a wiki page, we just have to remove/correct some information, correcting a configurator would be a little more work. |
911010a to
ec4cb58
Compare
|
Force pushed changes:
I think is more or less ready to go. Any remaining detail can be fixed later if needed. |
ec4cb58 to
b14f913
Compare
|
Rebased too with latest master... |
b14f913 to
1925fe0
Compare
|
Pushed a little update: animated the hide and show of the frequency vs channel/band selection. It seems to me that it was too hard the change :) |
|
Was doing some testing this morning and there are some problems with how the "Enter frequency directly" logic is working. The logic is that if band > 0 and frequency > 0 then we're in "enter directly" mode. Otherwise we're in band/channel mode. The data that's being sent in |
|
Also I pushed a small fix to the MSP PR that properly does the frequency lookup based on the supplied band/channel. Nothing that affects your changes - just fixes the display only the right panel after a save so the frequency displays the actual value rather than 0. Previously required a reboot to get the frequency set properly. |
|
Finally, one cosmetic suggestion. It loos like the band and channel count entries could be located on the same row to save a little vertical space. |
Did you mean band = 0 and frequency > 0? If not I don't understand that.
Yes, and the power level too, but this breaks a little the fields size aesthetic of all the tab and it will not serve as nothing, the table will end using the same space: the VTX Table has more width than the mode selection table, and we have the status table in the right. I can't move up the VTX Table because it will go over the status. So is better than the mode table has a similar height than the status table from a design point of view. |
|
Yeah, sorry. I meant |
|
I was referring to the band/channel counts in the VTX Table section at the bottom. |
Then maybe I have a bug that I can't see. This is what I tried to do here: betaflight-configurator/src/js/tabs/vtx.js Lines 405 to 419 in 1925fe0
When the direct frequency is enabled, I put the band and channel to zero. If channel/frequency mode enable, I put the frequency to zero except if firmware is less that 1.42, then the frequency has the codification of band and channel. If you have found a bug that I can reproduce please describe the steps. |
|
First test: Set up some value vtx table info - doesn't really matter what. I used: Then in CLI set it up for a manual frequency: After saving and going back to the tab it will have: |
|
Next test: Start with the same config but this time set the band and channel like: (or use the Configurator tab). The tab will be correct and look like this: Then change to a manual frequency using the switch and try to set to 5800 like this: Then save and the settings will revert back to the band/channel setup. |
|
If you are referring at the state of the switch, I don't have a manner to know if the values that I'm reading are from a frequency or from a band/channel selection. I can modify it "remembering" the latest state, but nothing more. Is that what you suggest? |
When you read the settings from |
50bd7a1 to
5f63c0d
Compare
|
Sorry for the two forces, in the first there were some code that I don't wanted to push. @etracer65 Fixed the problem, there was a bug in the set part. Another think: the frequency value comes with zero when there is a band/channel selected. I can see it at the status in the right. It will not be interesting to populate it with the real frequency from the table? If yes, this can be done in the firmware part or the Configurator part. |
That's already fixed and is the update to the MSP PR that I mentioned earlier today. |
|
Perfect then! We are ready to go with a first version :) |
5f63c0d to
9f21c67
Compare
|
Sorry for the late response, I didn't have time before. Implemented the @etracer65 suggestion: |
mikeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, and works well, thank you very much.
One thing that needs to be fixed is that it should not be possible to set Band / Channel in 'Selected Mode' to a combination if the corresponding field in the VTX table contains 0 It is probably easiest if we use a drop down for the 'Channel' setting to make this possible.
I like how the sections are arranged in the tab. But I think that, because the 'VTX Table' section is below the 'Selected Mode' section, it is not obvious to users that they first need to configure 'VTX Table' before they can configure 'Selected Mode'. I think to make it easier for users to realise this, it would be helpful if we showed a note about this at the top of the 'Selected Mode' section whenever the 'VTX Table' section is unconfigured.
Do you want that this works against the stored VTX Table or against the "live" vtx table? Now, the upper table works against the stored values, I can change it to make it work against the "live" table, but the values of the upper table must be sent before the new vtx table, so I don't think if it has sense. It will be enough to filter against the stored VTX Table of do I change it to be against the "live" table?
Ok, I will add it. |
|
One thing that @etracer65 suggested was to, instead of limiting the choices for band / channel selection, show a warning informing users that the band / channel they selected was disabled - this would be easy to be made to work against the to be stored VTX table, and it would work for what we want. |
|
I'm not too sure how to implement that, to me is the same. If I verify if the band/channel exist to show a warning, I must do it against the stored or the live table. Maybe are you talking about:
I think this makes the things too complicated. I'm not too sure if this will work as expected. The band/channel is sent before the new VTX Table, so maybe is valid but not at this moment so is the same that if I verify them against the stored table. |
|
@etracer65 another thing I've observed doing tests is that if I select a band/channel and save it, and then I remove the VTX Table, the band/channel selected continues and I receive it as the band/channel selected. Is that ok? |
Well it's not ideal, but also not really a big problem. I guess we should probably reset the band/channel (and also powerlevel) back to 0 if they exceed the available |
|
As mentioned, added a separate PR to reset invalid vtx band/channel/powerlevel settings. |
|
Without changing the entire way this tab is designed, and the MSP command is designed I think the better is to validate against the stored values, and if the user modifies the VTX Table letting and invalid value for the selected one, the FC will return it to zero. I think this will be enough. |
9f21c67 to
a0ee760
Compare
|
Pushed a PR with:
I think this is the better that we can do without moving the VTX Table to another place (maybe a button that opens the table in a window to modify it, and let a read only table in the tab, but I think this will complicate the user experience to fix some edge cases). |
a0ee760 to
11685e1
Compare
|
It seems I forgot to push some update? I have modified files at my local branch, sorry. |
|
@mikeller what is the final decision with this? Do I need to add some warning or similar? Is not clear to me if this has some changes pending. |
mikeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@McGiverGim: Sorry, I didn't get around to testing this until now.
It looks good, good work. One minor remark about the messages.
11685e1 to
0817e7d
Compare
|
Added the yes/no general messages... is a little strange because it wasn't used in other places, the only other place was commented, but now we have it ready for the future ;) |






Adds an VTX tab to control the VTX and populate the VTX Table. To go with: betaflight/betaflight#8693
This PR is not finished, it needs some refactor and some little changes, but is at 99% almost done. It has been opened to discuss some things: