Commit 5dd1ae24 authored by MagoKimbra's avatar MagoKimbra

Add acc retraction for extruder and ejerk for estruder

parent 284d5489
......@@ -91,8 +91,8 @@
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
//#define Z_SAFE_HOMING
#ifdef Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) or homing Z
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) or homing Z
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL)
......@@ -186,23 +186,23 @@
#define HOMING_FEEDRATE {100*60, 100*60, 2*60, 0} // set the homing speeds (mm/min)
// default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,3200,625,625,625,625} // X, Y, Z, E0, E1, E2, E3 default steps per unit
#define DEFAULT_MAX_FEEDRATE {300,300,2,100,100,100,100} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,3200,625,625,625,625} // X, Y, Z, E0...(per extruder). Default steps per unit
#define DEFAULT_MAX_FEEDRATE {300,300,2,100,100,100,100} // X, Y, Z, E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0...(per extruder). Maximum start speed for accelerated moves.
#define DEFAULT_RETRACT_ACCELERATION {10000,10000,10000,10000} // E0... (per extruder) max acceleration in mm/s^2 for retracts
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E* max acceleration in mm/s^2 for printing moves
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
// The offset has to be X=0, Y=0 for the hotend 0 (default hotend).
// For the other hotends it is their distance from the hotend 0.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 10.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
//===========================================================================
//=============================Additional Features===========================
......
......@@ -90,9 +90,9 @@
//If you have enabled the Auto Bed Levelling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
//#define Z_SAFE_HOMING
#ifndef Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) or homing Z
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) or homing Z
#ifdef Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL)
......@@ -186,23 +186,23 @@
#define HOMING_FEEDRATE {100*60, 100*60, 2*60, 0} // set the homing speeds (mm/min)
// default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,3200,625,625,625,625} // X, Y, Z, E0, E1, E2, E3 default steps per unit
#define DEFAULT_MAX_FEEDRATE {300,300,2,100,100,100,100} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 10000 // E max acceleration in mm/s^2 for retracts
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,3200,625,625,625,625} // X, Y, Z, E0...(per extruder). Default steps per unit
#define DEFAULT_MAX_FEEDRATE {300,300,2,100,100,100,100} // X, Y, Z, E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0...(per extruder). Maximum start speed for accelerated moves.
#define DEFAULT_RETRACT_ACCELERATION {10000,10000,10000,10000} // E0... (per extruder) max acceleration in mm/s^2 for retracts
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E* max acceleration in mm/s^2 for printing moves
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
// The offset has to be X=0, Y=0 for the hotend 0 (default hotend).
// For the other hotends it is their distance from the hotend 0.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 10.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
//===========================================================================
//=============================Additional Features===========================
......
......@@ -134,20 +134,20 @@
// default settings
// delta speeds must be the same on xyz
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,625,625,625} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_MAX_FEEDRATE {300,300,300,45,100,100,100} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,625,625,625} // X, Y, Z, E0...(per extruder). Default steps per unit
#define DEFAULT_MAX_FEEDRATE {500,500,500,45,45,45,45} // X, Y, Z, E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_ACCELERATION {5000,5000,5000,1000,1000,1000,1000} // X, Y, Z, E0...(per extruder). Maximum start speed for accelerated moves.
#define DEFAULT_RETRACT_ACCELERATION {10000,10000,10000,10000} // E0... (per extruder) max acceleration in mm/s^2 for retracts
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
// The offset has to be X=0, Y=0 for the hotend 0 (default hotend).
// For the other hotends it is their distance from the hotend 0.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20 // (mm/sec)
#define DEFAULT_ZJERK 20 // (mm/sec)
#define DEFAULT_EJERK 5 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
......@@ -97,10 +97,10 @@
#define E_MIN_POS 0
//=====================================================================================
//============================= Bed Manual or Auto Leveling ===========================
//================ Manual Bed Leveling (MBL) or Auto Bed Leveling =====================
//=====================================================================================
// set the rectangle in which to probe in manual or automatic
// set the rectangle in which to probe in MBL or ABL
#define LEFT_PROBE_BED_POSITION 20
#define RIGHT_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20
......@@ -112,8 +112,8 @@
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!
//#define Z_SAFE_HOMING
#ifdef Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28) or homing Z
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28) or homing Z
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28)
#endif
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (ABL)
......@@ -208,23 +208,23 @@
#define HOMING_FEEDRATE {40*60, 40*60, 10*60, 0} // set the homing speeds (mm/min)
// default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {103.69,103.69,200/1.25,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_MAX_FEEDRATE {300,300,4,45,45,45,45} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {5000,5000,50,5000,5000,5000,5000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_AXIS_STEPS_PER_UNIT {103.69,103.69,200/1.25,1000,1000,1000,1000} // X, Y, Z, E0...(per extruder). Default steps per unit
#define DEFAULT_MAX_FEEDRATE {300,300,4,45,45,45,45} // X, Y, Z, E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_ACCELERATION {5000,5000,50,5000,5000,5000,5000} // X, Y, Z, E0...(per extruder). Maximum start speed for accelerated moves.
#define DEFAULT_RETRACT_ACCELERATION {10000,10000,10000,10000} // E0... (per extruder) max acceleration in mm/s^2 for retracts
#define DEFAULT_ACCELERATION 400 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2000 // X, Y, Z and E max acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each extruder, offset of the hotend on the Y axis
// The offset has to be X=0, Y=0 for the hotend 0 (default hotend).
// For the other hotends it is their distance from the hotend 0.
//#define HOTEND_OFFSET_X {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
//#define HOTEND_OFFSET_Y {0.0, 5.00, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 5 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 3 // (mm/sec)
#define DEFAULT_EJERK {3.0,3.0,3.0,3.0} // (mm/sec)
//===========================================================================
//=============================Additional Features===========================
......
......@@ -4316,22 +4316,19 @@ inline void gcode_M85() {
* M92: Set axis_steps_per_unit
*/
inline void gcode_M92() {
for(int8_t i = 0; i <= Z_AXIS; i++) {
if (code_seen(axis_codes[i])) axis_steps_per_unit[i] = code_value();
}
if (setTargetedHotend(92)) return;
if (code_seen('E')) {
int tmp_extruder = 0;
tmp_extruder = code_value();
float value = code_seen('S') ? code_value() : axis_steps_per_unit[E_AXIS + tmp_extruder];
if (value < 20.0) {
float factor = axis_steps_per_unit[E_AXIS + tmp_extruder] / value; // increase e constants if M92 E14 is given for netfab.
max_e_jerk *= factor;
max_feedrate[E_AXIS + tmp_extruder] *= factor;
axis_steps_per_sqr_second[E_AXIS + tmp_extruder] *= factor;
for(int8_t i = 0; i <= NUM_AXIS; i++) {
if (code_seen(axis_codes[i])) {
if (i == E_AXIS)
axis_steps_per_unit[i + target_extruder] = code_value();
else
axis_steps_per_unit[i] = code_value();
}
axis_steps_per_unit[E_AXIS + tmp_extruder] = value;
}
st_synchronize();
// This recalculates position in steps in case user has changed steps/unit
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
}
/**
......@@ -4782,31 +4779,37 @@ inline void gcode_M201() {
/**
* M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
* M203: Set maximum feedrate that your machine can sustain in mm/sec
*
* X,Y,Z = AXIS
* T* E = E_AXIS
*
*/
inline void gcode_M203() {
for(int8_t i = 0; i <= Z_AXIS; i++) {
if (code_seen(axis_codes[i])) max_feedrate[i] = code_value();
}
if (setTargetedHotend(203)) return;
if (code_seen('E')) {
int tmp_extruder = 0;
tmp_extruder = code_value();
float value = code_seen('S') ? code_value() : max_feedrate[E_AXIS + tmp_extruder];
max_feedrate[E_AXIS + tmp_extruder] = value;
for(int8_t i = 0; i < NUM_AXIS; i++) {
if (code_seen(axis_codes[i])) {
if (i == E_AXIS)
max_feedrate[i + target_extruder] = code_value();
else
max_feedrate[i] = code_value();
}
}
}
/**
* M204: Set Accelerations in mm/sec^2 (M204 P1200 R3000 T3000)
* M204: Set Accelerations in mm/sec^2 (M204 P1200 T0 R3000 V3000)
*
* P = Printing moves
* R = Retract only (no X, Y, Z) moves
* T = Travel (non printing) moves
* T* R = Retract only (no X, Y, Z) moves
* V = Travel (non printing) moves
*
* Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
*/
inline void gcode_M204() {
if (setTargetedHotend(204)) return;
if (code_seen('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
acceleration = code_value();
travel_acceleration = acceleration;
......@@ -4817,10 +4820,10 @@ inline void gcode_M204() {
ECHO_LMV(DB, "Setting Print Acceleration: ", acceleration );
}
if (code_seen('R')) {
retract_acceleration = code_value();
ECHO_LMV(DB, "Setting Retract Acceleration: ", retract_acceleration );
retract_acceleration[target_extruder] = code_value();
ECHO_LMV(DB, "Setting Retract Acceleration: ", retract_acceleration[target_extruder]);
}
if (code_seen('T')) {
if (code_seen('V')) {
travel_acceleration = code_value();
ECHO_LMV(DB, "Setting Travel Acceleration: ", travel_acceleration );
}
......@@ -4830,19 +4833,21 @@ inline void gcode_M204() {
* M205: Set Advanced Settings
*
* S = Min Feed Rate (mm/s)
* T = Min Travel Feed Rate (mm/s)
* V = Min Travel Feed Rate (mm/s)
* B = Min Segment Time (µs)
* X = Max XY Jerk (mm/s/s)
* Z = Max Z Jerk (mm/s/s)
* E = Max E Jerk (mm/s/s)
*/
inline void gcode_M205() {
if (setTargetedHotend(205)) return;
if (code_seen('S')) minimumfeedrate = code_value();
if (code_seen('T')) mintravelfeedrate = code_value();
if (code_seen('V')) mintravelfeedrate = code_value();
if (code_seen('B')) minsegmenttime = code_value();
if (code_seen('X')) max_xy_jerk = code_value();
if (code_seen('Z')) max_z_jerk = code_value();
if (code_seen('E')) max_e_jerk = code_value();
if (code_seen('E')) max_e_jerk[target_extruder] = code_value();
}
/**
......@@ -6220,7 +6225,6 @@ void process_next_command() {
case 92: // G92
gcode_G92(); break;
}
code_is_good = false;
break;
case 'M': switch (codenum) {
......@@ -6558,7 +6562,6 @@ void process_next_command() {
gcode_SET_Z_PROBE_OFFSET(); break;
#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
}
code_is_good = false;
break;
case 'T':
......
......@@ -14,28 +14,28 @@
*
*/
#define EEPROM_VERSION "V22"
#define EEPROM_VERSION "V23"
/**
* V22 EEPROM Layout:
* V23 EEPROM Layout:
*
* ver
* M92 XYZ E0 E1 E2 E3 axis_steps_per_unit (x7)
* M203 XYZ E0 E1 E2 E3 max_feedrate (x7)
* M201 XYZ E0 E1 E2 E3 max_acceleration_units_per_sq_second (x7)
* M92 XYZ E0 ... axis_steps_per_unit X,Y,Z,E0 ... (per extruder)
* M203 XYZ E0 ... max_feedrate X,Y,Z,E0 ... (per extruder)
* M201 XYZ E0 ... max_acceleration_units_per_sq_second X,Y,Z,E0 ... (per extruder)
* M204 P acceleration
* M204 R retract_acceleration
* M204 R E0 ... retract_acceleration (per extruder)
* M204 T travel_acceleration
* M205 S minimumfeedrate
* M205 T mintravelfeedrate
* M205 B minsegmenttime
* M205 X max_xy_jerk
* M205 Z max_z_jerk
* M205 E max_e_jerk
* M205 E E0 ... max_e_jerk (per extruder)
* M206 XYZ home_offset (x3)
* M666 P zprobe_zoffset
*
* HOTEND OFFSET:
* HOTENDS OFFSET:
* M218 T XY hotend_offset (x4) (T0..3)
*
* DELTA:
......@@ -134,8 +134,6 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
* Store Configuration Settings - M500
*/
#define DUMMY_PID_VALUE 3000.0f
#define EEPROM_OFFSET 100
#ifdef EEPROM_SETTINGS
......@@ -194,31 +192,19 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, gumPreheatHPBTemp);
EEPROM_WRITE_VAR(i, gumPreheatFanSpeed);
for (int e = 0; e < 4; e++) {
#ifdef PIDTEMP
if (e < HOTENDS) {
for (int e = 0; e < HOTENDS; e++) {
EEPROM_WRITE_VAR(i, PID_PARAM(Kp, e));
EEPROM_WRITE_VAR(i, PID_PARAM(Ki, e));
EEPROM_WRITE_VAR(i, PID_PARAM(Kd, e));
}
else
#endif // !PIDTEMP
{
dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
EEPROM_WRITE_VAR(i, dummy);
dummy = 0.0f;
for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
}
} // Extruders Loop
#ifndef PIDTEMPBED
float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE;
#endif
#ifdef PIDTEMPBED
EEPROM_WRITE_VAR(i, bedKp);
EEPROM_WRITE_VAR(i, bedKi);
EEPROM_WRITE_VAR(i, bedKd);
#endif
#if defined(DOGLCD) || LCD_CONTRAST < 0
const int lcd_contrast = 32;
......@@ -227,9 +213,6 @@ void Config_StoreSettings() {
#ifdef SCARA
EEPROM_WRITE_VAR(i, axis_scaling); // 3 floats
#else
dummy = 1.0f;
EEPROM_WRITE_VAR(i, dummy);
#endif
#ifdef FWRETRACT
......@@ -346,36 +329,18 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, gumPreheatFanSpeed);
#ifdef PIDTEMP
for (int e = 0; e < 4; e++) { // 4 = max hotend currently supported
EEPROM_READ_VAR(i, dummy); // Kp
if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) {
// do not need to scale PID values as the values in EEPROM are already scaled
PID_PARAM(Kp, e) = dummy;
for (int8_t e = 0; e < HOTENDS; e++) {
EEPROM_READ_VAR(i, PID_PARAM(Kp, e));
EEPROM_READ_VAR(i, PID_PARAM(Ki, e));
EEPROM_READ_VAR(i, PID_PARAM(Kd, e));
}
else {
for (int q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
}
}
#else // !PIDTEMP
// 4 x 3 = 12 slots for PID parameters
for (int q = 12; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd
#endif // !PIDTEMP
#ifndef PIDTEMPBED
float bedKp, bedKi, bedKd;
#endif
#endif // PIDTEMP
EEPROM_READ_VAR(i, dummy); // bedKp
if (dummy != DUMMY_PID_VALUE) {
bedKp = dummy;
#ifdef PIDTEMPBED
EEPROM_READ_VAR(i, bedKp);
EEPROM_READ_VAR(i, bedKi);
EEPROM_READ_VAR(i, bedKd);
}
else {
for (int q = 2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
}
#endif
#if defined(DOGLCD) || LCD_CONTRAST < 0
int lcd_contrast;
......@@ -385,8 +350,6 @@ void Config_RetrieveSettings() {
#ifdef SCARA
EEPROM_READ_VAR(i, axis_scaling); // 3 floats
#else
EEPROM_READ_VAR(i, dummy);
#endif
#ifdef FWRETRACT
......@@ -410,7 +373,7 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, volumetric_enabled);
for (int q = 0; q < 4; q++) {
for (int8_t q = 0; q < 4; q++) {
EEPROM_READ_VAR(i, dummy);
if (q < EXTRUDERS) filament_size[q] = dummy;
}
......@@ -444,49 +407,82 @@ void Config_ResetDefault() {
float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
float tmp2[] = DEFAULT_MAX_FEEDRATE;
long tmp3[] = DEFAULT_MAX_ACCELERATION;
long tmp4[] = DEFAULT_RETRACT_ACCELERATION;
long tmp5[] = DEFAULT_EJERK;
#ifdef PIDTEMP
float tmp4[] = DEFAULT_Kp;
float tmp5[] = DEFAULT_Ki;
float tmp6[] = DEFAULT_Kd;
float tmp6[] = DEFAULT_Kp;
float tmp7[] = DEFAULT_Ki;
float tmp8[] = DEFAULT_Kd;
#endif // PIDTEMP
#if defined(HOTEND_OFFSET_X) && defined(HOTEND_OFFSET_Y)
float tmp7[] = HOTEND_OFFSET_X;
float tmp8[] = HOTEND_OFFSET_Y;
float tmp9[] = HOTEND_OFFSET_X;
float tmp10[] = HOTEND_OFFSET_Y;
#else
float tmp7[] = {0,0,0,0};
float tmp8[] = {0,0,0,0};
float tmp9[] = {0};
float tmp10[] = {0};
#endif
for (int i = 0; i < 3 + EXTRUDERS; i++) {
for (int8_t i = 0; i < 3 + EXTRUDERS; i++) {
short max_i;
max_i = sizeof(tmp1) / sizeof(*tmp1);
if(i < max_i)
axis_steps_per_unit[i] = tmp1[i];
else
axis_steps_per_unit[i] = tmp1[max_i - 1];
max_i = sizeof(tmp2) / sizeof(*tmp2);
if(i < max_i)
max_feedrate[i] = tmp2[i];
else
max_feedrate[i] = tmp2[max_i - 1];
max_i = sizeof(tmp3) / sizeof(*tmp3);
if(i < max_i)
max_acceleration_units_per_sq_second[i] = tmp3[i];
else
max_acceleration_units_per_sq_second[i] = tmp3[max_i - 1];
if(i < EXTRUDERS) {
max_i = sizeof(tmp4) / sizeof(*tmp4);
if(i < max_i)
retract_acceleration[i] = tmp4[i];
else
retract_acceleration[i] = tmp4[max_i - 1];
max_i = sizeof(tmp5) / sizeof(*tmp5);
if(i < max_i)
max_e_jerk[i] = tmp5[i];
else
max_e_jerk[i] = tmp5[max_i - 1];
#if HOTENDS > 1
max_i = sizeof(tmp9) / sizeof(*tmp9);
if(i < max_i)
extruder_offset[X_AXIS][i] = tmp9[i];
else
extruder_offset[X_AXIS][i] = 0;
max_i = sizeof(tmp10) / sizeof(*tmp10);
if(i < max_i)
extruder_offset[Y_AXIS][i] = tmp10[i];
else
extruder_offset[Y_AXIS][i] = 0;
#endif // HOTENDS > 1
}
}
for (int i = 0; i < EXTRUDERS; i++) {
#if HOTENDS > 1
hotend_offset[X_AXIS][i] = tmp7[i];
hotend_offset[Y_AXIS][i] = tmp8[i];
#endif
#ifdef SCARA
for (int8_t i = 0; i < NUM_AXIS; i++) {
if (i < sizeof(axis_scaling) / sizeof(*axis_scaling))
axis_scaling[i] = 1;
#endif
}
#endif
// steps per sq second need to be updated to agree with the units per sq second
reset_acceleration_rates();
acceleration = DEFAULT_ACCELERATION;
retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
minimumfeedrate = DEFAULT_MINIMUMFEEDRATE;
minsegmenttime = DEFAULT_MINSEGMENTTIME;
mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE;
max_xy_jerk = DEFAULT_XYJERK;
max_z_jerk = DEFAULT_ZJERK;
max_e_jerk = DEFAULT_EJERK;
home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
#ifdef ENABLE_AUTO_BED_LEVELING
......@@ -522,11 +518,10 @@ void Config_ResetDefault() {
#endif //DOGLCD
#ifdef PIDTEMP
for (int e = 0; e < HOTENDS; e++)
{
Kp[e] = tmp4[e];
Ki[e] = scalePID_i(tmp5[e]);
Kd[e] = scalePID_d(tmp6[e]);
for (int8_t e = 0; e < HOTENDS; e++) {
Kp[e] = tmp6[e];
Ki[e] = scalePID_i(tmp7[e]);
Kd[e] = scalePID_d(tmp8[e]);
}
// call updatePID (similar to when we have processed M301)
updatePID();
......@@ -554,16 +549,11 @@ void Config_ResetDefault() {
#endif
volumetric_enabled = false;
filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA;
#if EXTRUDERS > 1
filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA;
#if EXTRUDERS > 2
filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA;
#if EXTRUDERS > 3
filament_size[3] = DEFAULT_NOMINAL_FILAMENT_DIA;
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
#endif // EXTRUDERS > 1
for (short i = 0; i < EXTRUDERS; i++) {
filament_size[i] = DEFAULT_NOMINAL_FILAMENT_DIA;
}
calculate_volumetric_multipliers();
#ifdef IDLE_OOZING_PREVENT
......@@ -587,17 +577,13 @@ void Config_ResetDefault() {
ECHO_SMV(DB, " M92 X", axis_steps_per_unit[X_AXIS]);
ECHO_MV(" Y", axis_steps_per_unit[Y_AXIS]);
ECHO_MV(" Z", axis_steps_per_unit[Z_AXIS]);
ECHO_MV(" E0 S", axis_steps_per_unit[E_AXIS + 0]);
ECHO_EMV(" E", axis_steps_per_unit[E_AXIS]);
#if EXTRUDERS > 1
ECHO_MV(" E1 S", axis_steps_per_unit[E_AXIS + 1]);
#if EXTRUDERS > 2
ECHO_MV(" E2 S", axis_steps_per_unit[E_AXIS + 2]);
#if EXTRUDERS > 3
ECHO_MV(" E3 S", axis_steps_per_unit[E_AXIS + 3]);
#endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2
for (short i = 1; i < EXTRUDERS; i++) {
ECHO_SMV(DB, " M92 T", i);
ECHO_EMV(" E", axis_steps_per_unit[E_AXIS + i]);
}
#endif //EXTRUDERS > 1
ECHO_E;
#ifdef SCARA
if (!forReplay) {
......@@ -614,17 +600,13 @@ void Config_ResetDefault() {
ECHO_SMV(DB, " M203 X", max_feedrate[X_AXIS]);
ECHO_MV(" Y", max_feedrate[Y_AXIS] );
ECHO_MV(" Z", max_feedrate[Z_AXIS] );
ECHO_MV(" E0 S", max_feedrate[E_AXIS + 0]);
ECHO_EMV(" E", max_feedrate[E_AXIS]);
#if EXTRUDERS > 1
ECHO_MV(" E1 S", max_feedrate[E_AXIS + 1]);
#if EXTRUDERS > 2
ECHO_MV(" E2 S", max_feedrate[E_AXIS + 2]);
#if EXTRUDERS > 3
ECHO_MV(" E3 S", max_feedrate[E_AXIS + 3]);
#endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2
for (short i = 1; i < EXTRUDERS; i++) {
ECHO_SMV(DB, " M203 T", i);
ECHO_EMV(" E", max_feedrate[E_AXIS + i]);
}
#endif //EXTRUDERS > 1
ECHO_E;
if (!forReplay) {
ECHO_LM(DB, "Maximum Acceleration (mm/s2):");
......@@ -632,34 +614,42 @@ void Config_ResetDefault() {
ECHO_SMV(DB, " M201 X", max_acceleration_units_per_sq_second[X_AXIS] );
ECHO_MV(" Y", max_acceleration_units_per_sq_second[Y_AXIS] );
ECHO_MV(" Z", max_acceleration_units_per_sq_second[Z_AXIS] );
ECHO_MV(" E0 S", max_acceleration_units_per_sq_second[E_AXIS]);
ECHO_EMV(" E", max_acceleration_units_per_sq_second[E_AXIS]);
#if EXTRUDERS > 1
ECHO_MV(" E1 S", max_acceleration_units_per_sq_second[E_AXIS+1]);
#if EXTRUDERS > 2
ECHO_MV(" E2 S", max_acceleration_units_per_sq_second[E_AXIS+2]);
#if EXTRUDERS > 3
ECHO_MV(" E3 S", max_acceleration_units_per_sq_second[E_AXIS+3]);
#endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2
for (short i = 1; i < EXTRUDERS; i++) {
ECHO_SMV(DB, " M201 T", i);
ECHO_EMV(" E", max_acceleration_units_per_sq_second[E_AXIS + i]);
}
#endif //EXTRUDERS > 1
ECHO_E;
if (!forReplay) {
ECHO_LM(DB, "Accelerations: P=printing, R=retract and T=travel");
ECHO_LM(DB, "Accelerations: P=printing, V=travel and T* R=retract");
}
ECHO_SMV(DB," M204 P", acceleration);
ECHO_EMV(" V", travel_acceleration);
#if EXTRUDERS > 0
for (short i = 0; i < EXTRUDERS; i++) {
ECHO_SMV(DB, " M204 T", i);
ECHO_EMV(" R" ,retract_acceleration[i]);
}
ECHO_SMV(DB," M204 P", acceleration );
ECHO_MV(" R", retract_acceleration);
ECHO_EMV(" T", travel_acceleration);
#endif
if (!forReplay) {
ECHO_LM(DB, "Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)");
ECHO_LM(DB, "Advanced variables: S=Min feedrate (mm/s), V=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)");
}
ECHO_SMV(DB, " M205 S", minimumfeedrate );
ECHO_MV(" T", mintravelfeedrate );
ECHO_MV(" V", mintravelfeedrate );
ECHO_MV(" B", minsegmenttime );
ECHO_MV(" X", max_xy_jerk );
ECHO_MV(" Z", max_z_jerk);
ECHO_EMV(" E", max_e_jerk);
ECHO_EMV(" E", max_e_jerk[0]);
#if (EXTRUDERS > 1)
for(short i = 1; i < EXTRUDERS; i++) {
ECHO_SMV(DB, " M205 T", i);
ECHO_EMV(" E" , max_e_jerk[i]);
}
#endif
if (!forReplay) {
ECHO_LM(DB, "Home offset (mm):");
......
......@@ -83,12 +83,12 @@
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VE_JERK "Ve-jerk "
#define MSG_VMAX "Vmax "
#define MSG_X "x"
#define MSG_Y "y"
#define MSG_Z "z"
#define MSG_E "e"
#define MSG_X "X"
#define MSG_Y "Y"
#define MSG_Z "Z"
#define MSG_E "E"
#define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax "
......@@ -97,10 +97,10 @@
#define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm"
#define MSG_E0STEPS "E0 steps/mm"
#define MSG_E1STEPS "E1 steps/mm"
#define MSG_E2STEPS "E2 steps/mm"
#define MSG_E3STEPS "E3 steps/mm"
#define MSG_E0STEPS "E0steps/mm"
#define MSG_E1STEPS "E1steps/mm"
#define MSG_E2STEPS "E2steps/mm"
#define MSG_E3STEPS "E3steps/mm"
#define MSG_TEMPERATURE "Temperature"
#define MSG_MOTION "Motion"
#define MSG_VOLUMETRIC "Filament"
......
......@@ -83,24 +83,24 @@
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VE_JERK "Ve-jerk "
#define MSG_VMAX "Vmax "
#define MSG_X "x"
#define MSG_Y "y"
#define MSG_Z "z"
#define MSG_E "e"
#define MSG_X "X"
#define MSG_Y "Y"
#define MSG_Z "Z"
#define MSG_E "E"
#define MSG_VMIN "Vmin"
#define MSG_VTRAV_MIN "VTrav min"
#define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract"
#define MSG_A_RETRACT "A-retract "
#define MSG_A_TRAVEL "A-travel"
#define MSG_XSTEPS "X steps/mm"
#define MSG_YSTEPS "Y steps/mm"
#define MSG_ZSTEPS "Z steps/mm"
#define MSG_E0STEPS "E0 steps/mm"
#define MSG_E1STEPS "E1 steps/mm"
#define MSG_E2STEPS "E2 steps/mm"
#define MSG_E3STEPS "E3 steps/mm"
#define MSG_E0STEPS "E0steps/mm"
#define MSG_E1STEPS "E1steps/mm"
#define MSG_E2STEPS "E2steps/mm"
#define MSG_E3STEPS "E3steps/mm"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimento"
#define MSG_VOLUMETRIC "Filamento"
......
......@@ -65,11 +65,11 @@ float axis_steps_per_unit[3 + EXTRUDERS];
unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use M201 to override by software
float minimumfeedrate;
float acceleration; // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX
float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
float retract_acceleration[EXTRUDERS]; // mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
float travel_acceleration; // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
float max_xy_jerk; // The largest speed change requiring no acceleration
float max_z_jerk;
float max_e_jerk;
float max_e_jerk[EXTRUDERS]; // mm/s - initial speed for extruder retract moves
float mintravelfeedrate;
unsigned long axis_steps_per_sqr_second[3 + EXTRUDERS];
......@@ -879,7 +879,7 @@ float junction_deviation = 0.1;
float steps_per_mm = block->step_event_count / block->millimeters;
long bsx = block->steps[X_AXIS], bsy = block->steps[Y_AXIS], bsz = block->steps[Z_AXIS], bse = block->steps[E_AXIS];
if (bsx == 0 && bsy == 0 && bsz == 0) {
block->acceleration_st = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
block->acceleration_st = ceil(retract_acceleration[extruder] * steps_per_mm); // convert to: acceleration steps/sec^2
}
else if (bse == 0) {
block->acceleration_st = ceil(travel_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2
......@@ -951,7 +951,7 @@ float junction_deviation = 0.1;
// Start with a safe speed
float vmax_junction = max_xy_jerk / 2;
float vmax_junction_factor = 1.0;
float mz2 = max_z_jerk / 2, me2 = max_e_jerk / 2;
float mz2 = max_z_jerk / 2, me2 = max_e_jerk[extruder] / 2;
float csz = current_speed[Z_AXIS], cse = current_speed[E_AXIS];
if (fabs(csz) > mz2) vmax_junction = min(vmax_junction, mz2);
if (fabs(cse) > me2) vmax_junction = min(vmax_junction, me2);
......@@ -970,7 +970,7 @@ float junction_deviation = 0.1;
// }
if (jerk > max_xy_jerk) vmax_junction_factor = max_xy_jerk / jerk;
if (dz > max_z_jerk) vmax_junction_factor = min(vmax_junction_factor, max_z_jerk / dz);
if (de > max_e_jerk) vmax_junction_factor = min(vmax_junction_factor, max_e_jerk / de);
if (de > max_e_jerk[extruder]) vmax_junction_factor = min(vmax_junction_factor, max_e_jerk[extruder] / de);
vmax_junction = min(previous_nominal_speed, vmax_junction * vmax_junction_factor); // Limit speed to max previous speed
}
......@@ -1059,7 +1059,7 @@ float junction_deviation = 0.1;
st_set_position(nx, ny, nz, ne);
previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
for (int i=0; i<NUM_AXIS; i++) previous_speed[i] = 0.0;
for (int i=0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
}
void plan_set_e_position(const float &e) {
......
......@@ -124,11 +124,11 @@ extern float axis_steps_per_unit[3 + EXTRUDERS];
extern unsigned long max_acceleration_units_per_sq_second[3 + EXTRUDERS]; // Use M201 to override by software
extern float minimumfeedrate;
extern float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
extern float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
extern float retract_acceleration[EXTRUDERS]; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
extern float travel_acceleration; // Travel acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
extern float max_z_jerk;
extern float max_e_jerk;
extern float max_e_jerk[EXTRUDERS]; // mm/s - initial speed for extruder retract moves
extern float mintravelfeedrate;
extern unsigned long axis_steps_per_sqr_second[3 + EXTRUDERS];
......
......@@ -1178,32 +1178,47 @@ static void lcd_control_motion_menu() {
MENU_ITEM_EDIT(float5, MSG_ACC, &acceleration, 10, 99000);
MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &max_xy_jerk, 1, 990);
MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &max_z_jerk, 0.1, 990);
MENU_ITEM_EDIT(float3, MSG_VE_JERK, &max_e_jerk, 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &max_feedrate[X_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &max_feedrate[Y_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &max_feedrate[Z_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &max_feedrate[E_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMIN, &minimumfeedrate, 0, 999);
MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &mintravelfeedrate, 0, 999);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &max_acceleration_units_per_sq_second[X_AXIS], 100, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &max_acceleration_units_per_sq_second[Y_AXIS], 100, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &max_acceleration_units_per_sq_second[Z_AXIS], 10, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &max_acceleration_units_per_sq_second[E_AXIS], 100, 99000, reset_acceleration_rates);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &retract_acceleration, 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &travel_acceleration, 100, 99000);
MENU_ITEM_EDIT(float52, MSG_XSTEPS, &axis_steps_per_unit[X_AXIS], 5, 9999);
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
MENU_ITEM_EDIT(float51, MSG_E0STEPS, &axis_steps_per_unit[E_AXIS+0], 5, 9999);
#if EXTRUDERS > 0
MENU_ITEM_EDIT(float3, MSG_VE_JERK MSG_E "0", &max_e_jerk[0], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E "0", &max_feedrate[E_AXIS], 1, 999);
MENU_ITEM_EDIT(long5, MSG_AMAX MSG_E "0", &max_acceleration_units_per_sq_second[E_AXIS], 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT MSG_E "0", &retract_acceleration[0], 100, 99000);
MENU_ITEM_EDIT(float51, MSG_E0STEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);
#if EXTRUDERS > 1
MENU_ITEM_EDIT(float51, MSG_E1STEPS, &axis_steps_per_unit[E_AXIS+1], 5, 9999);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK MSG_E "1", &max_e_jerk[1], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E "1", &max_feedrate[E_AXIS + 1], 1, 999);
MENU_ITEM_EDIT(long5, MSG_AMAX MSG_E "1", &max_acceleration_units_per_sq_second[E_AXIS + 1], 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT MSG_E "1", &retract_acceleration[1], 100, 99000);
MENU_ITEM_EDIT(float51, MSG_E1STEPS, &axis_steps_per_unit[E_AXIS + 1], 5, 9999);
#if EXTRUDERS > 2
MENU_ITEM_EDIT(float51, MSG_E2STEPS, &axis_steps_per_unit[E_AXIS+2], 5, 9999);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK MSG_E "2", &max_e_jerk[2], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E "2", &max_feedrate[E_AXIS + 2], 1, 999);
MENU_ITEM_EDIT(long5, MSG_AMAX MSG_E "2", &max_acceleration_units_per_sq_second[E_AXIS + 2], 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT MSG_E "2", &retract_acceleration[2], 100, 99000);
MENU_ITEM_EDIT(float51, MSG_E2STEPS, &axis_steps_per_unit[E_AXIS + 2], 5, 9999);
#if EXTRUDERS > 3
MENU_ITEM_EDIT(float51, MSG_E3STEPS, &axis_steps_per_unit[E_AXIS+3], 5, 9999);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK MSG_E "3", &max_e_jerk[3], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E "3", &max_feedrate[E_AXIS + 3], 1, 999);
MENU_ITEM_EDIT(long5, MSG_AMAX MSG_E "3", &max_acceleration_units_per_sq_second[E_AXIS + 3], 100, 99000);
MENU_ITEM_EDIT(float5, MSG_A_RETRACT MSG_E "3", &retract_acceleration[3], 100, 99000);
MENU_ITEM_EDIT(float51, MSG_E3STEPS, &axis_steps_per_unit[E_AXIS + 3], 5, 9999);
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
#endif // EXTRUDERS > 1
#endif // EXTRUDERS > 0
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &abort_on_endstop_hit);
#endif
......
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