]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
vidle: Clean up indentation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 28 Apr 2010 22:51:38 +0000 (00:51 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 28 Apr 2010 22:51:38 +0000 (00:51 +0200)
src/eb_vidle/main.c

index 3b36e63711ad10e6dc0083c141d2cf05de389c8a..340983a9c4da31bd82dc4a0658ab98f2cf8c5345 100644 (file)
@@ -195,16 +195,16 @@ void init_periphery(void){
 /*********************************************************/
 void can_send_status(void)
 {
-    can_msg_t tx_msg;
-    tx_msg.id = CAN_VIDLE_STATUS;
-    tx_msg.dlc = 5;
-    tx_msg.flags = 0;
-    tx_msg.data[0] = (fsm_vidle.act_pos  >> 8) & 0xFF;
-    tx_msg.data[1] = fsm_vidle.act_pos & 0xFF;
-    tx_msg.data[2] = (fsm_vidle.can_response  >> 8) & 0xFF;
-    tx_msg.data[3] = fsm_vidle.can_response & 0xFF;
-    tx_msg.data[4] = fsm_vidle.flags; 
-    /*while*/(can_tx_msg(&tx_msg)); /* CAN erratum workaround */
+       can_msg_t tx_msg;
+       tx_msg.id = CAN_VIDLE_STATUS;
+       tx_msg.dlc = 5;
+       tx_msg.flags = 0;
+       tx_msg.data[0] = (fsm_vidle.act_pos  >> 8) & 0xFF;
+       tx_msg.data[1] = fsm_vidle.act_pos & 0xFF;
+       tx_msg.data[2] = (fsm_vidle.can_response  >> 8) & 0xFF;
+       tx_msg.data[3] = fsm_vidle.can_response & 0xFF;
+       tx_msg.data[4] = fsm_vidle.flags; 
+       /*while*/(can_tx_msg(&tx_msg)); /* CAN erratum workaround */
 }
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -274,7 +274,6 @@ int main(void)
 
                        //dbg_print_time();
 
-                       /* TODO: Precti potak a uloz ho do fsm_vidle.act_pos */
                        fsm_vidle.act_pos = adc_val[0];
                        
                    
@@ -292,16 +291,16 @@ int main(void)
 #endif 
                if(timer_msec >= led_time + 500)        
                {
-               /*  static int up;
-                 if (up == 0)
-                       fsm_vidle.can_req_position = 0x380;
-                 if (up == 6)
-                       fsm_vidle.can_req_position = 0x1e0;
-                 up = (up+1)%12;
-               */      led_time = timer_msec;
+                       /*  static int up;
+                           if (up == 0)
+                           fsm_vidle.can_req_position = 0x380;
+                           if (up == 6)
+                           fsm_vidle.can_req_position = 0x1e0;
+                           up = (up+1)%12;
+                       */      led_time = timer_msec;
                        deb_led_change(LEDG);
-               send_rs_int(fsm_vidle.act_pos);
-               send_rs_str("\n");
+                       send_rs_int(fsm_vidle.act_pos);
+                       send_rs_str("\n");
                }
                
                if(timer_msec >= bumper_time + 100)     
@@ -316,13 +315,13 @@ int main(void)
                        
                        if (IO0PIN & (1<<BUMPER_PIN))
                        {    
-                         tx_msg.data[0] = 1;
-                         deb_led_on(LEDB);
+                               tx_msg.data[0] = 1;
+                               deb_led_on(LEDB);
                        }
                        else
                        {
-                         tx_msg.data[0] = 0;
-                         deb_led_off(LEDB);
+                               tx_msg.data[0] = 0;
+                               deb_led_off(LEDB);
                        }
                        
                        can_tx_msg(&tx_msg); /* CAN erratum workaround */