]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
disp: added send to ctrl
authorMartin Zidek <zidekm1@gmail.com>
Tue, 14 Apr 2009 18:47:07 +0000 (20:47 +0200)
committerMartin Zidek <zidekm1@gmail.com>
Tue, 14 Apr 2009 18:47:07 +0000 (20:47 +0200)
src/disp-4dgl/ctrl.4dg

index 80df4e91690b3b60ee11699cb3cb06ea2e503bb5..1597ab7c79f6644a9db8c96ad85994f6b847f856 100644 (file)
@@ -35,6 +35,18 @@ var msg_buff[MSG_BUFF_LEN];
 var bt_y[20];\r
 var bt_x[20];\r
 var out_buff[3];\r
+var msg_len;\r
+\r
+func send_msg()\r
+    var idx;\r
+    idx := 0;\r
+    \r
+    repeat\r
+        serout(msg_buff[idx]);\r
+        idx++;\r
+    until(idx==msg_len)\r
+\r
+endfunc\r
 \r
 func act_lift_calib()\r
     out_buff[0]:=MSG_START;\r
@@ -195,24 +207,31 @@ var col, state, x, y;
             y := touch_Get(TOUCH_GETY);\r
             if((y > bt_y[BT_LIFT_CALIB])&&(y<bt_y[BT_PUSHER_IN]))\r
                 lift_calib_bt(UP);\r
+                act_lift_calib();\r
             endif            \r
             if((y > bt_y[BT_PUSHER_IN])&&(y<bt_y[BT_PUSHER_OUT]))\r
                 pusher_in_bt(UP);\r
+                act_pusher_in();\r
             endif            \r
             if((y > bt_y[BT_PUSHER_OUT])&&(y<bt_y[BT_LIFT_UP]))\r
                 pusher_out_bt(UP);\r
+                act_pusher_out();\r
             endif            \r
             if((y > bt_y[BT_LIFT_UP])&&(y<bt_y[BT_LIFT_DOWN]))\r
                 lift_up_bt(UP);\r
+                act_lift_up();\r
             endif            \r
             if((y > bt_y[BT_LIFT_DOWN])&&(y<bt_y[BT_CMU_INIT]))\r
                 lift_down_bt(UP);\r
+                act_lift_down();\r
             endif            \r
             if((y > bt_y[BT_CMU_INIT])&&(y<bt_y[BT_START]))\r
                 cmu_init_bt(UP);\r
+                act_cmu_init();\r
             endif            \r
             if((y > bt_y[BT_START])&&(y<bt_y[BT_COLOR]))\r
                 start_bt(UP);\r
+                act_start();\r
             endif       \r
         endif\r
 endfunc\r