]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
laser-io: a new macro to define sending immediately after reflections
authorTran Duy Khanh <trandk1@fel.cvut.cz>
Sat, 26 Apr 2008 18:31:38 +0000 (20:31 +0200)
committerTran Duy Khanh <trandk1@fel.cvut.cz>
Sat, 26 Apr 2008 18:31:38 +0000 (20:31 +0200)
or not.

src/laser-io/laser-rotaring.c

index 31750f6effc2f6e323ee0a3675f33b4c2a9745f8..eefee721ae4b7a591bd739e00b6da876854516d6 100644 (file)
@@ -47,6 +47,7 @@ enum {
 /* define USE_IRC to use IRC to measure angles else the TPU will be used */
 #define USE_IRC
 #undef USE_IRC
+#define SEND_AFTER_REFLECTION
 
 static int prog_flag = EMPTY;
 static int set_ref_done = 0;
@@ -270,6 +271,9 @@ void isr_beacon(void)
                led++;
        }
 
+       deb_led_out(led);
+
+#ifdef SEND_AFTER_REFLECTION
        time[LAS_MEAS_CNTI] = meas_cnt;
        time[LAS_MEAS_PERI] = average_period;
 
@@ -278,9 +282,9 @@ void isr_beacon(void)
        memcpy(meas, time, LAS_CNT*sizeof(time[0]));
        memset(time, 0, LAS_CNT*sizeof(time[0]));
 
-       deb_led_out(led);
-       
        prog_flag = INT_LASER;
+#endif
+       
        /* clean interrupt source */
        *TPU_TSR3 &= ~TSR3_TGFBm;
 }