M110 ang M29 rework
Add 'ok' output for G29 actually closing the file. Handle M110 when received without linenumber/checksumm.
This commit is contained in:
parent
fac85f6fa1
commit
37b857e8ec
@ -756,6 +756,7 @@ void loop() {
|
|||||||
// M29 closes the file
|
// M29 closes the file
|
||||||
card.closefile();
|
card.closefile();
|
||||||
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
|
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
|
||||||
|
ok_to_send();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Write the string from the read buffer to SD
|
// Write the string from the read buffer to SD
|
||||||
@ -763,7 +764,7 @@ void loop() {
|
|||||||
if (card.logging)
|
if (card.logging)
|
||||||
process_next_command(); // The card is saving because it's logging
|
process_next_command(); // The card is saving because it's logging
|
||||||
else
|
else
|
||||||
SERIAL_PROTOCOLLNPGM(MSG_OK);
|
ok_to_send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4052,6 +4053,13 @@ inline void gcode_M109() {
|
|||||||
|
|
||||||
#endif // HAS_TEMP_BED
|
#endif // HAS_TEMP_BED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* M110: Set Current Line Number
|
||||||
|
*/
|
||||||
|
inline void gcode_M110() {
|
||||||
|
if (code_seen('N')) gcode_N = code_value_long();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M111: Set the debug level
|
* M111: Set the debug level
|
||||||
*/
|
*/
|
||||||
@ -5926,6 +5934,10 @@ void process_next_command() {
|
|||||||
gcode_M104();
|
gcode_M104();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 110: // M110: Set Current Line Number
|
||||||
|
gcode_M110();
|
||||||
|
break;
|
||||||
|
|
||||||
case 111: // M111: Set debug level
|
case 111: // M111: Set debug level
|
||||||
gcode_M111();
|
gcode_M111();
|
||||||
break;
|
break;
|
||||||
@ -7173,9 +7185,9 @@ void kill(const char* lcd_msg) {
|
|||||||
cli(); // disable interrupts
|
cli(); // disable interrupts
|
||||||
suicide();
|
suicide();
|
||||||
while (1) {
|
while (1) {
|
||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
watchdog_reset();
|
watchdog_reset();
|
||||||
#endif
|
#endif
|
||||||
} // Wait for reset
|
} // Wait for reset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user