Merge BLTOUCH_V3 updates from upstream

This commit is contained in:
David Ramiro 2019-04-24 14:58:31 +02:00
parent a9dc675395
commit 57bb40edd3
No known key found for this signature in database
GPG Key ID: 5B042737EBEEB736
5 changed files with 40 additions and 2 deletions

View File

@ -479,8 +479,11 @@
#define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW } #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
#define BLTOUCH_DEPLOY 10 #define BLTOUCH_DEPLOY 10
#define BLTOUCH_SW_MODE 60
#define BLTOUCH_STOW 90 #define BLTOUCH_STOW 90
#define BLTOUCH_SELFTEST 120 #define BLTOUCH_SELFTEST 120
#define BLTOUCH_5V_MODE 140
#define BLTOUCH_OD_MODE 150
#define BLTOUCH_RESET 160 #define BLTOUCH_RESET 160
#define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING) #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)

View File

@ -736,6 +736,17 @@
//#define BLTOUCH //#define BLTOUCH
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
/**
* BLTouch V3.0 and newer smart series
* For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV.
* If the pin trigger is not detected, first try swapping the black and white wires then toggle this.
*/
//#define BLTOUCH_V3
#if ENABLED(BLTOUCH_V3)
//#define BLTOUCH_FORCE_5V_MODE
//#define BLTOUCH_FORCE_OPEN_DRAIN_MODE
#endif
#endif #endif
/** /**
@ -782,8 +793,8 @@
* O-- FRONT --+ * O-- FRONT --+
* (0,0) * (0,0)
*/ */
#define X_PROBE_OFFSET_FROM_EXTRUDER -9 // X offset: -left +right [of the nozzle] #define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -22 // Y offset: -front +behind [the nozzle] #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges // Certain types of probes need to stay away from edges

View File

@ -2100,8 +2100,18 @@ void clean_up_after_endstop_or_probe_move() {
} }
} }
#if ENABLED(BLTOUCH_FORCE_5V_MODE)
bltouch_command(BLTOUCH_5V_MODE);
#elif ENABLED(BLTOUCH_V3)
bltouch_command(BLTOUCH_OD_MODE);
#endif
bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW); bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
#if ENABLED(BLTOUCH_V3)
if (deploy) bltouch_command(BLTOUCH_SW_MODE);
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy); SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy);

View File

@ -756,6 +756,15 @@
#ifndef MSG_BLTOUCH #ifndef MSG_BLTOUCH
#define MSG_BLTOUCH _UxGT("BLTouch") #define MSG_BLTOUCH _UxGT("BLTouch")
#endif #endif
#ifndef MSG_BLTOUCH_SW_MODE
#define MSG_BLTOUCH_SW_MODE _UxGT("SW Deploy BLTouch")
#endif
#ifndef MSG_BLTOUCH_5V_MODE
#define MSG_BLTOUCH_5V_MODE _UxGT("BLTouch 5V Mode")
#endif
#ifndef MSG_BLTOUCH_OD_MODE
#define MSG_BLTOUCH_OD_MODE _UxGT("BLTouch OD Mode")
#endif
#ifndef MSG_BLTOUCH_SELFTEST #ifndef MSG_BLTOUCH_SELFTEST
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#endif #endif

View File

@ -972,6 +972,11 @@ void lcd_quick_feedback(const bool clear_buttons) {
MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST))); MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY))); MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY)));
MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW))); MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW)));
#if ENABLED(BLTOUCH_V3)
MENU_ITEM(gcode, MSG_BLTOUCH_SW_MODE, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SW_MODE)));
MENU_ITEM(gcode, MSG_BLTOUCH_5V_MODE, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_5V_MODE)));
MENU_ITEM(gcode, MSG_BLTOUCH_OD_MODE, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_OD_MODE)));
#endif
END_MENU(); END_MENU();
} }