]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
cand: added all sharps
authorMartin Zidek <zidekm1@gmail.com>
Thu, 1 May 2008 07:40:37 +0000 (09:40 +0200)
committerMartin Zidek <martin@martinzidek.com>
Thu, 1 May 2008 07:40:37 +0000 (09:40 +0200)
src/cand/eb2008/cand_eb2008.cc

index 8f2fdbe229ef301f1ec37facede9cf1fcec93500..8f482f939867babfaca41dbf449ed44d9149c877 100644 (file)
@@ -271,6 +271,17 @@ int cand_parse_frame(struct eb2008_orte_data *orte_eb2008,
                        ORTEPublicationSend(orte_eb2008->publication_sharps);
                        break;
 
+               case CAN_ADC_2:
+                       orte_eb2008->sharps.front_left = s_gp2y0a21_ir2mmLong((frame.data[0] << 8)| \
+                                                         (frame.data[1]))/1000.0;
+                       orte_eb2008->sharps.left = s_gp2y0a21_ir2mmLong((frame.data[2] << 8)| \
+                                                         (frame.data[3]))/1000.0;
+                       orte_eb2008->sharps.back_left = s_gp2d120_ir2mmShort((frame.data[4] << 8)| \
+                                                         (frame.data[5]))/1000.0;
+                       orte_eb2008->sharps.back_right = s_gp2d120_ir2mmShort((frame.data[6] << 8)| \
+                                                         (frame.data[7]))/1000.0;
+                       ORTEPublicationSend(orte_eb2008->publication_sharps);
+                       break;
                /* laser data */
                case CAN_LAS1:
 //                     printf("CAN: ");