Commit 45c9ec73 authored by Franco (nextime) Lanza's avatar Franco (nextime) Lanza

Merge branch 'dev' into k40_noflow_nocooler

parents b753c34f 1c1be28c
Pipeline #119 skipped
......@@ -1151,13 +1151,13 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
return (extruder == 0) ? X_HOME_DIR : X2_HOME_DIR;
}
static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1
static bool active_extruder_parked = false; // used in mode 1 & 2
static float inactive_hotend_x_pos = X2_MAX_POS; // used in mode 0 & 1
static bool active_hotend_parked = false; // used in mode 1 & 2
static float raised_parked_position[NUM_AXIS]; // used in mode 1
static millis_t delayed_move_time = 0; // used in mode 1
static float duplicate_hotend_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
static float duplicate_extruder_temp_offset = 0; // used in mode 2
bool extruder_duplication_enabled = false; // used in mode 2
static float duplicate_hotend_temp_offset = 0; // used in mode 2
bool hotend_duplication_enabled = false; // used in mode 2
#endif //DUAL_X_CARRIAGE
......@@ -1175,7 +1175,7 @@ static void update_software_endstops(AxisEnum axis) {
float offs = home_offset[axis] + position_shift[axis];
#if ENABLED(DUAL_X_CARRIAGE)
if (axis == X_AXIS) {
float dual_max_x = max(extruder_offset[X_AXIS][1], X2_MAX_POS);
float dual_max_x = max(hotend_offset[X_AXIS][1], X2_MAX_POS);
if (active_extruder != 0) {
sw_endstop_min[X_AXIS] = X2_MIN_POS + offs;
sw_endstop_max[X_AXIS] = dual_max_x + offs;
......@@ -1183,7 +1183,7 @@ static void update_software_endstops(AxisEnum axis) {
}
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) {
sw_endstop_min[X_AXIS] = base_min_pos(X_AXIS) + offs;
sw_endstop_max[X_AXIS] = min(base_max_pos(X_AXIS), dual_max_x - duplicate_extruder_x_offset) + offs;
sw_endstop_max[X_AXIS] = min(base_max_pos(X_AXIS), dual_max_x - duplicate_hotend_x_offset) + offs;
return;
}
}
......@@ -3835,7 +3835,7 @@ inline void gcode_G28() {
#if ENABLED(DUAL_X_CARRIAGE)
int x_axis_home_dir = x_home_dir(active_extruder);
extruder_duplication_enabled = false;
hotend_duplication_enabled = false;
#else
int x_axis_home_dir = home_dir(X_AXIS);
#endif
......@@ -3889,16 +3889,16 @@ inline void gcode_G28() {
if (home_all_axis || homeX) {
#if ENABLED(DUAL_X_CARRIAGE)
int tmp_extruder = active_extruder;
extruder_duplication_enabled = false;
hotend_duplication_enabled = false;
active_extruder = !active_extruder;
HOMEAXIS(X);
inactive_extruder_x_pos = current_position[X_AXIS];
inactive_hotend_x_pos = current_position[X_AXIS];
active_extruder = tmp_extruder;
HOMEAXIS(X);
// reset state used by the different modes
memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
delayed_move_time = 0;
active_extruder_parked = true;
active_hotend_parked = true;
#else
HOMEAXIS(X);
#endif
......@@ -6084,7 +6084,7 @@ inline void gcode_M104() {
setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_hotend_temp_offset);
#endif
/**
......@@ -6165,7 +6165,7 @@ inline void gcode_M109() {
setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_hotend_temp_offset);
#endif
/**
......@@ -7969,7 +7969,7 @@ inline void gcode_M503() {
switch(dual_x_carriage_mode) {
case DXC_DUPLICATION_MODE:
if (code_seen('X')) duplicate_hotend_x_offset = max(code_value(), X2_MIN_POS - x_home_pos(0));
if (code_seen('R')) duplicate_extruder_temp_offset = code_value();
if (code_seen('R')) duplicate_hotend_temp_offset = code_value();
ECHO_SM(DB, SERIAL_HOTEND_OFFSET);
ECHO_MV(" ", hotend_offset[X_AXIS][0]);
ECHO_MV(",", hotend_offset[Y_AXIS][0]);
......@@ -7983,8 +7983,8 @@ inline void gcode_M503() {
dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
break;
}
active_extruder_parked = false;
extruder_duplication_enabled = false;
active_hotend_parked = false;
hotend_duplication_enabled = false;
delayed_move_time = 0;
}
#endif // DUAL_X_CARRIAGE
......@@ -8283,31 +8283,34 @@ inline void gcode_T(uint8_t tmp_extruder) {
st_synchronize();
}
// apply Y & Z extruder offset (x offset is already used in determining home pos)
current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
active_extruder = target_extruder;
// This function resets the max/min values - the current position may be overwritten below.
set_axis_is_at_home(X_AXIS);
if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE) {
current_position[X_AXIS] = inactive_extruder_x_pos;
inactive_extruder_x_pos = destination[X_AXIS];
current_position[X_AXIS] = inactive_hotend_x_pos;
inactive_hotend_x_pos = destination[X_AXIS];
}
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) {
active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
active_hotend_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
if (active_extruder == 0 || active_extruder_parked)
current_position[X_AXIS] = inactive_extruder_x_pos;
if (active_hotend_parked)
current_position[X_AXIS] = inactive_hotend_x_pos;
else
current_position[X_AXIS] = destination[X_AXIS] + duplicate_hotend_x_offset;
inactive_extruder_x_pos = destination[X_AXIS];
extruder_duplication_enabled = false;
inactive_hotend_x_pos = destination[X_AXIS];
hotend_duplication_enabled = false;
}
else {
// record raised toolhead position for use by unpark
memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
active_extruder_parked = true;
active_hotend_parked = true;
delayed_move_time = 0;
}
......@@ -9426,15 +9429,15 @@ static void report_current_position() {
#if ENABLED(DUAL_X_CARRIAGE)
inline bool prepare_move_dual_x_carriage() {
if (active_extruder_parked) {
if (active_hotend_parked) {
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
// move duplicate extruder into correct duplication position.
planner.set_position_mm(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
planner.set_position_mm(inactive_hotend_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
planner.buffer_line(current_position[X_AXIS] + duplicate_hotend_x_offset, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_planner.acceleration_units_per_sq_second[X_AXIS], 1, active_driver);
sync_plan_position();
st_synchronize();
extruder_duplication_enabled = true;
active_extruder_parked = false;
hotend_duplication_enabled = true;
active_hotend_parked = false;
}
else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) { // handle unparking of head
if (current_position[E_AXIS] == destination[E_AXIS]) {
......@@ -9453,7 +9456,7 @@ static void report_current_position() {
planner.buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], planner.max_planner.acceleration_units_per_sq_second[Z_AXIS], active_extruder, active_driver);
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], min(planner.max_planner.acceleration_units_per_sq_second[X_AXIS], planner.max_planner.acceleration_units_per_sq_second[Y_AXIS]), active_extruder, active_driver);
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_planner.acceleration_units_per_sq_second[Z_AXIS], active_extruder, active_driver);
active_extruder_parked = false;
active_hotend_parked = false;
}
}
return true;
......
......@@ -37,7 +37,7 @@ void idle(
void manage_inactivity(bool ignore_stepper_queue = false);
#if ENABLED(DUAL_X_CARRIAGE)
extern bool extruder_duplication_enabled;
extern bool hotend_duplication_enabled;
#endif
void FlushSerialRequestResend();
......
......@@ -41,12 +41,17 @@
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
#if ENABLED(miniVIKI)
#define LCD_CONTRAST_MIN 75
#define LCD_CONTRAST_MAX 115
#define DEFAULT_LCD_CONTRAST 95
#elif ENABLED(VIKI2)
#define DEFAULT_LCD_CONTRAST 40
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define LCD_CONTRAST_MIN 90
#define LCD_CONTRAST_MAX 130
#define DEFAULT_LCD_CONTRAST 110
#define U8GLIB_LM6059_AF
#define SD_DETECT_INVERTED
#endif
#define ENCODER_PULSES_PER_STEP 4
......
......@@ -79,6 +79,8 @@
#define MSG_SPEED "Speed"
#define MSG_NOZZLE "Nozzle"
#define MSG_BED "Bed"
#define MSG_CHAMBER "Chamber"
#define MSG_COOLER "Cooler"
#define MSG_BED_Z "Bed Z"
#define MSG_FAN_SPEED "Fan speed"
#define MSG_FLOW "Flow"
......
......@@ -75,6 +75,8 @@
#define MSG_SPEED "Velocita"
#define MSG_NOZZLE "Ugello"
#define MSG_BED "Piatto"
#define MSG_CHAMBER "Camera"
#define MSG_COOLER "Raffreddamento"
#define MSG_BED_Z "piatto Z"
#define MSG_FAN_SPEED "Ventola"
#define MSG_FLOW "Flusso"
......
......@@ -46,6 +46,9 @@
int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update
int8_t manual_move_axis = (int8_t)NO_AXIS;
millis_t manual_move_start_time = 0;
bool encoderRateMultiplierEnabled;
int32_t lastEncoderMovementMillis;
......@@ -776,6 +779,7 @@ static void lcd_tune_menu() {
//
// Nozzle:
// Nozzle [1-4]:
//
#if HOTENDS == 1
#if TEMP_SENSOR_0 != 0
......@@ -801,17 +805,24 @@ static void lcd_tune_menu() {
#endif // HOTENDS > 1
//
// Laser:
// Bed:
//
#if ENABLED(LASERBEAM) && HAS(COOLER)
MENU_ITEM_EDIT(int3, MSG_COOLER, &target_temperature_cooler, 0, COOLER_MAXTEMP - 15);
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
#endif
//
// Bed:
// Chamber
//
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
#if HAS(CHAMBER)
MENU_ITEM_EDIT(int3, MSG_CHAMBER, &target_temperature_chamber, 0, CHAMBER_MAXTEMP - 15);
#endif
//
// Cooler
//
#if HAS(COOLER)
MENU_ITEM_EDIT(int3, MSG_COOLER, &target_temperature_cooler, 0, COOLER_MAXTEMP - 15);
#endif
//
......@@ -927,22 +938,40 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
#endif
void lcd_preheat_pla0123() {
setTargetHotend0(plaPreheatHotendTemp);
setTargetHotend1(plaPreheatHotendTemp);
setTargetHotend2(plaPreheatHotendTemp);
_lcd_preheat(3, plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed);
#if HOTENDS > 1
setTargetHotend(plaPreheatHotendTemp, 1);
#if HOTENDS > 2
setTargetHotend(plaPreheatHotendTemp, 2);
#if HOTENDS > 3
setTargetHotend(plaPreheatHotendTemp, 3);
#endif
#endif
#endif
lcd_preheat_pla0();
}
void lcd_preheat_abs0123() {
setTargetHotend0(absPreheatHotendTemp);
setTargetHotend1(absPreheatHotendTemp);
setTargetHotend2(absPreheatHotendTemp);
_lcd_preheat(3, absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed);
#if HOTENDS > 1
setTargetHotend(absPreheatHotendTemp, 1);
#if HOTENDS > 2
setTargetHotend(absPreheatHotendTemp, 2);
#if HOTENDS > 3
setTargetHotend(absPreheatHotendTemp, 3);
#endif
#endif
#endif
lcd_preheat_abs0();
}
void lcd_preheat_gum0123() {
setTargetHotend0(gumPreheatHotendTemp);
setTargetHotend1(gumPreheatHotendTemp);
setTargetHotend2(gumPreheatHotendTemp);
_lcd_preheat(3, gumPreheatHotendTemp, gumPreheatHPBTemp, gumPreheatFanSpeed);
#if HOTENDS > 1
setTargetHotend(gumPreheatHotendTemp, 1);
#if HOTENDS > 2
setTargetHotend(gumPreheatHotendTemp, 2);
#if HOTENDS > 3
setTargetHotend(gumPreheatHotendTemp, 3);
#endif
#endif
#endif
lcd_preheat_gum0();
}
#endif // HOTENDS > 1
......@@ -979,7 +1008,7 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
static void lcd_preheat_abs_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE);
MENU_ITEM(back, MSG_PREPARE);
#if HOTENDS == 1
MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs0);
#else
......@@ -1001,7 +1030,7 @@ void _lcd_preheat(int endnum, const float temph, const float tempb, const int fa
static void lcd_preheat_gum_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE);
MENU_ITEM(back, MSG_PREPARE);
#if HOTENDS == 1
MENU_ITEM(function, MSG_PREHEAT_GUM, lcd_preheat_gum0);
#else
......@@ -1087,7 +1116,7 @@ void lcd_cooldown() {
ENCODER_DIRECTION_NORMAL();
// Encoder wheel adjusts the Z position
if (encoderPosition && planner.movesplanned() <= 3) {
if (encoderPosition) {
refresh_cmd_timeout();
current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP);
NOLESS(current_position[Z_AXIS], 0);
......@@ -1100,8 +1129,8 @@ void lcd_cooldown() {
LCDVIEW_REDRAW_NOW
#endif
;
}
encoderPosition = 0;
}
static bool debounce_click = false;
if (LCD_CLICKED) {
......@@ -1356,6 +1385,31 @@ static void lcd_prepare_menu() {
#endif // DELTA
/**
* If the most recent manual move hasn't been fed to the planner yet,
* and the planner can accept one, send immediately
*/
inline void manage_manual_move() {
if (manual_move_axis != (int8_t)NO_AXIS && millis() >= manual_move_start_time && !planner.is_full()) {
#if MECH(DELTA)
calculate_delta(current_position);
planner.buffer_line(delta[TOWER_1], delta[TOWER_2], delta[TOWER_3], current_position[E_AXIS], manual_feedrate[manual_move_axis]/60, active_extruder, active_driver);
#else
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[manual_move_axis]/60, active_extruder, active_driver);
#endif
manual_move_axis = (int8_t)NO_AXIS;
}
}
/**
* Set a flag that lcd_update() should start a move
* to "current_position" after a short delay.
*/
inline void manual_move_to_current(AxisEnum axis) {
manual_move_start_time = millis() + 500UL; // 1/2 second delay
manual_move_axis = (int8_t)axis;
}
/**
*
* "Prepare" > "Move Axis" submenu
......@@ -1366,12 +1420,13 @@ float move_menu_scale;
static void _lcd_move(const char* name, AxisEnum axis, float min, float max) {
ENCODER_DIRECTION_NORMAL();
if (encoderPosition && planner.movesplanned() <= 3) {
if (encoderPosition) {
refresh_cmd_timeout();
current_position[axis] += float((int32_t)encoderPosition) * move_menu_scale;
if (SOFTWARE_MIN_ENDSTOPS) NOLESS(current_position[axis], min);
if (SOFTWARE_MAX_ENDSTOPS) NOMORE(current_position[axis], max);
line_to_current(axis);
encoderPosition = 0;
manual_move_to_current(axis);
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
}
encoderPosition = 0;
......@@ -1399,15 +1454,15 @@ static void lcd_move_e(
unsigned short original_active_extruder = active_extruder;
active_extruder = e;
#endif
if (encoderPosition && planner.movesplanned() <= 3) {
if (encoderPosition) {
#if ENABLED(IDLE_OOZING_PREVENT)
IDLE_OOZING_retract(false);
#endif
current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale;
line_to_current(E_AXIS);
encoderPosition = 0;
manual_move_to_current(E_AXIS);
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
}
encoderPosition = 0;
if (lcdDrawUpdate) {
PGM_P pos_label;
#if EXTRUDERS == 1
......@@ -1948,23 +2003,18 @@ static void lcd_control_motion_menu() {
static void lcd_set_contrast() {
ENCODER_DIRECTION_NORMAL();
if (encoderPosition) {
#if ENABLED(U8GLIB_LM6059_AF)
lcd_contrast += encoderPosition;
lcd_contrast &= 0xFF;
#else
lcd_contrast -= encoderPosition;
lcd_contrast &= 0x3F;
#endif
set_lcd_contrast(lcd_contrast + encoderPosition);
encoderPosition = 0;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
u8g.setContrast(lcd_contrast);
}
if (lcdDrawUpdate) {
#if ENABLED(U8GLIB_LM6059_AF)
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
lcd_implementation_drawedit(PSTR(MSG_CONTRAST),
#if LCD_CONTRAST_MAX >= 100
itostr3(lcd_contrast)
#else
lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
itostr2(lcd_contrast)
#endif
);
}
if (LCD_CLICKED) lcd_goto_previous_menu(true);
}
......@@ -2577,6 +2627,8 @@ void lcd_update() {
static millis_t return_to_status_ms = 0;
#endif
manage_manual_move();
lcd_buttons_update();
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
......@@ -2805,8 +2857,8 @@ void lcd_setalertstatuspgm(const char* message) {
void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if HAS(LCD_CONTRAST)
void lcd_setcontrast(uint8_t value) {
lcd_contrast = value & 0x3F;
void set_lcd_contrast(int value) {
lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
u8g.setContrast(lcd_contrast);
}
#endif
......
......@@ -52,7 +52,7 @@
#if ENABLED(DOGLCD)
extern int lcd_contrast;
void lcd_setcontrast(uint8_t value);
void set_lcd_contrast(int value);
#endif
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
......
......@@ -92,7 +92,7 @@ volatile long endstops_stepsTotal, endstops_stepsDone;
#if ENABLED(ADVANCE)
static long advance_rate, advance, final_advance = 0;
static long old_advance = 0;
static long e_steps[6];
static long e_steps[EXTRUDERS];
#elif ENABLED(ADVANCE_LPC)
int extruder_advance_k = ADVANCE_LPC_K;
volatile int e_steps[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0);
......@@ -130,7 +130,7 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
#if ENABLED(DUAL_X_CARRIAGE)
#define X_APPLY_DIR(v,ALWAYS) \
if (extruder_duplication_enabled || ALWAYS) { \
if (hotend_duplication_enabled || ALWAYS) { \
X_DIR_WRITE(v); \
X2_DIR_WRITE(v); \
} \
......@@ -138,7 +138,7 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
if (current_block->active_driver) X2_DIR_WRITE(v); else X_DIR_WRITE(v); \
}
#define X_APPLY_STEP(v,ALWAYS) \
if (extruder_duplication_enabled || ALWAYS) { \
if (hotend_duplication_enabled || ALWAYS) { \
X_STEP_WRITE(v); \
X2_STEP_WRITE(v); \
} \
......@@ -1010,7 +1010,7 @@ void st_init() {
#if ENABLED(ADVANCE) || ENABLED(ADVANCE_LPC)
#if ENABLED(ADVANCE)
e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = e_steps[4] = e_steps[5] = 0;
for (uint8_t i = 0; i < EXTRUDERS; i++) e_steps[i] = 0;
#elif ENABLED(ADVANCE_LPC)
for (uint8_t i = 0; i < EXTRUDERS; i++) {
e_steps[i] = 0;
......
......@@ -50,7 +50,7 @@
* A_AXIS and C_AXIS are used by COREXZ or COREZX printers
* X_HEAD and Y_HEAD and Z_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
*/
enum AxisEnum {X_AXIS = 0, A_AXIS = 0, Y_AXIS = 1, B_AXIS = 1, Z_AXIS = 2, C_AXIS = 2, E_AXIS = 3, X_HEAD = 4, Y_HEAD = 5, Z_HEAD = 5};
enum AxisEnum {NO_AXIS = -1, X_AXIS = 0, A_AXIS = 0, Y_AXIS = 1, B_AXIS = 1, Z_AXIS = 2, C_AXIS = 2, E_AXIS = 3, X_HEAD = 4, Y_HEAD = 5, Z_HEAD = 5};
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
#if ENABLED(ABORT_ON_ENDSTOP_HIT_INIT)
......
......@@ -238,9 +238,9 @@
#define NORM_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
#else
#define E_STEP_WRITE(v) { if(extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }}
#define E_STEP_WRITE(v) { if(hotend_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(hotend_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(hotend_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }}
#endif
#else
#if ENABLED(DONDOLO_SINGLE_MOTOR)
......
......@@ -208,6 +208,8 @@ class Planner {
*/
static uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); }
static bool is_full() { return (block_buffer_tail == BLOCK_MOD(block_buffer_head + 1)); }
#if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING)
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment