make it possible to completely disable logging
set LOGGING_ENABLED to DISABLED to disable all logging. This saves about 10k of flash when disabled. git-svn-id: https://arducopter.googlecode.com/svn/trunk@2886 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
fdf090b471
commit
8a7466d1a2
@ -1,5 +1,7 @@
|
||||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
#if LOGGING_ENABLED == ENABLED
|
||||
|
||||
// Code to Write and Read packets from DataFlash log memory
|
||||
// Code to interact with the user to dump or erase logs
|
||||
|
||||
@ -829,5 +831,22 @@ void Log_Read(int start_page, int end_page)
|
||||
}
|
||||
}
|
||||
|
||||
#else // LOGGING_ENABLED
|
||||
|
||||
void Log_Write_Startup() {}
|
||||
void Log_Read_Startup() {}
|
||||
void Log_Read(int start_page, int end_page) {}
|
||||
void Log_Write_Cmd(byte num, struct Location *wp) {}
|
||||
void Log_Write_Mode(byte mode) {}
|
||||
void start_new_log() {}
|
||||
void Log_Write_Raw() {}
|
||||
void Log_Write_GPS() {}
|
||||
void Log_Write_Current() {}
|
||||
void Log_Write_Attitude() {}
|
||||
void Log_Write_Nav_Tuning() {}
|
||||
void Log_Write_Control_Tuning() {}
|
||||
void Log_Write_Motors() {}
|
||||
void Log_Write_Performance() {}
|
||||
int8_t process_logs(uint8_t argc, const Menu::arg *argv) { return 0; }
|
||||
|
||||
#endif // LOGGING_ENABLED
|
||||
|
@ -456,6 +456,11 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Dataflash logging control
|
||||
//
|
||||
|
||||
#ifndef LOGGING_ENABLED
|
||||
# define LOGGING_ENABLED ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef LOG_ATTITUDE_FAST
|
||||
# define LOG_ATTITUDE_FAST DISABLED
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user