-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hi there,
I've encountered following problem:
Currently all mavlink messages with system_id != 1
or component_id != 1
are discarded:
cockpit/src/libs/vehicle/ardupilot/ardupilot.ts
Lines 309 to 311 in 83ebc63
if (system_id !== this.currentSystemId || component_id !== 1) { | |
return | |
} |
This is a problem when trying to use mavlink messages from a separate component e.g. in a Very Generic Indicator. If you have control over the communicating component you can work around this by setting system and component id of its messages to 1. Although with certain side effects, see below. It would be nice if this was not necessary.
As a concrete example I've recently integrated a separate hardware component into a BlueROV system. The components sends a sensor reading via mavlink to be displayed in Cockpit and also listens to a mavlink message to control attached lights. Using the above workaround you can get the messages to show up in Cockpit, with one caveat: The mavlink router service will stop forwarding messages of a certain component id to an endpoint if that endpoint sends messages containing said id. This means that in this concrete example you need to configure two separate endpoints for incoming and outgoing messages because the outgoing messages with component_id 1 will prevent all other BlueROV messages from being forwarded to it.