|
|
@ -250,7 +250,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
bool Running = true;
|
|
|
|
bool Running = true;
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t marlin_debug_flags = DEBUG_INFO | DEBUG_ERRORS;
|
|
|
|
uint8_t marlin_debug_flags = DEBUG_NONE;
|
|
|
|
|
|
|
|
|
|
|
|
static float feedrate = 1500.0, saved_feedrate;
|
|
|
|
static float feedrate = 1500.0, saved_feedrate;
|
|
|
|
float current_position[NUM_AXIS] = { 0.0 };
|
|
|
|
float current_position[NUM_AXIS] = { 0.0 };
|
|
|
@ -4346,27 +4346,39 @@ inline void gcode_M110() {
|
|
|
|
* M111: Set the debug level
|
|
|
|
* M111: Set the debug level
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline void gcode_M111() {
|
|
|
|
inline void gcode_M111() {
|
|
|
|
marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO | DEBUG_COMMUNICATION;
|
|
|
|
marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_NONE;
|
|
|
|
|
|
|
|
|
|
|
|
if (marlin_debug_flags & DEBUG_ECHO) {
|
|
|
|
const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
const char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
|
|
|
|
SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO);
|
|
|
|
const char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS;
|
|
|
|
}
|
|
|
|
const char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN;
|
|
|
|
// FOR MOMENT NOT ACTIVE
|
|
|
|
const char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION;
|
|
|
|
//if (marlin_debug_flags & DEBUG_INFO) SERIAL_ECHOLNPGM(MSG_DEBUG_INFO);
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
//if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS);
|
|
|
|
const char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING;
|
|
|
|
if (marlin_debug_flags & DEBUG_DRYRUN) {
|
|
|
|
#endif
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
|
|
|
|
SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN);
|
|
|
|
|
|
|
|
disable_all_heaters();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char* const debug_strings[] PROGMEM = {
|
|
|
|
|
|
|
|
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16,
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
if (marlin_debug_flags & DEBUG_LEVELING) {
|
|
|
|
str_debug_32
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHOLNPGM(MSG_DEBUG_LEVELING);
|
|
|
|
SERIAL_ECHOPGM(MSG_DEBUG_PREFIX);
|
|
|
|
|
|
|
|
if (marlin_debug_flags) {
|
|
|
|
|
|
|
|
uint8_t comma = 0;
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
|
|
|
|
|
|
|
|
if (TEST(marlin_debug_flags, i)) {
|
|
|
|
|
|
|
|
if (comma++) SERIAL_CHAR('|');
|
|
|
|
|
|
|
|
serialprintPGM(debug_strings[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
SERIAL_ECHOPGM(MSG_DEBUG_OFF);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SERIAL_EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|