1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

OP-1119 Added logging event for disabling logging.

This commit is contained in:
m_thread 2013-11-25 14:58:08 +01:00
parent 06924d335a
commit 0a085ce106

View File

@ -88,8 +88,13 @@ static void StatusUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
static void SettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
{
DebugLogSettingsGet(&settings);
PIOS_DEBUGLOG_Enable(settings.LoggingEnabled);
PIOS_DEBUGLOG_Printf("Logging enabled");
if (settings.LoggingEnabled) {
PIOS_DEBUGLOG_Enable(settings.LoggingEnabled);
PIOS_DEBUGLOG_Printf("Logging enabled");
} else {
PIOS_DEBUGLOG_Printf("Logging disabled");
PIOS_DEBUGLOG_Enable(settings.LoggingEnabled);
}
}
static void ControlUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)