Browse Source

Rover: disable CLI on APM2 by default

saves lots of flash. This is also consistent with plane and copter
master
Andrew Tridgell 10 years ago
parent
commit
e1b998f011
  1. 21
      APMrover2/Log.pde
  2. 4
      APMrover2/config.h

21
APMrover2/Log.pde

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#if LOGGING_ENABLED == ENABLED
#if CLI_ENABLED == ENABLED
// Code to Write and Read packets from DataFlash log memory
// Code to interact with the user to dump or erase logs
@ -93,13 +95,6 @@ dump_log(uint8_t argc, const Menu::arg *argv) @@ -93,13 +95,6 @@ dump_log(uint8_t argc, const Menu::arg *argv)
}
static void do_erase_logs(void)
{
cliSerial->printf_P(PSTR("\nErasing log...\n"));
DataFlash.EraseAll();
cliSerial->printf_P(PSTR("\nLog erased.\n"));
}
static int8_t
erase_logs(uint8_t argc, const Menu::arg *argv)
{
@ -163,6 +158,16 @@ process_logs(uint8_t argc, const Menu::arg *argv) @@ -163,6 +158,16 @@ process_logs(uint8_t argc, const Menu::arg *argv)
return 0;
}
#endif // CLI_ENABLED == ENABLED
static void do_erase_logs(void)
{
cliSerial->printf_P(PSTR("\nErasing log...\n"));
DataFlash.EraseAll();
cliSerial->printf_P(PSTR("\nLog erased.\n"));
}
struct PACKED log_Performance {
LOG_PACKET_HEADER;
uint32_t time_ms;
@ -386,6 +391,7 @@ static const struct LogStructure log_structure[] PROGMEM = { @@ -386,6 +391,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
};
#if CLI_ENABLED == ENABLED
// Read the DataFlash log memory : Packet Parser
static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page)
{
@ -399,6 +405,7 @@ static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page) @@ -399,6 +405,7 @@ static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page)
print_mode,
cliSerial);
}
#endif // CLI_ENABLED
// start a new log
static void start_logging()

4
APMrover2/config.h

@ -324,7 +324,11 @@ @@ -324,7 +324,11 @@
// use this to completely disable the CLI
#ifndef CLI_ENABLED
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
# define CLI_ENABLED ENABLED
#else
# define CLI_ENABLED DISABLED
#endif
#endif
// if RESET_SWITCH_CH is not zero, then this is the PWM value on

Loading…
Cancel
Save