update code base to Marlin 2.0.9.2
This commit is contained in:
37
Marlin/src/gcode/control/M111.cpp
Executable file → Normal file
37
Marlin/src/gcode/control/M111.cpp
Executable file → Normal file
@@ -16,7 +16,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -28,21 +28,18 @@
|
||||
void GcodeSuite::M111() {
|
||||
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
|
||||
|
||||
static const char str_debug_1[] PROGMEM = STR_DEBUG_ECHO,
|
||||
str_debug_2[] PROGMEM = STR_DEBUG_INFO,
|
||||
str_debug_4[] PROGMEM = STR_DEBUG_ERRORS,
|
||||
str_debug_8[] PROGMEM = STR_DEBUG_DRYRUN,
|
||||
str_debug_16[] PROGMEM = STR_DEBUG_COMMUNICATION
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
, str_debug_lvl[] PROGMEM = STR_DEBUG_LEVELING
|
||||
#endif
|
||||
;
|
||||
static PGMSTR(str_debug_1, STR_DEBUG_ECHO);
|
||||
static PGMSTR(str_debug_2, STR_DEBUG_INFO);
|
||||
static PGMSTR(str_debug_4, STR_DEBUG_ERRORS);
|
||||
static PGMSTR(str_debug_8, STR_DEBUG_DRYRUN);
|
||||
static PGMSTR(str_debug_16, STR_DEBUG_COMMUNICATION);
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
static PGMSTR(str_debug_lvl, STR_DEBUG_LEVELING);
|
||||
#endif
|
||||
|
||||
static PGM_P const debug_strings[] PROGMEM = {
|
||||
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
, str_debug_lvl
|
||||
#endif
|
||||
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16,
|
||||
TERN_(DEBUG_LEVELING_FEATURE, str_debug_lvl)
|
||||
};
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
@@ -52,7 +49,7 @@ void GcodeSuite::M111() {
|
||||
LOOP_L_N(i, COUNT(debug_strings)) {
|
||||
if (TEST(marlin_debug_flags, i)) {
|
||||
if (comma++) SERIAL_CHAR(',');
|
||||
serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
|
||||
SERIAL_ECHOPGM_P((char*)pgm_read_ptr(&debug_strings[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,21 +57,21 @@ void GcodeSuite::M111() {
|
||||
SERIAL_ECHOPGM(STR_DEBUG_OFF);
|
||||
#if !defined(__AVR__) || !defined(USBCON)
|
||||
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
|
||||
SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns());
|
||||
SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
|
||||
SERIAL_ECHOPAIR("\nFraming Errors: ", MYSERIAL0.framing_errors());
|
||||
SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
SERIAL_ECHOPAIR("\nDropped bytes: ", MYSERIAL0.dropped());
|
||||
SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL0.rxMaxEnqueued());
|
||||
SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
#endif
|
||||
#endif // !defined(__AVR__) || !defined(USBCON)
|
||||
#endif // !__AVR__ || !USBCON
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
Reference in New Issue
Block a user