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,7 +376,6 @@ const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
376 376
 
377 377
 //Inactivity shutdown variables
378 378
 static unsigned long previous_millis_cmd = 0;
379
-static unsigned long previous_millis_ok = 0;
380 379
 static unsigned long max_inactive_time = 0;
381 380
 static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l;
382 381
 
@@ -646,7 +645,6 @@ void loop()
646 645
           else
647 646
           {
648 647
             SERIAL_PROTOCOLLNPGM(MSG_OK);
649
-						previous_millis_ok = millis();
650 648
           }
651 649
         }
652 650
         else
@@ -3157,13 +3155,12 @@ Sigma_Exit:
3157 3155
           }
3158 3156
         }
3159 3157
         else if (servo_index >= 0) {
3160
-					SERIAL_PROTOCOL(MSG_OK);
3158
+          SERIAL_PROTOCOL(MSG_OK);
3161 3159
           SERIAL_PROTOCOL(" Servo ");
3162 3160
           SERIAL_PROTOCOL(servo_index);
3163 3161
           SERIAL_PROTOCOL(": ");
3164 3162
           SERIAL_PROTOCOL(servos[servo_index].read());
3165 3163
           SERIAL_PROTOCOLLN("");
3166
-					previous_millis_ok = millis();
3167 3164
         }
3168 3165
       }
3169 3166
       break;
@@ -3238,7 +3235,6 @@ Sigma_Exit:
3238 3235
         SERIAL_PROTOCOL(" d:");
3239 3236
         SERIAL_PROTOCOL(unscalePID_d(bedKd));
3240 3237
         SERIAL_PROTOCOLLN("");
3241
-				previous_millis_ok = millis();
3242 3238
       }
3243 3239
       break;
3244 3240
     #endif //PIDTEMP
@@ -3529,7 +3525,6 @@ case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
3529 3525
           SERIAL_ECHO_START;
3530 3526
           SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK);
3531 3527
           SERIAL_PROTOCOLLN("");
3532
-					previous_millis_ok = millis();
3533 3528
         }
3534 3529
         else
3535 3530
         {
@@ -3916,7 +3911,6 @@ case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
3916 3911
   ClearToSend();
3917 3912
 }
3918 3913
 
3919
-
3920 3914
 void FlushSerialRequestResend()
3921 3915
 {
3922 3916
   //char cmdbuffer[bufindr][100]="Resend:";
@@ -3934,7 +3928,6 @@ void ClearToSend()
3934 3928
     return;
3935 3929
   #endif //SDSUPPORT
3936 3930
   SERIAL_PROTOCOLLNPGM(MSG_OK);
3937
-	previous_millis_ok = millis();
3938 3931
 }
3939 3932
 
3940 3933
 void get_coordinates()
@@ -4359,14 +4352,6 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
4359 4352
   if( (millis() - previous_millis_cmd) >  max_inactive_time )
4360 4353
     if(max_inactive_time)
4361 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 4355
   if(stepper_inactive_time)  {
4371 4356
     if( (millis() - previous_millis_cmd) >  stepper_inactive_time )
4372 4357
     {

Loading…
Cancel
Save