Fix some debug out lines

This commit is contained in:
Scott Lahteine 2019-09-14 16:36:46 -05:00
parent 843a19102c
commit 79635f8e94
2 changed files with 16 additions and 16 deletions

View file

@ -110,19 +110,19 @@ bool BLTouch::triggered() {
bool BLTouch::deploy_proc() { bool BLTouch::deploy_proc() {
// Do a DEPLOY // Do a DEPLOY
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch DEPLOY requested"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch DEPLOY requested");
// Attempt to DEPLOY, wait for DEPLOY_DELAY or ALARM // Attempt to DEPLOY, wait for DEPLOY_DELAY or ALARM
if (_deploy_query_alarm()) { if (_deploy_query_alarm()) {
// The deploy might have failed or the probe is already triggered (nozzle too low?) // The deploy might have failed or the probe is already triggered (nozzle too low?)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch ALARM or TRIGGER after DEPLOY, recovering"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch ALARM or TRIGGER after DEPLOY, recovering");
clear(); // Get the probe into start condition clear(); // Get the probe into start condition
// Last attempt to DEPLOY // Last attempt to DEPLOY
if (_deploy_query_alarm()) { if (_deploy_query_alarm()) {
// The deploy might have failed or the probe is actually triggered (nozzle too low?) again // The deploy might have failed or the probe is actually triggered (nozzle too low?) again
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch Recovery Failed"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed");
SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart stop(); // but it's not too bad, no need to kill, allow restart
@ -140,14 +140,14 @@ bool BLTouch::deploy_proc() {
// The trigger STOW (see motion.cpp for example) will pull up the probes pin as soon as the pulse // The trigger STOW (see motion.cpp for example) will pull up the probes pin as soon as the pulse
// is registered. // is registered.
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("bltouch.deploy_proc() end"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("bltouch.deploy_proc() end");
return false; // report success to caller return false; // report success to caller
} }
bool BLTouch::stow_proc() { bool BLTouch::stow_proc() {
// Do a STOW // Do a STOW
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch STOW requested"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch STOW requested");
// A STOW will clear a triggered condition in the probe (10ms pulse). // A STOW will clear a triggered condition in the probe (10ms pulse).
// At the moment that we come in here, we might (pulse) or will (SW mode) see the trigger on the pin. // At the moment that we come in here, we might (pulse) or will (SW mode) see the trigger on the pin.
@ -158,7 +158,7 @@ bool BLTouch::stow_proc() {
// Attempt to STOW, wait for STOW_DELAY or ALARM // Attempt to STOW, wait for STOW_DELAY or ALARM
if (_stow_query_alarm()) { if (_stow_query_alarm()) {
// The stow might have failed // The stow might have failed
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch ALARM or TRIGGER after STOW, recovering"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch ALARM or TRIGGER after STOW, recovering");
_reset(); // This RESET will then also pull up the pin. If it doesn't _reset(); // This RESET will then also pull up the pin. If it doesn't
// work and the pin is still down, there will no longer be // work and the pin is still down, there will no longer be
@ -167,7 +167,7 @@ bool BLTouch::stow_proc() {
// Last attempt to STOW // Last attempt to STOW
if (_stow_query_alarm()) { // so if there is now STILL an ALARM condition: if (_stow_query_alarm()) { // so if there is now STILL an ALARM condition:
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch Recovery Failed"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed");
SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart stop(); // but it's not too bad, no need to kill, allow restart
@ -176,7 +176,7 @@ bool BLTouch::stow_proc() {
} }
} }
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("bltouch.stow_proc() end"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("bltouch.stow_proc() end");
return false; // report success to caller return false; // report success to caller
} }
@ -187,7 +187,7 @@ bool BLTouch::status_proc() {
* This function will ensure switch state is reset after execution * This function will ensure switch state is reset after execution
*/ */
if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch STATUS requested"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch STATUS requested");
_set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm _set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm
const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED

View file

@ -313,7 +313,7 @@ void DGUSScreenVariableHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable
DEBUG_ECHOPAIR("new topfile calculated:", top_file); DEBUG_ECHOPAIR("new topfile calculated:", top_file);
if (top_file < 0) { if (top_file < 0) {
top_file = 0; top_file = 0;
DEBUG_ECHOLN("Top of filelist reached"); DEBUG_ECHOLNPGM("Top of filelist reached");
} }
else { else {
int16_t max_top = filelist.count() - DGUS_SD_FILESPERSCREEN; int16_t max_top = filelist.count() - DGUS_SD_FILESPERSCREEN;
@ -579,7 +579,7 @@ void DGUSScreenVariableHandler::HandleManualMove(DGUS_VP_Variable &var, void *va
buf[4] = axiscode; buf[4] = axiscode;
//DEBUG_ECHOPAIR(" ", buf); //DEBUG_ECHOPAIR(" ", buf);
while (!enqueue_and_echo_command(buf)) idle(); while (!enqueue_and_echo_command(buf)) idle();
//DEBUG_ECHOLN(" ✓"); //DEBUG_ECHOLNPGM(" ✓");
ScreenHandler.ForceCompleteUpdate(); ScreenHandler.ForceCompleteUpdate();
return; return;
} }
@ -588,7 +588,7 @@ void DGUSScreenVariableHandler::HandleManualMove(DGUS_VP_Variable &var, void *va
DEBUG_ECHOPAIR(" move ", axiscode); DEBUG_ECHOPAIR(" move ", axiscode);
bool old_relative_mode = relative_mode; bool old_relative_mode = relative_mode;
if (!relative_mode) { if (!relative_mode) {
//DEBUG_ECHO(" G91"); //DEBUG_ECHOPGM(" G91");
while (!enqueue_and_echo_command("G91")) idle(); while (!enqueue_and_echo_command("G91")) idle();
//DEBUG_ECHOPGM(" ✓ "); //DEBUG_ECHOPGM(" ✓ ");
} }
@ -601,18 +601,18 @@ void DGUSScreenVariableHandler::HandleManualMove(DGUS_VP_Variable &var, void *va
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
//DEBUG_ECHOPAIR(" ", buf); //DEBUG_ECHOPAIR(" ", buf);
while (!enqueue_and_echo_command(buf)) idle(); while (!enqueue_and_echo_command(buf)) idle();
//DEBUG_ECHOLN(" ✓ "); //DEBUG_ECHOLNPGM(" ✓ ");
if (backup_speed != speed) { if (backup_speed != speed) {
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
while (!enqueue_and_echo_command(buf)) idle(); while (!enqueue_and_echo_command(buf)) idle();
//DEBUG_ECHOPAIR(" ", buf); //DEBUG_ECHOPAIR(" ", buf);
} }
//while (!enqueue_and_echo_command(buf)) idle(); //while (!enqueue_and_echo_command(buf)) idle();
//DEBUG_ECHOLN(" ✓ "); //DEBUG_ECHOLNPGM(" ✓ ");
if (!old_relative_mode) { if (!old_relative_mode) {
//DEBUG_ECHO("G90"); //DEBUG_ECHOPGM("G90");
while (!enqueue_and_echo_command("G90")) idle(); while (!enqueue_and_echo_command("G90")) idle();
//DEBUG_ECHO(" ✓ "); //DEBUG_ECHOPGM(" ✓ ");
} }
} }