mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 04:23:35 +08:00
Blah blah
This commit is contained in:
@@ -118,7 +118,6 @@ TEST(dynamic_node_id_server_NodeDiscoverer, Basic)
|
||||
ASSERT_LE(0, node_status_pub.init());
|
||||
|
||||
uavcan::protocol::NodeStatus node_status;
|
||||
node_status.status_code = node_status.STATUS_OK; // Status will be ignored anyway
|
||||
node_status.uptime_sec = 0;
|
||||
ASSERT_LE(0, node_status_pub.broadcast(node_status));
|
||||
|
||||
@@ -222,7 +221,6 @@ TEST(dynamic_node_id_server_NodeDiscoverer, RestartAndMaxAttempts)
|
||||
ASSERT_LE(0, node_status_pub.init());
|
||||
|
||||
uavcan::protocol::NodeStatus node_status;
|
||||
node_status.status_code = node_status.STATUS_OK; // Status will be ignored anyway
|
||||
node_status.uptime_sec = 10; // Nonzero
|
||||
ASSERT_LE(0, node_status_pub.broadcast(node_status));
|
||||
|
||||
@@ -240,7 +238,6 @@ TEST(dynamic_node_id_server_NodeDiscoverer, RestartAndMaxAttempts)
|
||||
/*
|
||||
* Emulating node restart
|
||||
*/
|
||||
node_status.status_code = node_status.STATUS_OK; // Status will be ignored anyway
|
||||
node_status.uptime_sec = 9; // Less than previous
|
||||
ASSERT_LE(0, node_status_pub.broadcast(node_status));
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
void handleNodeStatusChange(const NodeStatusChangeEvent& event) override
|
||||
{
|
||||
std::cout << "Remote node NID " << int(event.node_id.get()) << " changed status: "
|
||||
<< int(event.old_status.status_code) << " --> "
|
||||
<< int(event.status.status_code) << std::endl;
|
||||
<< event.old_status.toString() << " --> "
|
||||
<< event.status.toString() << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user