Skip to content
Snippets Groups Projects
Commit 66b9ee2d authored by Lorenz Meier's avatar Lorenz Meier
Browse files

UAVCAN: Make GPS module use the multi-topic facility so that a normal GPS and...

UAVCAN: Make GPS module use the multi-topic facility so that a normal GPS and an UAVCAN GPS can co-exist and do not write on top of each other.
parent da198a40
No related branches found
No related tags found
No related merge requests found
......@@ -180,11 +180,8 @@ void UavcanGnssBridge::gnss_fix_sub_cb(const uavcan::ReceivedDataStructure<uavca
report.hdop = msg.pdop;
report.vdop = msg.pdop;
if (_report_pub != nullptr) {
orb_publish(ORB_ID(vehicle_gps_position), _report_pub, &report);
} else {
_report_pub = orb_advertise(ORB_ID(vehicle_gps_position), &report);
}
// Publish to a multi-topic
int32_t gps_orb_instance;
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_pub, &report, &gps_orb_instance,
ORB_PRIO_HIGH);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment