UBL devel debugging flag

This commit is contained in:
Scott Lahteine 2017-12-09 03:58:12 -06:00
parent 4f042533a5
commit a20eacaa48
7 changed files with 67 additions and 62 deletions

View file

@ -24,8 +24,6 @@
#if ENABLED(AUTO_BED_LEVELING_UBL)
//#define UBL_DEVEL_DEBUGGING
#include "ubl.h"
#include "Marlin.h"
#include "hex_print_routines.h"
@ -1165,12 +1163,12 @@
static uint8_t ubl_state_at_invocation = 0;
#ifdef UBL_DEVEL_DEBUGGING
#if ENABLED(UBL_DEVEL_DEBUGGING)
static uint8_t ubl_state_recursion_chk = 0;
#endif
void unified_bed_leveling::save_ubl_active_state_and_disable() {
#ifdef UBL_DEVEL_DEBUGGING
#if ENABLED(UBL_DEVEL_DEBUGGING)
ubl_state_recursion_chk++;
if (ubl_state_recursion_chk != 1) {
SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
@ -1186,7 +1184,7 @@
}
void unified_bed_leveling::restore_ubl_active_state_and_leave() {
#ifdef UBL_DEVEL_DEBUGGING
#if ENABLED(UBL_DEVEL_DEBUGGING)
if (--ubl_state_recursion_chk) {
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
#if ENABLED(NEWPANEL)
@ -1267,7 +1265,7 @@
SERIAL_EOL();
safe_delay(50);
#ifdef UBL_DEVEL_DEBUGGING
#if ENABLED(UBL_DEVEL_DEBUGGING)
SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation);
SERIAL_EOL();
SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk);