-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
generalize serial port configuration #8302
Comments
Thinking about this some more, I'm now considering placing the burden of configuration on each Driver/Module itself. I don't see how we could handle configuration per serial port without maintaining large lists of every possible option. This starts to fall apart when you think about boards that only include a subset of Drivers, custom configurations, deleting old drivers, or vendor proprietary extensions. The downside is PX4 itself would need to deconflict serial port usage. I think this is relatively easy to do if we use the Driver base class for serial devices as well. |
For the board manifest we need to know.
|
GPS
Mavlink
Serial port drivers standard configuration
misc
|
How about this:
potential downsides:
|
@bkueng that's what I wanted to do initially, but I see various issues with either maintaining lists of all possible serial drivers (+ range of configurations) or generating that list (parameter stability). Splitting baudrate helps, but there's more than that. You can end up with a large number of options that aren't possible or relevant for the specific build you're using. The other problem is that our init scripts are currently a bad way to handle this as they aren't even used on many platforms (or many custom nuttx configurations for that matter). We already have many frustrating configuration holes where active parameters shown to the user don't do anything. What I was wondering about was pushing the configuration to each module as parameters plus special parameter types for specifying the port. Eventually we could have QGC collect all of these (imagine a board graphic where you click on each port) and let you select the configuration per port. Pros
Cons
|
I'm sure you've through all this through ...
|
@dagar I agree, my proposal aims to be simple, user-friendly and implementable, not necessarily the best in the long-term (though it would allow for a QGC board graphic too). And I would prefer a solution where each module specifies its own configuration as well. But the current situation is already limiting for various users/use cases, among which:
And given that this issue has been long standing, we should aim for something that actually gets implemented sometime soon.
I'm still for the posix shell, which would fundamentally solve this. @hamishwillee agreed with all points. For the first one: you would be able to run every driver on any of the available UART ports, thus having maximum flexibility. |
Sounds like we're on the same page. That would still definitely be an improvement if someone is able to implement it right now. Otherwise I'll eventually get around to it when I stumble across a solution that checks all the boxes. Minor note - many of the distance sensor drivers evolved with their own configuration that could be rolled into this. A mix of boolean parameters to enable/disable, but with hard coded serial ports, or sometimes set in the init script.
Yes! |
Distance sensors should all definitely share the same approach (whatever it is), if only so that setup instructions can all be harmonised. You both talk about this mysterious implementer - who is that likely to be? Is there any docs on the posix shell solution? - just FMI (I'm interested on what this is, why this solves the problem, and why we don't use it). I fill like I'm missing an in-joke. If this is too much effort to point me to, don't worry about it. |
Haha, that is the biggest question :) Probably me or Daniel, whoever finds the time first.
It's a feature that so far has not been finished (#5162). Basically it would allow us to use the NuttX startup scripts also on Linux. |
Idea for doing the configuration per module.
Does this solution leave anything unresolved? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
this would be a useful feature if implemented! |
@Antiheavy This was implemented :-) The conflict checks only happen on boot. |
We need to generalize serial port configuration (exposed as parameters) with appropriate defaults set per board.
For the most part these are hard coded, but with SYS_COMPANION (telem2) configurable. I'd like to extend that to all serial ports.
Previous issue #5184
TODO
The text was updated successfully, but these errors were encountered: