Fixups for probe tare, add endstop report and M401
This commit is contained in:
@@ -1000,7 +1000,7 @@
|
||||
#define PROBE_ACTIVE_INPUT
|
||||
#if ENABLED(PROBE_ACTIVE_INPUT)
|
||||
#define PROBE_ACTIVE_INPUT_STATE LOW // State indicating probe is active
|
||||
#define PROBE_ACTIVE_INPUT_PIN PC6 // Override default pin
|
||||
//#define PROBE_ACTIVE_INPUT_PIN PC6 // Override default pin
|
||||
#endif
|
||||
|
||||
// Probe should be tared prior to each probe
|
||||
@@ -1008,10 +1008,10 @@
|
||||
// as that from cables or bowden cables pulling on the carriage.
|
||||
#define PROBE_TARE
|
||||
#if ENABLED(PROBE_TARE)
|
||||
#define PROBE_TARE_TIME 200 // Time to hold tare pin (milliseconds)
|
||||
#define PROBE_TARE_TIME 100 // Time to hold tare pin (milliseconds)
|
||||
#define PROBE_TARE_DELAY 200 // Delay after tare before (milliseconds)
|
||||
#define PROBE_TARE_STATE HIGH // State to write pin for tare
|
||||
#define PROBE_TARE_PIN PA5 // Override default pin
|
||||
#define PROBE_TARE_STATE LOW // State to write pin for tare
|
||||
//#define PROBE_TARE_PIN PA5 // Override default pin
|
||||
#if ENABLED(PROBE_ACTIVE_INPUT)
|
||||
// Fail to tare/probe if PROBE_ACTIVE_INPUT reports the probe to be active
|
||||
#define PROBE_TARE_ONLY_WHILE_INACTIVE
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
*/
|
||||
void GcodeSuite::M401() {
|
||||
probe.deploy();
|
||||
#if ENABLED(PROBE_TARE)
|
||||
probe.tare_z_probe();
|
||||
#endif
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
|
||||
@@ -466,6 +466,9 @@ void _O2 Endstops::report_states() {
|
||||
#if HAS_Z4_MAX
|
||||
ES_REPORT(Z4_MAX);
|
||||
#endif
|
||||
#if ENABLED(PROBE_ACTIVE_INPUT)
|
||||
print_es_state(READ(PROBE_ACTIVE_INPUT_PIN) == PROBE_ACTIVE_INPUT_STATE, PSTR("Probe Enable Pin"));
|
||||
#endif
|
||||
#if HAS_CUSTOM_PROBE_PIN
|
||||
print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE));
|
||||
#endif
|
||||
|
||||
@@ -517,11 +517,11 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
const uint8_t value = !PROBE_TARE_STATE ? HIGH : LOW;
|
||||
SERIAL_ECHOLN("Taring the probe");
|
||||
WRITE(PROBE_TARE_PIN, PROBE_TARE_STATE);
|
||||
OUT_WRITE(PROBE_TARE_PIN, PROBE_TARE_STATE);
|
||||
delay(PROBE_TARE_TIME);
|
||||
WRITE(PROBE_TARE_PIN, !PROBE_TARE_STATE);
|
||||
OUT_WRITE(PROBE_TARE_PIN, value);
|
||||
delay(PROBE_TARE_DELAY);
|
||||
|
||||
endstops.hit_on_purpose();
|
||||
|
||||
Reference in New Issue
Block a user