]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
eb_jaws_11: Use can message define in color sensor status message
authorMatous Pokorny <matous.pokorny@me.com>
Tue, 2 Oct 2012 03:52:00 +0000 (05:52 +0200)
committerMatous Pokorny <matous.pokorny@me.com>
Tue, 2 Oct 2012 03:52:00 +0000 (05:52 +0200)
src/eb_jaws_11/main.c

index 32868f4c6d09bded28b076cbd432f75e82dfec5d..9d3251b46434230c53f9869223276bb8145ffaa0 100644 (file)
@@ -374,8 +374,11 @@ void cl_sensor_send_status(){
        tx_msg.id = CAN_CL_SENSOR_STATUS;
        tx_msg.dlc = 5;
        tx_msg.flags = 0;
-       tx_msg.data[0] = ((IO1PIN & 1<<CL_SENSOR_OUT) != 0) & 0xFF;// 1 - pattern match 0 - no match
-       if((IO1PIN & 1<<CL_SENSOR_OUT) != 0) send_rs_str("trefa\n");
+       //tx_msg.data[0] = ((IO1PIN & 1<<CL_SENSOR_OUT) != 0) & 0xFF;// 1 - pattern match 0 - no match
+       if((IO1PIN & 1<<CL_SENSOR_OUT) != 0) {
+                tx_msg.data[0] = CAN_CL_SENSOR_PATTERN_MATCH;
+                send_rs_str("trefa\n");
+        } 
        (can_tx_msg(&tx_msg));
 }