octoprint stop fix

This commit is contained in:
NotaRobotexe 2019-07-15 14:30:21 +02:00
parent a38f37aa06
commit 8fb30f886a
3 changed files with 6 additions and 3 deletions

View File

@ -6734,6 +6734,10 @@ Sigma_Exit:
} }
break; break;
case 603: { //! M603 - Stop print
lcd_print_stop();
}
#ifdef PINDA_THERMISTOR #ifdef PINDA_THERMISTOR
case 860: // M860 - Wait for PINDA thermistor to reach target temperature. case 860: // M860 - Wait for PINDA thermistor to reach target temperature.
{ {
@ -9501,7 +9505,6 @@ void restore_print_from_ram_and_continue(float e_move)
card.setIndex(saved_sdpos); card.setIndex(saved_sdpos);
sdpos_atomic = saved_sdpos; sdpos_atomic = saved_sdpos;
card.sdprinting = true; card.sdprinting = true;
printf_P(PSTR("ok\n")); //dummy response because of octoprint is waiting for this
} }
else if (saved_printing_type == PRINTING_TYPE_USB) { //was usb printing else if (saved_printing_type == PRINTING_TYPE_USB) { //was usb printing
gcode_LastN = saved_sdpos; //saved_sdpos was reused for storing line number when usb printing gcode_LastN = saved_sdpos; //saved_sdpos was reused for storing line number when usb printing
@ -9511,6 +9514,7 @@ void restore_print_from_ram_and_continue(float e_move)
else { else {
//not sd printing nor usb printing //not sd printing nor usb printing
} }
printf_P(PSTR("ok\n")); //dummy response because of octoprint is waiting for this
lcd_setstatuspgm(_T(WELCOME_MSG)); lcd_setstatuspgm(_T(WELCOME_MSG));
saved_printing = false; saved_printing = false;
} }

View File

@ -547,7 +547,7 @@ void fanSpeedError(unsigned char _fan) {
} }
else { else {
fan_check_error = EFCE_DETECTED; fan_check_error = EFCE_DETECTED;
SERIAL_ECHOLNPGM("// action:pause"); //for octoprint
} }
} }
else { else {

View File

@ -6952,7 +6952,6 @@ void lcd_print_stop()
if(!card.sdprinting) if(!card.sdprinting)
{ {
SERIAL_ECHOLNPGM("// action:cancel"); // for Octoprint SERIAL_ECHOLNPGM("// action:cancel"); // for Octoprint
return;
} }
saved_printing = false; saved_printing = false;
cancel_heatup = true; cancel_heatup = true;