mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:03:33 +08:00
UAVCAN: GNSS sensor bridge: Support multiple pubs
UavcanGnssBridge did not support more than 1 GNSS callback/publisher. This has now been fixed; it works the same as the baro, mag, and flow sensor bridges. The EKF2 still doesn't support more than 2 GPS publishers, however.
This commit is contained in:
committed by
Daniel Agar
parent
1fe79818d9
commit
71e4a36ba4
@@ -154,8 +154,21 @@ UavcanCDevSensorBridgeBase::get_num_redundant_channels() const
|
||||
return out;
|
||||
}
|
||||
|
||||
void
|
||||
UavcanCDevSensorBridgeBase::print_status() const
|
||||
int8_t UavcanCDevSensorBridgeBase::get_channel_index_for_node(int node_id)
|
||||
{
|
||||
int8_t ch = -1;
|
||||
|
||||
for (unsigned i = 0; i < _max_channels; i++) {
|
||||
if (_channels[i].node_id == node_id) {
|
||||
ch = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ch;
|
||||
}
|
||||
|
||||
void UavcanCDevSensorBridgeBase::print_status() const
|
||||
{
|
||||
printf("devname: %s\n", _class_devname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user