mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
logger status output: print 'Not logging' if not actually logging
This commit is contained in:
@@ -208,13 +208,20 @@ int Logger::print_status()
|
|||||||
{
|
{
|
||||||
PX4_INFO("Running in mode: %s", configured_backend_mode());
|
PX4_INFO("Running in mode: %s", configured_backend_mode());
|
||||||
|
|
||||||
|
bool is_logging = false;
|
||||||
if (_writer.is_started(LogWriter::BackendFile)) {
|
if (_writer.is_started(LogWriter::BackendFile)) {
|
||||||
PX4_INFO("File Logging Running");
|
PX4_INFO("File Logging Running");
|
||||||
print_statistics();
|
print_statistics();
|
||||||
|
is_logging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_writer.is_started(LogWriter::BackendMavlink)) {
|
if (_writer.is_started(LogWriter::BackendMavlink)) {
|
||||||
PX4_INFO("Mavlink Logging Running");
|
PX4_INFO("Mavlink Logging Running");
|
||||||
|
is_logging = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_logging) {
|
||||||
|
PX4_INFO("Not logging");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user