| 97 | bool BLTouch::triggered() { return PROBE_TRIGGERED(); } |
| 98 | |
| 99 | bool BLTouch::deploy_proc() { |
| 100 | // Do a DEPLOY |
| 101 | if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch DEPLOY requested"); |
| 102 | |
| 103 | // Attempt to DEPLOY, wait for DEPLOY_DELAY or ALARM |
| 104 | if (_deploy_query_alarm()) { |
| 105 | // The deploy might have failed or the probe is already triggered (nozzle too low?) |
| 106 | if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch ALARM or TRIGGER after DEPLOY, recovering"); |
| 107 | |
| 108 | clear(); // Get the probe into start condition |
| 109 | |
| 110 | // Last attempt to DEPLOY |
| 111 | if (_deploy_query_alarm()) { |
| 112 | // The deploy might have failed or the probe is actually triggered (nozzle too low?) again |
| 113 | if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Deploy Failed"); |
| 114 | probe.probe_error_stop(); // Something is wrong, needs action, but not too bad, allow restart |
| 115 | return true; // Tell our caller we goofed in case he cares to know |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | // One of the recommended ANTClabs ways to probe, using SW MODE |
| 120 | TERN_(BLTOUCH_FORCE_SW_MODE, _set_SW_mode()); |
| 121 | |
| 122 | // Now the probe is ready to issue a 10ms pulse when the pin goes up. |
| 123 | // The trigger STOW (see motion.cpp for example) will pull up the probes pin as soon as the pulse |
| 124 | // is registered. |
| 125 | |
| 126 | if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("bltouch.deploy_proc() end"); |
| 127 | |
| 128 | return false; // report success to caller |
| 129 | } |
| 130 | |
| 131 | bool BLTouch::stow_proc() { |
| 132 | // Do a STOW |
nothing calls this directly
no test coverage detected