-
Notifications
You must be signed in to change notification settings - Fork 744
Better filtering of MAVLink components #1116
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
Conversation
24f39f3 to
56a269a
Compare
|
PR has now been re-engineered for the general case:
|
|
It has been tested on SITL with the ADSB simulator, and a CubeOrange with custom MAVLink peripheral. Messages are still routed correctly. |
MAVProxy/modules/mavproxy_link.py
Outdated
| return | ||
|
|
||
| if getattr(m, 'time_boot_ms', None) is not None and self.settings.target_system == m.get_srcSystem(): | ||
| if getattr(m, 'time_boot_ms', None) is not None and self.is_primary_vehicle(m): |
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 is a good change - components won't necessarily have the same timestamp as the parent vehicle.
| for (mod,pm) in self.mpstate.modules: | ||
| if not hasattr(mod, 'mavlink_packet'): | ||
| continue | ||
| # Do not send other-system-or-component heartbeat packets to non-multi-vehicle modules |
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.
Will this break mavproxy_gimbal.py? That's the first module I thought of...
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.
Checked - gimbal still works. I'm only not sending heartbeats here
56a269a to
43bb1df
Compare
|
Using The changes in |
43bb1df to
84ee114
Compare
peterbarker
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.
fence module still says "fence removed" / "fence present" when moving between vehicles
Testing went well.
|
Merged, thanks! |
This adds the appropriate filters so that
MAV_COMP_ID_PERIPHERALdevices can be used without confusing MAVProxy.EDIT:
This PR now allows any MAVLink accessories (same sysid as flight controller, different component id) to:
a) Not confuse MAVProxy if the accessory is sending a heartbeat
b) Selecting the accessory in the console->vehicle->select menu correctly filters packets from the accessory to non-multi-vehicle-aware modules.