Browse Source

AP_UAVCAN: fixed build on Linux

c415-sdk
Andrew Tridgell 5 years ago
parent
commit
b98d5834b4
  1. 2
      libraries/AP_UAVCAN/AP_UAVCAN.h
  2. 2
      libraries/AP_UAVCAN/AP_UAVCAN_DNA_Server.cpp

2
libraries/AP_UAVCAN/AP_UAVCAN.h

@ -176,7 +176,7 @@ private: @@ -176,7 +176,7 @@ private:
uavcan::Node<0> *_node;
uint8_t _driver_index;
char _thread_name[9];
char _thread_name[13];
bool _initialized;
///// SRV output /////
struct {

2
libraries/AP_UAVCAN/AP_UAVCAN_DNA_Server.cpp

@ -546,7 +546,7 @@ void trampoline_handleNodeInfo(const uavcan::ServiceCallResult<uavcan::protocol: @@ -546,7 +546,7 @@ void trampoline_handleNodeInfo(const uavcan::ServiceCallResult<uavcan::protocol:
uavcan::copy(resp.getResponse().hardware_version.unique_id.begin(),
resp.getResponse().hardware_version.unique_id.end(),
unique_id);
snprintf(name, ARRAY_SIZE(name), "%s", resp.getResponse().name.c_str());
strncpy(name, resp.getResponse().name.c_str(), sizeof(name)-1);
AP::uavcan_dna_server().handleNodeInfo(node_id, unique_id, name);
}

Loading…
Cancel
Save