From 8931f1a75c65de82f7076009d285279d6adf575e Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 29 Mar 2018 23:14:34 -0400 Subject: [PATCH] commander set status_flags.usb_connected directly and delete static --- src/modules/commander/commander.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 0443fd7e69..cc3a3e7dac 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -168,7 +168,6 @@ static orb_advert_t power_button_state_pub = nullptr; static volatile bool thread_should_exit = false; /**< daemon exit flag */ static volatile bool thread_running = false; /**< daemon status flag */ -static bool _usb_telemetry_active = false; static hrt_abstime commander_boot_timestamp = 0; static unsigned int leds_counter; @@ -1268,7 +1267,6 @@ Commander::run() status.data_link_lost = true; status_flags.offboard_control_loss_timeout = false; - status_flags.condition_system_prearm_error_reported = false; status_flags.condition_system_hotplug_timeout = false; status.timestamp = hrt_absolute_time(); @@ -1734,9 +1732,6 @@ Commander::run() usleep(400000); px4_shutdown_request(true, false); } - - /* finally judge the USB connected state based on software detection */ - status_flags.usb_connected = _usb_telemetry_active; } }