-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
drivers: px4io add 'support' command and update rcS logic #22368
Conversation
4023f61
to
cf78032
Compare
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.
I think all you need is
if px4io supported
then
...
fi
iff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp
index 3e24fc48ba..e3d88864cb 100644
--- a/src/drivers/px4io/px4io.cpp
+++ b/src/drivers/px4io/px4io.cpp
@@ -1556,6 +1556,10 @@ int PX4IO::custom_command(int argc, char *argv[])
{
const char *verb = argv[0];
- if (!strcmp(verb, "supported")) {
-
return 0;
- }
@AlexKlimaj have a look at 6372bec |
cf78032
to
1abb123
Compare
This works on my Pixhawk4 mini (at least it doesn't beep anymore). |
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.
LGTM we could soften https://github.com/PX4/PX4-Autopilot/pull/22368/files#diff-ff52cb1224c92cc672316dab2f93a98e7db09fb08ccdfbb9fb0015e8d86f1387L1764 to a warning or info
Changed to INFO. Really shouldn't be an error or warning if its expected to not be there. It should be a warning if it should be there and fails to update or start. |
This PR adds a "supported" command to the px4io driver. If its not supported, then rcS won't attempt to update the IO MCU and start it.
Fixes #22356