Add an emergency-command parser to MarlinSerial's RX interrupt. The parser tries to find and execute M108,M112,M410 before the commands disappear in the RX-buffer. To avoid false positives for M117, comments and commands followed by filenames (M23, M28, M30, M32, M33) are filtered. This enables Marlin to receive and react on the Emergency command at all times - regardless of whether the buffers are full or not. It remains to convince hosts to send the commands. To inform the hosts about the new feature a new entry in the M115-report was made. "`EMERGENCY_CODES:M112,M108,M410;`". The parser is fast. It only ever needs two switch decisions and one assignment of the new state for every character. One problem remains. If the host has sent an incomplete line before sending an emergency command the emergency command could be omitted when the parser is in `state_IGNORE`. In that case the host should send "\ncommand\n" Also introduces M108 to break the waiting for the heaters in M109, M190 and M303. Rename `cancel_heatup` to `wait_for_heatup` to better see the purpose.
|
||
284 | 284 |
|
285 | 285 |
|
286 | 286 |
|
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
|
291 |
|
|
292 |
|
|
287 | 293 |
|
288 | 294 |
|
289 | 295 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
288 | 288 |
|
289 | 289 |
|
290 | 290 |
|
291 |
|
|
291 | 292 |
|
292 | 293 |
|
293 | 294 |
|
|
||
30 | 30 |
|
31 | 31 |
|
32 | 32 |
|
33 |
|
|
33 | 34 |
|
34 | 35 |
|
35 | 36 |
|
|
||
54 | 55 |
|
55 | 56 |
|
56 | 57 |
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
57 | 62 |
|
58 | 63 |
|
59 | 64 |
|
|
||
310 | 315 |
|
311 | 316 |
|
312 | 317 |
|
318 |
|
|
319 |
|
|
320 |
|
|
321 |
|
|
322 |
|
|
323 |
|
|
324 |
|
|
325 |
|
|
326 |
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
|
332 |
|
|
333 |
|
|
334 |
|
|
335 |
|
|
336 |
|
|
337 |
|
|
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
|
|
343 |
|
|
344 |
|
|
345 |
|
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
|
|
354 |
|
|
355 |
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
|
360 |
|
|
361 |
|
|
362 |
|
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
|
|
368 |
|
|
369 |
|
|
370 |
|
|
371 |
|
|
372 |
|
|
373 |
|
|
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
|
|
379 |
|
|
380 |
|
|
381 |
|
|
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
|
386 |
|
|
387 |
|
|
388 |
|
|
389 |
|
|
390 |
|
|
391 |
|
|
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
|
396 |
|
|
397 |
|
|
398 |
|
|
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
|
403 |
|
|
404 |
|
|
405 |
|
|
406 |
|
|
407 |
|
|
408 |
|
|
409 |
|
|
410 |
|
|
411 |
|
|
412 |
|
|
413 |
|
|
414 |
|
|
415 |
|
|
416 |
|
|
417 |
|
|
418 |
|
|
419 |
|
|
420 |
|
|
421 |
|
|
422 |
|
|
423 |
|
|
424 |
|
|
425 |
|
|
426 |
|
|
427 |
|
|
428 |
|
|
429 |
|
|
430 |
|
|
431 |
|
|
432 |
|
|
433 |
|
|
434 |
|
|
435 |
|
|
436 |
|
|
437 |
|
|
438 |
|
|
439 |
|
|
440 |
|
|
441 |
|
|
442 |
|
|
443 |
|
|
444 |
|
|
445 |
|
|
446 |
|
|
447 |
|
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
453 |
|
|
454 |
|
|
455 |
|
|
456 |
|
|
457 |
|
|
458 |
|
|
459 |
|
|
460 |
|
|
461 |
|
|
462 |
|
|
463 |
|
|
464 |
|
|
465 |
|
|
466 |
|
|
467 |
|
|
468 |
|
|
469 |
|
|
470 |
|
|
||
101 | 101 |
|
102 | 102 |
|
103 | 103 |
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
104 | 109 |
|
105 | 110 |
|
106 | 111 |
|
|
||
141 | 146 |
|
142 | 147 |
|
143 | 148 |
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
|
144 | 153 |
|
145 | 154 |
|
146 | 155 |
|
|
||
160 | 160 |
|
161 | 161 |
|
162 | 162 |
|
163 |
|
|
163 |
|
|
164 | 164 |
|
165 | 165 |
|
166 | 166 |
|
|
||
1105 | 1105 |
|
1106 | 1106 |
|
1107 | 1107 |
|
1108 |
|
|
1109 |
|
|
1110 |
|
|
1108 |
|
|
1109 |
|
|
1110 |
|
|
1111 |
|
|
1112 |
|
|
1113 |
|
|
1111 | 1114 |
|
1112 | 1115 |
|
1113 | 1116 |
|
|
||
4533 | 4536 |
|
4534 | 4537 |
|
4535 | 4538 |
|
4536 |
|
|
4537 |
|
|
4538 |
|
|
4539 |
|
|
4539 |
|
|
4540 |
|
|
4541 |
|
|
4542 |
|
|
4543 |
|
|
4544 |
|
|
4545 |
|
|
4546 |
|
|
4540 | 4547 |
|
4541 | 4548 |
|
4542 | 4549 |
|
|
||
4811 | 4818 |
|
4812 | 4819 |
|
4813 | 4820 |
|
4814 |
|
|
4821 |
|
|
4822 |
|
|
4823 |
|
|
4815 | 4824 |
|
4816 | 4825 |
|
4817 | 4826 |
|
|
||
5991 | 6000 |
|
5992 | 6001 |
|
5993 | 6002 |
|
5994 |
|
|
5995 |
|
|
5996 |
|
|
5997 |
|
|
5998 |
|
|
5999 |
|
|
6000 | 6003 |
|
6004 |
|
|
6005 |
|
|
6006 |
|
|
6007 |
|
|
6008 |
|
|
6009 |
|
|
6010 |
|
|
6011 |
|
|
6001 | 6012 |
|
6002 | 6013 |
|
6003 | 6014 |
|
|
||
6953 | 6964 |
|
6954 | 6965 |
|
6955 | 6966 |
|
6956 |
|
|
6957 |
|
|
6958 |
|
|
6967 |
|
|
6968 |
|
|
6969 |
|
|
6970 |
|
|
6971 |
|
|
6959 | 6972 |
|
6960 | 6973 |
|
6961 | 6974 |
|
|
||
6974 | 6987 |
|
6975 | 6988 |
|
6976 | 6989 |
|
6977 |
|
|
6978 |
|
|
6979 |
|
|
6990 |
|
|
6991 |
|
|
6992 |
|
|
6993 |
|
|
6994 |
|
|
6980 | 6995 |
|
6981 | 6996 |
|
6982 | 6997 |
|
|
||
7261 | 7276 |
|
7262 | 7277 |
|
7263 | 7278 |
|
7264 |
|
|
7265 |
|
|
7266 |
|
|
7279 |
|
|
7280 |
|
|
7281 |
|
|
7282 |
|
|
7283 |
|
|
7267 | 7284 |
|
7268 | 7285 |
|
7269 | 7286 |
|
|
||
579 | 579 |
|
580 | 580 |
|
581 | 581 |
|
582 |
|
|
583 |
|
|
584 |
|
|
585 |
|
|
586 |
|
|
587 |
|
|
588 |
|
|
582 | 589 |
|
583 | 590 |
|
584 | 591 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
526 | 526 |
|
527 | 527 |
|
528 | 528 |
|
529 |
|
|
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
529 | 535 |
|
530 | 536 |
|
531 | 537 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
528 | 528 |
|
529 | 529 |
|
530 | 530 |
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
|
531 | 537 |
|
532 | 538 |
|
533 | 539 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
522 | 522 |
|
523 | 523 |
|
524 | 524 |
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
529 |
|
|
530 |
|
|
525 | 531 |
|
526 | 532 |
|
527 | 533 |
|
|
||
522 | 522 |
|
523 | 523 |
|
524 | 524 |
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
529 |
|
|
530 |
|
|
525 | 531 |
|
526 | 532 |
|
527 | 533 |
|
|
||
521 | 521 |
|
522 | 522 |
|
523 | 523 |
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
529 |
|
|
524 | 530 |
|
525 | 531 |
|
526 | 532 |
|
|
||
526 | 526 |
|
527 | 527 |
|
528 | 528 |
|
529 |
|
|
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
|
|
529 | 535 |
|
530 | 536 |
|
531 | 537 |
|
|
||
522 | 522 |
|
523 | 523 |
|
524 | 524 |
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
529 |
|
|
530 |
|
|
525 | 531 |
|
526 | 532 |
|
527 | 533 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
520 | 520 |
|
521 | 521 |
|
522 | 522 |
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
|
|
527 |
|
|
528 |
|
|
523 | 529 |
|
524 | 530 |
|
525 | 531 |
|
|
||
128 | 128 |
|
129 | 129 |
|
130 | 130 |
|
131 |
|
|
131 |
|
|
132 | 132 |
|
133 | 133 |
|
134 | 134 |
|
|
||
238 | 238 |
|
239 | 239 |
|
240 | 240 |
|
241 |
|
|
242 |
|
|
241 | 243 |
|
242 |
|
|
244 |
|
|
243 | 245 |
|
244 | 246 |
|
245 | 247 |
|
|
||
421 | 423 |
|
422 | 424 |
|
423 | 425 |
|
426 |
|
|
424 | 427 |
|
425 | 428 |
|
426 | 429 |
|