Browse Source

AP_UAVCAN: continue dna server setup even if unique id not received

master
Siddharth Purohit 6 years ago committed by Andrew Tridgell
parent
commit
0976019133
  1. 19
      libraries/AP_UAVCAN/AP_UAVCAN.cpp

19
libraries/AP_UAVCAN/AP_UAVCAN.cpp

@ -186,20 +186,19 @@ void AP_UAVCAN::init(uint8_t driver_index) @@ -186,20 +186,19 @@ void AP_UAVCAN::init(uint8_t driver_index)
if (hal.util->get_system_id_unformatted(unique_id, uid_len)) {
uavcan::copy(unique_id, unique_id + uid_len, hw_version.unique_id.begin());
}
_node->setHardwareVersion(hw_version);
_node->setHardwareVersion(hw_version);
int start_res = _node->start();
if (start_res < 0) {
debug_uavcan(1, "UAVCAN: node start problem, error %d\n\r", start_res);
return;
}
int start_res = _node->start();
if (start_res < 0) {
debug_uavcan(1, "UAVCAN: node start problem, error %d\n\r", start_res);
return;
}
//Start Servers
//Start Servers
#ifdef HAS_UAVCAN_SERVERS
_servers.init(*_node);
_servers.init(*_node);
#endif
}
// Roundup all subscribers from supported drivers
AP_GPS_UAVCAN::subscribe_msgs(this);
AP_Compass_UAVCAN::subscribe_msgs(this);

Loading…
Cancel
Save