Browse Source

Revert "issue 968 for dev branch"

Erik van der Zalm 9 years ago
parent
commit
a06700a14b
1 changed files with 1 additions and 16 deletions
  1. 1
    16
      Marlin/Marlin_main.cpp

+ 1
- 16
Marlin/Marlin_main.cpp View File

376
 
376
 
377
 //Inactivity shutdown variables
377
 //Inactivity shutdown variables
378
 static unsigned long previous_millis_cmd = 0;
378
 static unsigned long previous_millis_cmd = 0;
379
-static unsigned long previous_millis_ok = 0;
380
 static unsigned long max_inactive_time = 0;
379
 static unsigned long max_inactive_time = 0;
381
 static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l;
380
 static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l;
382
 
381
 
646
           else
645
           else
647
           {
646
           {
648
             SERIAL_PROTOCOLLNPGM(MSG_OK);
647
             SERIAL_PROTOCOLLNPGM(MSG_OK);
649
-						previous_millis_ok = millis();
650
           }
648
           }
651
         }
649
         }
652
         else
650
         else
3157
           }
3155
           }
3158
         }
3156
         }
3159
         else if (servo_index >= 0) {
3157
         else if (servo_index >= 0) {
3160
-					SERIAL_PROTOCOL(MSG_OK);
3158
+          SERIAL_PROTOCOL(MSG_OK);
3161
           SERIAL_PROTOCOL(" Servo ");
3159
           SERIAL_PROTOCOL(" Servo ");
3162
           SERIAL_PROTOCOL(servo_index);
3160
           SERIAL_PROTOCOL(servo_index);
3163
           SERIAL_PROTOCOL(": ");
3161
           SERIAL_PROTOCOL(": ");
3164
           SERIAL_PROTOCOL(servos[servo_index].read());
3162
           SERIAL_PROTOCOL(servos[servo_index].read());
3165
           SERIAL_PROTOCOLLN("");
3163
           SERIAL_PROTOCOLLN("");
3166
-					previous_millis_ok = millis();
3167
         }
3164
         }
3168
       }
3165
       }
3169
       break;
3166
       break;
3238
         SERIAL_PROTOCOL(" d:");
3235
         SERIAL_PROTOCOL(" d:");
3239
         SERIAL_PROTOCOL(unscalePID_d(bedKd));
3236
         SERIAL_PROTOCOL(unscalePID_d(bedKd));
3240
         SERIAL_PROTOCOLLN("");
3237
         SERIAL_PROTOCOLLN("");
3241
-				previous_millis_ok = millis();
3242
       }
3238
       }
3243
       break;
3239
       break;
3244
     #endif //PIDTEMP
3240
     #endif //PIDTEMP
3529
           SERIAL_ECHO_START;
3525
           SERIAL_ECHO_START;
3530
           SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK);
3526
           SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK);
3531
           SERIAL_PROTOCOLLN("");
3527
           SERIAL_PROTOCOLLN("");
3532
-					previous_millis_ok = millis();
3533
         }
3528
         }
3534
         else
3529
         else
3535
         {
3530
         {
3916
   ClearToSend();
3911
   ClearToSend();
3917
 }
3912
 }
3918
 
3913
 
3919
-
3920
 void FlushSerialRequestResend()
3914
 void FlushSerialRequestResend()
3921
 {
3915
 {
3922
   //char cmdbuffer[bufindr][100]="Resend:";
3916
   //char cmdbuffer[bufindr][100]="Resend:";
3934
     return;
3928
     return;
3935
   #endif //SDSUPPORT
3929
   #endif //SDSUPPORT
3936
   SERIAL_PROTOCOLLNPGM(MSG_OK);
3930
   SERIAL_PROTOCOLLNPGM(MSG_OK);
3937
-	previous_millis_ok = millis();
3938
 }
3931
 }
3939
 
3932
 
3940
 void get_coordinates()
3933
 void get_coordinates()
4359
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
4352
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
4360
     if(max_inactive_time)
4353
     if(max_inactive_time)
4361
       kill();
4354
       kill();
4362
-
4363
-	// If 'OK' is garbled on sending PC won't receive it.  Both machines will wait on each other forever.
4364
-	// This resends OK if nothing is heard from PC for a while to avoid this bad case.
4365
-  if( (millis() - previous_millis_ok) >  max_inactive_time/4 ) {
4366
-		SERIAL_PROTOCOL(MSG_OK);
4367
-		previous_millis_ok=millis();
4368
-  }
4369
-
4370
   if(stepper_inactive_time)  {
4355
   if(stepper_inactive_time)  {
4371
     if( (millis() - previous_millis_cmd) >  stepper_inactive_time )
4356
     if( (millis() - previous_millis_cmd) >  stepper_inactive_time )
4372
     {
4357
     {

Loading…
Cancel
Save