Creality Ender 3 v2 (#17719)

This commit is contained in:
Scott Lahteine
2020-06-16 01:45:27 -05:00
committed by GitHub
parent 642112d3eb
commit f4c258dc23
37 changed files with 5379 additions and 82 deletions

View File

@ -26,9 +26,17 @@
// BLTouch commands are sent as servo angles
typedef unsigned char BLTCommand;
#define BLTOUCH_DEPLOY 10
#if ENABLED(CREALITY_TOUCH)
#define STOW_ALARM false
#define BLTOUCH_DEPLOY 170
#define BLTOUCH_STOW 20
#else
#define STOW_ALARM true
#define BLTOUCH_DEPLOY 10
#define BLTOUCH_STOW 90
#endif
#define BLTOUCH_SW_MODE 60
#define BLTOUCH_STOW 90
#define BLTOUCH_SELFTEST 120
#define BLTOUCH_MODE_STORE 130
#define BLTOUCH_5V_MODE 140
@ -95,7 +103,7 @@ public:
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); }
FORCE_INLINE static bool _stow_query_alarm() { return command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY) == STOW_ALARM; }
static void clear();
static bool command(const BLTCommand cmd, const millis_t &ms);

View File

@ -40,6 +40,10 @@ uint8_t PrintJobRecovery::queue_index_r;
uint32_t PrintJobRecovery::cmd_sdpos, // = 0
PrintJobRecovery::sdpos[BUFSIZE];
#if ENABLED(DWIN_CREALITY_LCD)
bool PrintJobRecovery::dwin_flag; // = false
#endif
#include "../sd/cardreader.h"
#include "../lcd/ultralcd.h"
#include "../gcode/queue.h"
@ -105,6 +109,7 @@ void PrintJobRecovery::check() {
load();
if (!valid()) return cancel();
queue.inject_P(PSTR("M1000 S"));
TERN_(DWIN_CREALITY_LCD, dwin_flag = true);
}
}

View File

@ -121,6 +121,10 @@ class PrintJobRecovery {
static uint32_t cmd_sdpos, //!< SD position of the next command
sdpos[BUFSIZE]; //!< SD positions of queued commands
#if ENABLED(DWIN_CREALITY_LCD)
static bool dwin_flag;
#endif
static void init();
static void prepare();