mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 14:51:37 +08:00
MAVLink app: Make debug messages a compile time check
The debug messages are too verbose to be run in a production vehicle and inherently were something that should only be run in SITL / debug sessions on hardware. Switching the flag to the PX4_DEBUG() macro does not only make this more explicit, but also saves a lot of flash space that otherwise was consumed by the strings.
This commit is contained in:
committed by
Daniel Agar
parent
f1a3fd09a3
commit
6227139df1
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2017 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2012-2018 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -2368,9 +2368,6 @@ MavlinkReceiver::receive_thread(void *arg)
|
||||
ssize_t nread = 0;
|
||||
hrt_abstime last_send_update = 0;
|
||||
|
||||
bool verbose = _mavlink->get_verbose();
|
||||
_mission_manager.set_verbose(verbose);
|
||||
|
||||
while (!_mavlink->_task_should_exit) {
|
||||
if (poll(&fds[0], 1, timeout) > 0) {
|
||||
if (_mavlink->get_protocol() == SERIAL) {
|
||||
@@ -2475,11 +2472,6 @@ MavlinkReceiver::receive_thread(void *arg)
|
||||
|
||||
_mavlink_log_handler.send(t);
|
||||
last_send_update = t;
|
||||
|
||||
if (verbose != _mavlink->get_verbose()) {
|
||||
verbose = !verbose;
|
||||
_mission_manager.set_verbose(verbose);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user