summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-06-24 14:28:06 -0700
committerKeith Packard <keithp@keithp.com>2013-06-24 14:30:23 -0700
commite148582217d6e02ac90a68e2bb2532947378d36f (patch)
tree40ca17c7f77826ce85eb5cabf2f048e85a730183 /src
parent261ec8fc7043e9314469e919aa96acc461f7e5f2 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/ao_log.c5
-rw-r--r--src/core/ao_log_mega.c2
2 files changed, 7 insertions, 0 deletions
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)