Ver código fonte

remove config

wurstnase 10 anos atrás
pai
commit
574e2d856e
2 arquivos alterados com 10 adições e 1 exclusões
  1. 9
    1
      Marlin/Marlin_main.cpp
  2. 1
    0
      Marlin/language.h

+ 9
- 1
Marlin/Marlin_main.cpp Ver arquivo

@@ -263,6 +263,7 @@ static millis_t max_inactive_time = 0;
263 263
 static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L;
264 264
 millis_t print_job_start_ms = 0; ///< Print job start time
265 265
 millis_t print_job_stop_ms = 0;  ///< Print job stop time
266
+static millis_t last_command_time = 0;
266 267
 static uint8_t target_extruder;
267 268
 bool no_wait_for_cooling = true;
268 269
 bool target_direction;
@@ -724,8 +725,15 @@ void get_command() {
724 725
 
725 726
   if (drain_queued_commands_P()) return; // priority is given to non-serial commands
726 727
   
728
+  millis_t ms = millis();
729
+  
730
+  if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) {
731
+    SERIAL_ECHOLNPGM(MSG_WAIT);
732
+    last_command_time = ms;
733
+  }
734
+  
727 735
   while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) {
728
-
736
+    last_command_time = ms;
729 737
     serial_char = MYSERIAL.read();
730 738
 
731 739
     if (serial_char == '\n' || serial_char == '\r' ||

+ 1
- 0
Marlin/language.h Ver arquivo

@@ -121,6 +121,7 @@
121 121
 #define MSG_FREE_MEMORY                     " Free Memory: "
122 122
 #define MSG_PLANNER_BUFFER_BYTES            "  PlannerBufferBytes: "
123 123
 #define MSG_OK                              "ok"
124
+#define MSG_WAIT                            "wait"
124 125
 #define MSG_FILE_SAVED                      "Done saving file."
125 126
 #define MSG_ERR_LINE_NO                     "Line Number is not Last Line Number+1, Last Line: "
126 127
 #define MSG_ERR_CHECKSUM_MISMATCH           "checksum mismatch, Last Line: "

Carregando…
Cancelar
Salvar