From 00f86eb895f18d4211c0295d9ac90e7063a7dc67 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 31 Mar 2021 21:35:33 -0400 Subject: [PATCH] drivers/uavcan: silence redundant exit message --- src/drivers/uavcan/uavcan_servers.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/drivers/uavcan/uavcan_servers.cpp b/src/drivers/uavcan/uavcan_servers.cpp index 198f0f2f8b..a279cba2e9 100644 --- a/src/drivers/uavcan/uavcan_servers.cpp +++ b/src/drivers/uavcan/uavcan_servers.cpp @@ -570,19 +570,18 @@ UavcanServers::run(pthread_addr_t) // Shut down once armed // TODO (elsewhere): start up again once disarmed? if (armed_sub.updated()) { - actuator_armed_s armed{}; - armed_sub.copy(&armed); + actuator_armed_s armed; - if (armed.armed && !(armed.lockdown || armed.manual_lockdown)) { - PX4_INFO("UAVCAN command bridge: system armed, exiting now."); - break; + if (armed_sub.copy(&armed)) { + if (armed.armed && !(armed.lockdown || armed.manual_lockdown)) { + PX4_INFO("UAVCAN command bridge: system armed, exiting now."); + } } } } _subnode_thread_should_exit = false; - PX4_INFO("exiting"); return (pthread_addr_t) 0; }