|
@@ -250,7 +250,7 @@
|
250
|
250
|
|
251
|
251
|
bool Running = true;
|
252
|
252
|
|
253
|
|
-uint8_t marlin_debug_flags = DEBUG_INFO | DEBUG_ERRORS;
|
|
253
|
+uint8_t marlin_debug_flags = DEBUG_NONE;
|
254
|
254
|
|
255
|
255
|
static float feedrate = 1500.0, saved_feedrate;
|
256
|
256
|
float current_position[NUM_AXIS] = { 0.0 };
|
|
@@ -4346,27 +4346,39 @@ inline void gcode_M110() {
|
4346
|
4346
|
* M111: Set the debug level
|
4347
|
4347
|
*/
|
4348
|
4348
|
inline void gcode_M111() {
|
4349
|
|
- marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO | DEBUG_COMMUNICATION;
|
4350
|
|
-
|
4351
|
|
- if (marlin_debug_flags & DEBUG_ECHO) {
|
4352
|
|
- SERIAL_ECHO_START;
|
4353
|
|
- SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO);
|
4354
|
|
- }
|
4355
|
|
- // FOR MOMENT NOT ACTIVE
|
4356
|
|
- //if (marlin_debug_flags & DEBUG_INFO) SERIAL_ECHOLNPGM(MSG_DEBUG_INFO);
|
4357
|
|
- //if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS);
|
4358
|
|
- if (marlin_debug_flags & DEBUG_DRYRUN) {
|
4359
|
|
- SERIAL_ECHO_START;
|
4360
|
|
- SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN);
|
4361
|
|
- disable_all_heaters();
|
4362
|
|
- }
|
|
4349
|
+ marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_NONE;
|
4363
|
4350
|
|
|
4351
|
+ const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
|
|
4352
|
+ const char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
|
|
4353
|
+ const char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS;
|
|
4354
|
+ const char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN;
|
|
4355
|
+ const char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION;
|
4364
|
4356
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
4365
|
|
- if (marlin_debug_flags & DEBUG_LEVELING) {
|
4366
|
|
- SERIAL_ECHO_START;
|
4367
|
|
- SERIAL_ECHOLNPGM(MSG_DEBUG_LEVELING);
|
4368
|
|
- }
|
|
4357
|
+ const char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING;
|
4369
|
4358
|
#endif
|
|
4359
|
+
|
|
4360
|
+ const char* const debug_strings[] PROGMEM = {
|
|
4361
|
+ str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16,
|
|
4362
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
4363
|
+ str_debug_32
|
|
4364
|
+ #endif
|
|
4365
|
+ };
|
|
4366
|
+
|
|
4367
|
+ SERIAL_ECHO_START;
|
|
4368
|
+ SERIAL_ECHOPGM(MSG_DEBUG_PREFIX);
|
|
4369
|
+ if (marlin_debug_flags) {
|
|
4370
|
+ uint8_t comma = 0;
|
|
4371
|
+ for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
|
|
4372
|
+ if (TEST(marlin_debug_flags, i)) {
|
|
4373
|
+ if (comma++) SERIAL_CHAR('|');
|
|
4374
|
+ serialprintPGM(debug_strings[i]);
|
|
4375
|
+ }
|
|
4376
|
+ }
|
|
4377
|
+ }
|
|
4378
|
+ else {
|
|
4379
|
+ SERIAL_ECHOPGM(MSG_DEBUG_OFF);
|
|
4380
|
+ }
|
|
4381
|
+ SERIAL_EOL;
|
4370
|
4382
|
}
|
4371
|
4383
|
|
4372
|
4384
|
/**
|