Subversion Repositories Projects

Rev

Rev 486 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 486 Rev 488
Line 321... Line 321...
321
          break;
321
          break;
Line 322... Line 322...
322
       
322
       
Line -... Line 323...
-
 
323
        case STATEID_CONNECTING:
-
 
324
         
-
 
325
 
323
        case STATEID_CONNECTING:
326
 
Line 324... Line 327...
324
         
327
 
325
 
328
         
-
 
329
          confirm_misses=0;
-
 
330
 
-
 
331
          RxBuffer[2]=0;
-
 
332
          if (connected)
326
          confirm_misses=0;
333
            {
327
 
334
              read_from_mk();
Line 328... Line 335...
328
          RxBuffer[2]=0;
335
              if (RxBuffer[2]=='B')
329
          if (connected)
336
                complete_misses++;
330
            while (RxBuffer[2]!='B')
337
              /*while (RxBuffer[2]!='B')
Line 342... Line 349...
342
              //              RxBuffer[2]=0;
349
              //              RxBuffer[2]=0;
Line 343... Line 350...
343
 
350
 
Line 344... Line 351...
344
              //              r=0;
351
              //              r=0;
345
 
352
 
346
              // new
353
              // new
347
              /*
354
             
348
              if (button_trigger[12]>1)
355
              //if (button_trigger[12]>1)
349
                {
356
              //        {
350
                  SendOutData('s', 0, (unsigned char *)&ExternControl, sizeof(ExternControl));
-
 
351
                  button_trigger[12]=0;
357
              //          SendOutData('s', 0, (unsigned char *)&ExternControl, sizeof(ExternControl));
-
 
358
              //          button_trigger[12]=0;
352
                }
359
              //        }
353
              */
360
             
354
              ExternControl.Frame='t';
361
              ExternControl.Frame='t';
355
              if (++confirm_misses>4)
362
              if (++confirm_misses>4)
356
                {
363
                {
357
                  complete_misses++;
364
                  complete_misses++;
358
                  printf("sending again\n");
365
                  printf("sending again\n");
-
 
366
                  SendOutData('b', 0, (unsigned char *)&ExternControl, sizeof(ExternControl));
359
                  SendOutData('b', 0, (unsigned char *)&ExternControl, sizeof(ExternControl));
367
                }
360
                }
368
              */
361
            }
369
            }
362
          else
370
          else
363
            printf("not connected to mk\n");
371
            printf("not connected to mk\n");
Line 364... Line 372...
364
 
372
         
365
          gettimeofday(&time_struct2,NULL);
373
          gettimeofday(&time_struct2,NULL);