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:
JacobCrabill
2020-03-21 12:39:29 -04:00
committed by Daniel Agar
parent 1fe79818d9
commit 71e4a36ba4
4 changed files with 61 additions and 59 deletions
+15 -2
View File
@@ -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);