Subversion Repositories svnkaklik

Rev

Rev 252 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 252 Rev 253
Line 24... Line 24...
24
   output_high(MOT_L);
24
   output_high(MOT_L);
25
   output_low(MOT_R);
25
   output_low(MOT_R);
26
   odocounter=get_timer1();
26
   odocounter=get_timer1();
27
   while(true) // Na zacatku se vyhni cihle, zatoc co muzes
27
   while(true) // Na zacatku se vyhni cihle, zatoc co muzes
28
   {
28
   {
29
      cas=CASMIN-5;       // jeste vic nez hodne do leva
29
      cas=CASMIN;//!!!-5;       // jeste vic nez hodne do leva
30
 
30
 
31
      if(BUMPER) // Narazili jsme do cihly, musime couvnout!
31
      if(BUMPER) // Narazili jsme do cihly, musime couvnout!
32
      {
32
      {
33
         bum();
33
         bum();
34
         SaveLog(log-1);      // Zapis Black Boxu do EEPROM
34
         SaveLog(log-1);      // Zapis Black Boxu do EEPROM
Line 146... Line 146...
146
      disp(visualisation);
146
      disp(visualisation);
147
   };
147
   };
148
   disp(0xC3);
148
   disp(0xC3);
149
 
149
 
150
   set_pwm1_duty(0);    //!!! pred zatuhlejma prevodovkama tam bylo 20 a 200
150
   set_pwm1_duty(0);    //!!! pred zatuhlejma prevodovkama tam bylo 20 a 200
151
   set_pwm2_duty(255);
151
   set_pwm2_duty(220);
152
   output_high(MOT_L);
152
   output_high(MOT_L);
153
   output_low(MOT_R);
153
   output_low(MOT_R);
154
   delay_us(40);
154
   delay_us(40);
155
   odocounter=get_timer1();    // Poznamenej aktualni stav odometrie
155
   odocounter=get_timer1();    // Poznamenej aktualni stav odometrie
156
   while (true)  // Znovu se musime dotknout cary
156
   while (true)  // Znovu se musime dotknout cary