From f1b54a67a3317295704f25e2a802e5f86646f4d5 Mon Sep 17 00:00:00 2001 From: zer0 Date: Mon, 3 May 2010 00:43:08 +0200 Subject: [PATCH] dont launch adc on mainboard --- projects/microb2010/mainboard/sensor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/microb2010/mainboard/sensor.c b/projects/microb2010/mainboard/sensor.c index fb0bfd9..bda3bd5 100644 --- a/projects/microb2010/mainboard/sensor.c +++ b/projects/microb2010/mainboard/sensor.c @@ -286,12 +286,14 @@ uint8_t sensor_obstacle_is_disabled(void) /************ global sensor init */ +#define BACKGROUND_ADC 0 #ifndef HOST_VERSION /* called every 10 ms, see init below */ static void do_sensors(void *dummy) { - do_adc(NULL); + if (BACKGROUND_ADC) + do_adc(NULL); do_boolean_sensors(NULL); sensor_obstacle_update(); } @@ -303,7 +305,8 @@ void sensor_init(void) return; #else adc_init(); - adc_register_event(adc_event); + if (BACKGROUND_ADC) + adc_register_event(adc_event); /* CS EVENT */ scheduler_add_periodical_event_priority(do_sensors, NULL, 10000L / SCHEDULER_UNIT, -- 2.39.5