Skip to content
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

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

AlexKlimaj
Copy link
Member

@AlexKlimaj AlexKlimaj commented Nov 14, 2023

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

@AlexKlimaj AlexKlimaj force-pushed the pr-ver-px4io-check branch 2 times, most recently from 4023f61 to cf78032 Compare November 14, 2023 19:10
julianoes
julianoes previously approved these changes Nov 14, 2023
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexKlimaj

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;
    
  • }

ROMFS/px4fmu_common/init.d/rcS Outdated Show resolved Hide resolved
src/systemcmds/ver/ver.cpp Outdated Show resolved Hide resolved
@davids5
Copy link
Member

davids5 commented Nov 16, 2023

@AlexKlimaj have a look at 6372bec

@AlexKlimaj AlexKlimaj changed the title systemcmds: ver add px4io manifest check and update rcS logic drivers: px4io add support command and update rcS logic Nov 16, 2023
@davids5 davids5 changed the title drivers: px4io add support command and update rcS logic drivers: px4io add 'support' command and update rcS logic Nov 17, 2023
@bresch
Copy link
Member

bresch commented Nov 17, 2023

This works on my Pixhawk4 mini (at least it doesn't beep anymore).

davids5
davids5 previously approved these changes Nov 17, 2023
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexKlimaj
Copy link
Member Author

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.

@davids5 davids5 merged commit 1b99e7d into PX4:main Nov 20, 2023
80 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Boards with no PX4IO MCU play error tune on startup
4 participants