mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 16:43:34 +08:00
GetNodeInfo - UAVCAN stack version removed
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
# Version information shall not be changed while the node is running.
|
||||
HardwareVersion hardware_version
|
||||
SoftwareVersion software_version
|
||||
SoftwareVersion uavcan_version
|
||||
|
||||
# Current node status
|
||||
NodeStatus status
|
||||
|
||||
# Human readable non-empty ASCII node name.
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
#define UAVCAN_VERSION_MAJOR 0
|
||||
#define UAVCAN_VERSION_MINOR 1
|
||||
#define UAVCAN_VERSION_BUILD 0
|
||||
|
||||
/**
|
||||
* UAVCAN can be compiled in C++11 mode.
|
||||
|
||||
@@ -57,10 +57,6 @@ public:
|
||||
{
|
||||
UAVCAN_ASSERT(!creation_timestamp_.isZero());
|
||||
|
||||
node_info_.uavcan_version.major = UAVCAN_VERSION_MAJOR;
|
||||
node_info_.uavcan_version.minor = UAVCAN_VERSION_MINOR;
|
||||
node_info_.uavcan_version.build = UAVCAN_VERSION_BUILD;
|
||||
|
||||
node_info_.status.status_code = protocol::NodeStatus::STATUS_INITIALIZING;
|
||||
|
||||
// NodeStatus TX timeout equals its publication period minus some arbitrary time gap:
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace uavcan
|
||||
bool NodeStatusProvider::isNodeInfoInitialized() const
|
||||
{
|
||||
// Hardware/Software versions are not required
|
||||
return (node_info_.uavcan_version != protocol::SoftwareVersion()) && (!node_info_.name.empty());
|
||||
return !node_info_.name.empty();
|
||||
}
|
||||
|
||||
int NodeStatusProvider::publish()
|
||||
|
||||
@@ -63,10 +63,6 @@ TEST(Dsdl, Streaming)
|
||||
" major: 0\n"
|
||||
" minor: 0\n"
|
||||
" build: 0\n"
|
||||
"uavcan_version: \n"
|
||||
" major: 0\n"
|
||||
" minor: 0\n"
|
||||
" build: 0\n"
|
||||
"status: \n"
|
||||
" uptime_sec: 0\n"
|
||||
" status_code: 0\n"
|
||||
|
||||
@@ -81,10 +81,6 @@ TEST(NodeStatusProvider, Basic)
|
||||
ASSERT_TRUE(hwver == gni_cln.collector.result->response.hardware_version);
|
||||
ASSERT_TRUE(swver == gni_cln.collector.result->response.software_version);
|
||||
|
||||
ASSERT_EQ(UAVCAN_VERSION_MAJOR, gni_cln.collector.result->response.uavcan_version.major);
|
||||
ASSERT_EQ(UAVCAN_VERSION_MINOR, gni_cln.collector.result->response.uavcan_version.minor);
|
||||
ASSERT_EQ(UAVCAN_VERSION_BUILD, gni_cln.collector.result->response.uavcan_version.build);
|
||||
|
||||
ASSERT_EQ("superluminal_communication_unit", gni_cln.collector.result->response.name);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user