-
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
Add support for MavlinkShell on Linux platform #14399
Add support for MavlinkShell on Linux platform #14399
Conversation
Nice. When this goes in we should update https://dev.px4.io/master/en/debug/mavlink_shell.html and possibly https://docs.qgroundcontrol.com/en/analyze_view/mavlink_console.html (assuming that is the access method?) |
This PR failed to work with sitl, but I don't know why. Maybe I would simply drop the support for sitl with macros. |
Well it isn't so critical on SITL because you can drive the system from the terminal in which you started it. |
e9cc409
to
db7b878
Compare
This implement seems is not elegant at all. Needs some tests on other Linux boards to verify its effectiveness.(#14404) It's really confusing that SITL would crash with segment fault. I don't know whether this PR worth to be merged or not. |
db7b878
to
ddbae5c
Compare
This reverts commit ac70d27.
@@ -1,5 +1,7 @@ | |||
add_definitions( | |||
-D__PX4_LINUX | |||
|
|||
-D__PX4_LINUX_CONSOLE |
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.
If there somewhere we wouldn't want this?
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 PR won't work with SITL at all. I don't know why. Since SITL shares __PX4_LINUX
as well, I tried to introduce __PX4_LINUX_CONSOLE
. Also this PR won't work with QURT because I use poll
logic.
Note for later, you might be interested in extending PX4 dmesg (#11792) for Linux as well. |
It seems the function of Nuttx |
Not critical, but still very nice to have. I got plenty gazebo simulations running as systemd services, so getting a serial console is quite frustrating there (kill the px4 process, restart it manually) |
It sounds a little difficult but I'll try it... |
@SalimTerryLi how is the progress here? |
Sorry but I moved to other tasks those days, may not be able to focus on that in a few weeks. It really requires a lot of investigation for me but I'm not urgently need that function... |
This would still be helpful. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
This is somewhat replaced by #19800, right? |
That is. I'm closing this now :) |
Describe problem solved by this pull request
This PR enables MavlinkShell on Linux based boards like RPi.
Describe your solution
A new thread is launched to capture and duplicate stdin.
Add extra codes in
px4_log.cpp
to duplicate stdout.QGC doesn't deal with control characters so each
_print_prompt()
would mess up the latest line in QGC.Describe possible alternatives
Better implement can only be achieved if the whole pxh is designed in another way which is similar to pty.(maybe)
Test data / coverage
Works on RPi. Screenshots here.