BLTouch V3.1 changes (#14104)

This commit is contained in:
InsanityAutomation
2019-05-25 22:56:47 -04:00
committed by Scott Lahteine
parent 14fe41f6b2
commit 49e83dd7c8
103 changed files with 6059 additions and 622 deletions

View File

@@ -67,8 +67,8 @@ typedef unsigned char BLTCommand;
class BLTouch {
public:
static bool triggered(); // used by menu_advanced.cpp
static void init(); // used by main.cpp
static void init(const bool set_voltage=false);
static bool last_written_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain
// DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing
FORCE_INLINE static bool deploy() { return deploy_proc(); }
@@ -90,15 +90,20 @@ public:
FORCE_INLINE static void _deploy() { command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); }
FORCE_INLINE static void _stow() { command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); }
FORCE_INLINE static void mode_conv_5V() { mode_conv_proc(true); }
FORCE_INLINE static void mode_conv_OD() { mode_conv_proc(false); }
private:
FORCE_INLINE static bool _deploy_query_alarm() { return command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); }
FORCE_INLINE static bool _stow_query_alarm() { return command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); }
static void clear();
static bool command(const BLTCommand cmd, const millis_t &ms);
static bool triggered();
static bool deploy_proc();
static bool stow_proc();
static bool status_proc();
static void mode_conv_proc(const bool M5V);
};
// Deploy/stow angles for use by servo.cpp / servo.h