]> git.droids-corp.org - aversive.git/commitdiff
dont launch adc on mainboard
authorzer0 <zer0@carbon.local>
Sun, 2 May 2010 22:43:08 +0000 (00:43 +0200)
committerzer0 <zer0@carbon.local>
Sun, 2 May 2010 22:43:08 +0000 (00:43 +0200)
projects/microb2010/mainboard/sensor.c

index fb0bfd92610531829186f6367d27a5a2593f795b..bda3bd56ab8c8b3a8110d7dab36eb4ce61fdacb9 100644 (file)
@@ -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,