From e148582217d6e02ac90a68e2bb2532947378d36f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 24 Jun 2013 14:28:06 -0700 Subject: [PATCH] altos: Support mega-style logging without ADC Used for TeleGPS, just exposes the necessary log writing function without also including the ADC writing code. Signed-off-by: Keith Packard --- src/core/ao_log.c | 5 +++++ src/core/ao_log_mega.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/core/ao_log.c b/src/core/ao_log.c index 7884ec3c..8bcb7707 100644 --- a/src/core/ao_log.c +++ b/src/core/ao_log.c @@ -278,6 +278,11 @@ ao_log_init(void) ao_cmd_register(&ao_log_cmds[0]); +#ifndef HAS_ADC +#error Define HAS_ADC for ao_log.c +#endif +#if HAS_ADC /* Create a task to log events to eeprom */ ao_add_task(&ao_log_task, ao_log, "log"); +#endif } diff --git a/src/core/ao_log_mega.c b/src/core/ao_log_mega.c index ee12b907..768947d5 100644 --- a/src/core/ao_log_mega.c +++ b/src/core/ao_log_mega.c @@ -65,6 +65,7 @@ ao_log_dump_check_data(void) return 1; } +#if HAS_ADC static __data uint8_t ao_log_data_pos; /* a hack to make sure that ao_log_megas fill the eeprom block in even units */ @@ -182,6 +183,7 @@ ao_log(void) ao_sleep(&ao_log_running); } } +#endif uint16_t ao_log_flight(uint8_t slot) -- 2.30.2