Compare commits

...

20 Commits

Author SHA1 Message Date
Scott Lahteine dc6d166567 Merge remote-tracking branch 'upstream/bugfix-2.1.x' into pr/26944 2025-12-02 12:14:56 -06:00
Scott Lahteine bf7433c937 make a friend 2025-11-18 12:15:12 -06:00
Scott Lahteine 81a9eb27ad use handlers 2025-11-18 12:05:18 -06:00
Scott Lahteine 6ed3ea9a6b ws 2025-11-18 11:11:24 -06:00
Scott Lahteine 371ab1eea2 Add BUTTON*_IMMEDIATE option 2025-11-18 11:02:10 -06:00
Scott Lahteine e38075710d Menu item to run a G-code now 2025-11-18 10:48:36 -06:00
Scott Lahteine ea2e832dc8 Merge branch 'bugfix-2.1.x' into pr/26944 2025-11-18 10:25:09 -06:00
Scott Lahteine 09e336f78c Merge branch 'bugfix-2.1.x' into pr/26944 2025-05-27 00:09:04 -05:00
InsanityAutomation 471228018a Merge branch 'bugfix-2.1.x' into ParseSafetyCommandsEvenWithEParser 2025-05-13 16:17:41 -04:00
InsanityAutomation 766210b8f1 Merge branch 'ParseSafetyCommandsEvenWithEParser' of https://github.com/InsanityAutomation/Marlin into ParseSafetyCommandsEvenWithEParser 2025-04-18 13:39:47 -04:00
InsanityAutomation b5c05e32ea Update M876.cpp 2025-04-18 13:39:36 -04:00
InsanityAutomation 1d702b3601 Merge branch 'bugfix-2.1.x' into ParseSafetyCommandsEvenWithEParser 2025-04-18 13:38:14 -04:00
InsanityAutomation 2e7b7c8b72 Update pause.cpp 2025-04-18 13:36:38 -04:00
Scott Lahteine a4fbbf9075 clean up 2025-03-17 19:46:43 -05:00
Scott Lahteine 25e6852022 Merge branch 'bugfix-2.1.x' into pr/26944 2025-03-17 18:06:41 -05:00
Scott Lahteine 5edec5b3a3 tweak 2025-03-17 18:06:18 -05:00
InsanityAutomation 0bfa253b73 Use getter 2024-04-10 15:15:24 -04:00
InsanityAutomation 1117aff777 Merge branch 'MarlinFirmware:bugfix-2.1.x' into ParseSafetyCommandsEvenWithEParser 2024-04-07 18:59:07 -04:00
InsanityAutomation b616b0a67a Update Conditionals_adv.h 2024-04-07 13:24:13 -04:00
InsanityAutomation bca0f55a5e Always parse safety commands at all levels 2024-04-07 13:13:15 -04:00
11 changed files with 36 additions and 41 deletions
+2
View File
@@ -86,6 +86,8 @@ public:
static void update(State &state, const uint8_t c);
static bool isEnabled() { return enabled; }
private:
static bool enabled;
};
+1 -1
View File
@@ -298,10 +298,10 @@ bool load_filament(const float slow_load_length/*=0*/, const float fast_load_len
// Show "Purge More" / "Resume" menu and wait for reply
KEEPALIVE_STATE(PAUSED_FOR_USER);
marlin.user_resume();
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI)
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // MarlinUI and MKS UI also set PAUSE_RESPONSE_WAIT_FOR
#else
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
TERN_(SOVOL_SV06_RTS, rts.gotoPage(ID_PurgeMore_L, ID_PurgeMore_D));
#endif
while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) marlin.idle_no_sleep();
@@ -21,9 +21,6 @@
*/
#include "../../inc/MarlinConfig.h"
#if DISABLED(EMERGENCY_PARSER)
#include "../gcode.h"
#include "../../module/motion.h" // for quickstop_stepper
@@ -50,5 +47,3 @@ void GcodeSuite::M112() {
void GcodeSuite::M410() {
quickstop_stepper();
}
#endif // !EMERGENCY_PARSER
+5 -11
View File
@@ -597,17 +597,11 @@ void GcodeSuite::process_parsed_command(bool no_ok/*=false*/) {
case 110: M110(); break; // M110: Set Current Line Number
case 111: M111(); break; // M111: Set debug level
#if DISABLED(EMERGENCY_PARSER)
case 108: M108(); break; // M108: Cancel Waiting
case 112: M112(); break; // M112: Full Shutdown
case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
#if ENABLED(HOST_PROMPT_SUPPORT)
case 876: M876(); break; // M876: Handle Host prompt responses
#endif
#else
case 108: case 112: case 410:
TERN_(HOST_PROMPT_SUPPORT, case 876:)
break;
case 108: M108(); break; // M108: Cancel Waiting
case 112: M112(); break; // M112: Full Shutdown
case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
#if ENABLED(HOST_PROMPT_SUPPORT)
case 876: M876(); break; // M876: Handle Host prompt responses
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
+11 -9
View File
@@ -140,7 +140,7 @@
* M105 - Report current temperatures.
* M106 - Set print fan speed.
* M107 - Print fan off.
* M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER)
* M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1.
* M109 - S<temp> Wait for extruder current temp to reach target temp. ** Wait only when heating! **
* R<temp> Wait for extruder current temp to reach target temp. ** Wait for heating or cooling. **
* If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
@@ -310,7 +310,7 @@
* M869 - Report position encoder module error.
*
* M871 - Print/Reset/Clear first layer temperature offset values. (Requires PTC_PROBE, PTC_BED, or PTC_HOTEND)
* M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER)
* M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT)
* M900 - Set / Report Linear Advance K-factor (Requires LIN_ADVANCE or FT_MOTION) and Smoothing Tau factor (Requires SMOOTH_LIN_ADVANCE).
* M906 - Set / Report motor current in milliamps using axis codes XYZE, etc. Report values if no axis codes given. (Requires *_DRIVER_TYPE TMC(2130|2160|5130|5160|2208|2209|2240|2660))
* M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
@@ -354,6 +354,7 @@
*/
#include "../inc/MarlinConfig.h"
#include "../module/temperature.h"
#include "parser.h"
#if ENABLED(I2C_POSITION_ENCODERS)
@@ -382,6 +383,9 @@ typedef bits_t(NUM_REL_MODES) relative_t;
extern const char G28_STR[];
class GcodeSuite {
friend void Temperature::task();
public:
static relative_t axis_relative;
@@ -785,13 +789,11 @@ private:
static void M107();
#endif
#if DISABLED(EMERGENCY_PARSER)
static void M108();
static void M112();
static void M410();
#if ENABLED(HOST_PROMPT_SUPPORT)
static void M876();
#endif
static void M108();
static void M112();
static void M410();
#if ENABLED(HOST_PROMPT_SUPPORT)
static void M876();
#endif
static void M110();
+3
View File
@@ -24,6 +24,9 @@
#if HAS_GCODE_M876
#if ENABLED(EMERGENCY_PARSER)
#include "../../feature/e_parser.h"
#endif
#include "../../feature/host_actions.h"
#include "../gcode.h"
+6 -8
View File
@@ -535,14 +535,12 @@ void GCodeQueue::get_serial_commands() {
}
}
#if DISABLED(EMERGENCY_PARSER)
// Process critical commands early
if (command[0] == 'M') switch (command[3]) {
case '8': if (command[2] == '0' && command[1] == '1') { marlin.end_waiting(); } break;
case '2': if (command[2] == '1' && command[1] == '1') marlin.kill(FPSTR(M112_KILL_STR), nullptr, true); break;
case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break;
}
#endif
// Process critical commands early
if (command[0] == 'M') switch (command[3]) {
case '8': if (command[2] == '0' && command[1] == '1') { marlin.end_waiting(); } break;
case '2': if (command[2] == '1' && command[1] == '1') marlin.kill(FPSTR(M112_KILL_STR), nullptr, true); break;
case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break;
}
#if NO_TIMEOUTS > 0
last_command_time = ms;
+1 -1
View File
@@ -1136,7 +1136,7 @@
#undef SERIAL_XON_XOFF
#endif
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER)
#if ENABLED(HOST_PROMPT_SUPPORT)
#define HAS_GCODE_M876 1
#endif
+3 -4
View File
@@ -2317,19 +2317,18 @@ void Temperature::task() {
REMEMBER(mh, no_reentry, true);
#if ENABLED(EMERGENCY_PARSER)
if (emergency_parser.killed_by_M112)
marlin.kill(FPSTR(M112_KILL_STR), nullptr, true);
if (emergency_parser.killed_by_M112) gcode.M112();
if (emergency_parser.quickstop_by_M410) {
emergency_parser.quickstop_by_M410 = false; // quickstop_stepper may call idle so clear this now!
quickstop_stepper();
gcode.M410();
}
#if HAS_MEDIA
if (emergency_parser.sd_abort_by_M524) { // abort SD print immediately
emergency_parser.sd_abort_by_M524 = false;
card.flag.abort_sd_printing = true;
gcode.process_subcommands_now(F("M524"));
gcode.M524();
}
#endif
#endif
+3 -1
View File
@@ -1103,7 +1103,9 @@ void CardReader::closefile(const bool store_location/*=false*/) {
flag.saving = flag.logging = false;
sdpos = 0;
TERN_(EMERGENCY_PARSER, emergency_parser.enable());
#if DISABLED(SDCARD_READONLY)
TERN_(EMERGENCY_PARSER, emergency_parser.enable());
#endif
if (store_location) {
// TODO: Store printer state, filename, position
+1 -1
View File
@@ -233,7 +233,7 @@ USE_CONTROLLER_FAN = build_src_filter=+<src/feature/controll
HAS_COOLER|LASER_COOLANT_FLOW_METER = build_src_filter=+<src/feature/cooler.cpp>
HAS_MOTOR_CURRENT_DAC = build_src_filter=+<src/feature/dac>
DIRECT_STEPPING = build_src_filter=+<src/feature/direct_stepping.cpp> +<src/gcode/motion/G6.cpp>
EMERGENCY_PARSER = build_src_filter=+<src/feature/e_parser.cpp> -<src/gcode/control/M108_*.cpp>
EMERGENCY_PARSER = build_src_filter=+<src/feature/e_parser.cpp>
EASYTHREED_UI = build_src_filter=+<src/feature/easythreed_ui.cpp>
I2C_POSITION_ENCODERS = build_src_filter=+<src/feature/encoder_i2c.cpp>
IIC_BL24CXX_EEPROM = build_src_filter=+<src/libs/BL24CXX.cpp>