Some catch up and a look at SKRe3T E3V2 support
This commit is contained in:
@@ -380,7 +380,7 @@
|
||||
#if NONE(ABL_NCSW, ABL_EZABL, ABL_BLTOUCH)
|
||||
#define ABL_BLTOUCH
|
||||
#endif
|
||||
#if NONE(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo, SKRMiniE3V2)
|
||||
#if NONE(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo, SKRMiniE3V2, Creality422, Creality427)
|
||||
#define Y_STOP_PIN 14
|
||||
#define X_STOP_PIN 3
|
||||
#endif
|
||||
@@ -545,7 +545,7 @@
|
||||
*/
|
||||
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRMiniE3V2, SKRE3Turbo)
|
||||
#define SERIAL_PORT -1
|
||||
#elif ANY(MachineEnder3V2, MachineEnder3Pro422, MachineEnder3Pro427)
|
||||
#elif ANY(MachineEnder3V2, MachineEnder3Pro422, MachineEnder3Pro427, Creality422, Creality427)
|
||||
#define SERIAL_PORT 1
|
||||
#else
|
||||
#define SERIAL_PORT 0
|
||||
@@ -557,10 +557,12 @@
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
|
||||
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo) && (NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max) || (ENABLED(GraphicLCD) && NONE(Force10SProDisplay, ForceCRXDisplay)))
|
||||
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11, SKRE3Turbo) && (NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, MachineEnder3V2) || (ENABLED(GraphicLCD) && NONE(Force10SProDisplay, ForceCRXDisplay)))
|
||||
#define SERIAL_PORT_2 0
|
||||
#elif ENABLED(SKRMiniE3V2)
|
||||
#define SERIAL_PORT_2 2
|
||||
#elif BOTH(MachineEnder3V2, SKRE3Turbo)
|
||||
#define LCD_SERIAL_PORT 1
|
||||
#elif ANY(SKR13, SKR14, SKR14Turbo, SKRE3Turbo)
|
||||
#define LCD_SERIAL_PORT 0
|
||||
#elif ANY(MachineEnder3Pro422, MachineEnder3Pro427)&& DISABLED(MachineEnder3V2)
|
||||
@@ -1436,7 +1438,7 @@
|
||||
|
||||
// Enable this feature if all enabled endstop pins are interrupt-capable.
|
||||
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
|
||||
#if ENABLED(MachineEnder3V2)
|
||||
#if ENABLED(MachineEnder3V2) && NONE(SKRE3Turbo, SKR14Turbo, SKR14, SKR13)
|
||||
#define ENDSTOP_INTERRUPTS_FEATURE
|
||||
#endif
|
||||
|
||||
@@ -3020,9 +3022,6 @@
|
||||
#if DISABLED(MelziHostOnly)
|
||||
#define SDSUPPORT
|
||||
#endif
|
||||
#if ENABLED(MachineEnder3V2)
|
||||
#define SDIO_SUPPORT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
|
||||
@@ -1331,7 +1331,7 @@
|
||||
|
||||
// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
|
||||
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
|
||||
#if NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, MachineEnder3V2, MachineEnder3Pro422, MachineEnder3Pro427, SKR14Turbo, SKR14)
|
||||
#if NONE(MachineCR10SPro, MachineCRX, MachineEnder5Plus, MachineCR10Max, MachineEnder3V2, MachineEnder3Pro422, MachineEnder3Pro427, SKR14Turbo, SKR14, , Creality422, Creality427)
|
||||
#define SD_DETECT_STATE HIGH
|
||||
#endif
|
||||
|
||||
@@ -3609,11 +3609,11 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
#define CUSTOM_MENU_CONFIG_TITLE "Leveling Tools"
|
||||
//#define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M117 Wireless Script Done"
|
||||
#define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK
|
||||
#define CUSTOM_MENU_CONFIG_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_CONFIG_ONLY_IDLE // Only show custom menu when the machine is idle
|
||||
#define CUSTOM_MENU_MAIN_TITLE "Leveling Tools"
|
||||
//#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 Wireless Script Done"
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle
|
||||
|
||||
#if ENABLED(BedDC)
|
||||
#define CommBedTmp "55"
|
||||
|
||||
@@ -63,7 +63,7 @@ extern uint8_t marlin_debug_flags;
|
||||
// Serial redirection
|
||||
//
|
||||
// Step 1: Find what's the first serial leaf
|
||||
#if BOTH(HAS_MULTI_SERIAL, SERIAL_CATCHALL)
|
||||
#if ENABLED(HAS_MULTI_SERIAL) && defined(SERIAL_CATCHALL)
|
||||
#define _SERIAL_LEAF_1 MYSERIAL
|
||||
#else
|
||||
#define _SERIAL_LEAF_1 MYSERIAL1
|
||||
|
||||
@@ -142,19 +142,19 @@ public:
|
||||
}
|
||||
|
||||
static int8_t cell_index_x_valid(const_float_t x) {
|
||||
return WITHIN(cell_index_x_raw(x), 0, (GRID_MAX_POINTS_X - 2));
|
||||
return WITHIN(cell_index_x_raw(x), 0, GRID_MAX_CELLS_X - 1);
|
||||
}
|
||||
|
||||
static int8_t cell_index_y_valid(const_float_t y) {
|
||||
return WITHIN(cell_index_y_raw(y), 0, (GRID_MAX_POINTS_Y - 2));
|
||||
return WITHIN(cell_index_y_raw(y), 0, GRID_MAX_CELLS_Y - 1);
|
||||
}
|
||||
|
||||
static int8_t cell_index_x(const_float_t x) {
|
||||
return constrain(cell_index_x_raw(x), 0, (GRID_MAX_POINTS_X) - 2);
|
||||
return constrain(cell_index_x_raw(x), 0, GRID_MAX_CELLS_X - 1);
|
||||
}
|
||||
|
||||
static int8_t cell_index_y(const_float_t y) {
|
||||
return constrain(cell_index_y_raw(y), 0, (GRID_MAX_POINTS_Y) - 2);
|
||||
return constrain(cell_index_y_raw(y), 0, GRID_MAX_CELLS_Y - 1);
|
||||
}
|
||||
|
||||
static inline xy_int8_t cell_indexes(const_float_t x, const_float_t y) {
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
* the case where the printer is making a vertical line that only crosses horizontal mesh lines.
|
||||
*/
|
||||
static inline float z_correction_for_x_on_horizontal_mesh_line(const_float_t rx0, const int x1_i, const int yi) {
|
||||
if (!WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(yi, 0, GRID_MAX_POINTS_Y - 1)) {
|
||||
if (!WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1) || !WITHIN(yi, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i");
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
// See comments above for z_correction_for_x_on_horizontal_mesh_line
|
||||
//
|
||||
static inline float z_correction_for_y_on_vertical_mesh_line(const_float_t ry0, const int xi, const int y1_i) {
|
||||
if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) {
|
||||
if (!WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1) || !WITHIN(y1_i, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi");
|
||||
|
||||
@@ -171,40 +171,6 @@ float g26_random_deviation = 0.0;
|
||||
|
||||
#endif
|
||||
|
||||
mesh_index_pair find_closest_circle_to_print(const xy_pos_t &pos) {
|
||||
float closest = 99999.99;
|
||||
mesh_index_pair out_point;
|
||||
|
||||
out_point.pos = -1;
|
||||
|
||||
GRID_LOOP(i, j) {
|
||||
if (!circle_flags.marked(i, j)) {
|
||||
// We found a circle that needs to be printed
|
||||
const xy_pos_t m = { _GET_MESH_X(i), _GET_MESH_Y(j) };
|
||||
|
||||
// Get the distance to this intersection
|
||||
float f = (pos - m).magnitude();
|
||||
|
||||
// It is possible that we are being called with the values
|
||||
// to let us find the closest circle to the start position.
|
||||
// But if this is not the case, add a small weighting to the
|
||||
// distance calculation to help it choose a better place to continue.
|
||||
//f += (g26_xy_pos - m).magnitude() / 15.0f;
|
||||
|
||||
// Add the specified amount of Random Noise to our search
|
||||
if (g26_random_deviation > 1.0) f += random(0.0, g26_random_deviation);
|
||||
|
||||
if (f < closest) {
|
||||
closest = f; // Found a closer un-printed location
|
||||
out_point.pos.set(i, j); // Save its data
|
||||
out_point.distance = closest;
|
||||
}
|
||||
}
|
||||
}
|
||||
circle_flags.mark(out_point); // Mark this location as done.
|
||||
return out_point;
|
||||
}
|
||||
|
||||
void move_to(const_float_t rx, const_float_t ry, const_float_t z, const_float_t e_delta) {
|
||||
static float last_z = -999.99;
|
||||
|
||||
@@ -231,7 +197,7 @@ void move_to(const_float_t rx, const_float_t ry, const_float_t z, const_float_t
|
||||
prepare_internal_move_to_destination(fr_mm_s);
|
||||
}
|
||||
|
||||
FORCE_INLINE void move_to(const xyz_pos_t &where, const_float_t de) { move_to(where.x, where.y, where.z, de); }
|
||||
void move_to(const xyz_pos_t &where, const_float_t de) { move_to(where.x, where.y, where.z, de); }
|
||||
|
||||
typedef struct {
|
||||
float extrusion_multiplier = EXTRUSION_MULTIPLIER,
|
||||
|
||||
@@ -952,7 +952,7 @@
|
||||
//
|
||||
#ifdef SERIAL_PORT_2
|
||||
#define NUM_SERIAL 2
|
||||
#define HAS_MULTI_SERIAL 1
|
||||
//#define HAS_MULTI_SERIAL 1
|
||||
#elif defined(SERIAL_PORT)
|
||||
#define NUM_SERIAL 1
|
||||
#else
|
||||
@@ -967,7 +967,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#define SERIAL_CATCHALL 0
|
||||
#define SERIAL_CATCHALL -1
|
||||
#ifndef LCD_SERIAL_PORT
|
||||
#define LCD_SERIAL_PORT 3 // Creality 4.x board
|
||||
#endif
|
||||
|
||||
@@ -1230,7 +1230,7 @@ void HMI_Move_X() {
|
||||
}
|
||||
}
|
||||
|
||||
void HMI_Move_Y(void) {
|
||||
void HMI_Move_Y() {
|
||||
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
||||
if (encoder_diffState != ENCODER_DIFF_NO) {
|
||||
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled))
|
||||
@@ -1243,7 +1243,7 @@ void HMI_Move_Y(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void HMI_Move_Z(void) {
|
||||
void HMI_Move_Z() {
|
||||
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
||||
if (encoder_diffState != ENCODER_DIFF_NO) {
|
||||
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled))
|
||||
@@ -1258,7 +1258,7 @@ void HMI_Move_Z(void) {
|
||||
|
||||
#if HAS_HOTEND
|
||||
|
||||
void HMI_Move_E(void) {
|
||||
void HMI_Move_E() {
|
||||
static float last_E_scaled = 0;
|
||||
ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze();
|
||||
if (encoder_diffState != ENCODER_DIFF_NO) {
|
||||
@@ -1275,6 +1275,7 @@ void HMI_Move_Z(void) {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_ZOFFSET_ITEM
|
||||
|
||||
bool printer_busy() { return planner.movesplanned() || printingIsActive(); }
|
||||
@@ -2333,6 +2334,7 @@ void Draw_Move_Menu() {
|
||||
#include "../../../libs/buzzer.h"
|
||||
|
||||
void HMI_AudioFeedback(const bool success=true) {
|
||||
#if USE_BEEPER
|
||||
if (success) {
|
||||
buzzer.tone(100, 659);
|
||||
buzzer.tone(10, 0);
|
||||
@@ -2340,6 +2342,7 @@ void HMI_AudioFeedback(const bool success=true) {
|
||||
}
|
||||
else
|
||||
buzzer.tone(40, 440);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Prepare */
|
||||
@@ -2644,8 +2647,8 @@ void HMI_Control() {
|
||||
void HMI_Leveling() {
|
||||
Popup_Window_Leveling();
|
||||
DWIN_UpdateLCD();
|
||||
#if DEFINED(MAIN_MENU_ITEM_1_GCODE)
|
||||
queue_inject_P(PSTR(MAIN_MENU_ITEM_1_GCODE));
|
||||
#if defined(MAIN_MENU_ITEM_1_GCODE)
|
||||
queue.inject_P(PSTR(MAIN_MENU_ITEM_1_GCODE));
|
||||
#else
|
||||
queue.inject_P(PSTR("G28O\nG29\nG28\nG1Z0"));
|
||||
#endif
|
||||
|
||||
@@ -75,11 +75,11 @@ enum processID : uint8_t {
|
||||
Move_X,
|
||||
Move_Y,
|
||||
Move_Z,
|
||||
Extruder,
|
||||
Homeoffset,
|
||||
#if HAS_HOTEND
|
||||
Extruder,
|
||||
ETemp,
|
||||
#endif
|
||||
Homeoffset,
|
||||
#if HAS_HEATED_BED
|
||||
BedTemp,
|
||||
#endif
|
||||
|
||||
@@ -859,7 +859,7 @@ namespace ExtUI {
|
||||
bed_mesh_t& getMeshArray() { return Z_VALUES_ARR; }
|
||||
float getMeshPoint(const xy_uint8_t &pos) { return Z_VALUES(pos.x, pos.y); }
|
||||
void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) {
|
||||
if (WITHIN(pos.x, 0, GRID_MAX_POINTS_X) && WITHIN(pos.y, 0, GRID_MAX_POINTS_Y)) {
|
||||
if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) {
|
||||
Z_VALUES(pos.x, pos.y) = zoff;
|
||||
TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate());
|
||||
}
|
||||
|
||||
@@ -3502,7 +3502,6 @@ void Temperature::tick() {
|
||||
#if ENABLED(AUTO_REPORT_TEMPERATURES)
|
||||
AutoReporter<Temperature::AutoReportTemp> Temperature::auto_reporter;
|
||||
void Temperature::AutoReportTemp::report() {
|
||||
PORT_REDIRECT(SERIAL_ALL);
|
||||
print_heater_states(active_extruder);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@@ -246,8 +246,13 @@
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
//
|
||||
// SD Support
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user