Commit 521d08d1 authored by MagoKimbra's avatar MagoKimbra

Update!!!

parent bb233423
// Define this to set a custom name for your generic Mendel, // Define this to set a custom name for your generic Mendel,
#define CUSTOM_MENDEL_NAME "Prusa" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Prusa"
//=========================================================================== //===========================================================================
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
......
// Define this to set a custom name for your generic Mendel, // Define this to set a custom name for your generic Mendel,
#define CUSTOM_MENDEL_NAME "Core XY" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Core XY"
//=========================================================================== //===========================================================================
//=============================Mechanical Settings=========================== //=============================Mechanical Settings===========================
......
// Define this to set a custom name for your generic Delta // Define this to set a custom name for your generic Delta
#define CUSTOM_MENDEL_NAME "Delta" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Delta"
//=========================================================================== //===========================================================================
//============================== Delta Settings ============================= //============================== Delta Settings =============================
......
// Define this to set a custom name for your generic Mendel, // Define this to set a custom name for your generic Mendel,
#define CUSTOM_MENDEL_NAME "Scara" // Displayed in the LCD "Ready" message
#define CUSTOM_MACHINE_NAME "Scara"
// SCARA-mode for Marlin has been developed by QHARLEY in ZA in 2012/2013. Implemented // SCARA-mode for Marlin has been developed by QHARLEY in ZA in 2012/2013. Implemented
// and slightly reworked by JCERNY in 06/2014 with the goal to bring it into Master-Branch // and slightly reworked by JCERNY in 06/2014 with the goal to bring it into Master-Branch
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
* IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F * IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
* M111 - Set debug flags with S<mask>. See flag bits defined in Marlin.h. * M111 - Set debug flags with S<mask>. See flag bits defined in Marlin.h.
* M112 - Emergency stop * M112 - Emergency stop
* M114 - Output current position to serial port * M114 - Output current position to serial port, (V)erbose for user
* M115 - Capabilities string * M115 - Capabilities string
* M117 - display message * M117 - display message
* M119 - Output Endstop status to serial port * M119 - Output Endstop status to serial port
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
* M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil) * M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
* M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil) * M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
* M140 - Set bed target temp * M140 - Set bed target temp
* M145 - Set the heatup state H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
* M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work. * M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
* M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating * M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
* Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling * Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
...@@ -334,7 +335,7 @@ millis_t config_last_update = 0; ...@@ -334,7 +335,7 @@ millis_t config_last_update = 0;
#endif #endif
#ifdef DELTA #ifdef DELTA
float endstop_adj[3] = { 0, 0, 0 }; float delta[3] = { 0.0 };
float tower_adj[6] = { 0, 0, 0, 0, 0, 0 }; float tower_adj[6] = { 0, 0, 0, 0, 0, 0 };
float delta_radius; // = DEFAULT_delta_radius; float delta_radius; // = DEFAULT_delta_radius;
float delta_diagonal_rod; // = DEFAULT_DELTA_DIAGONAL_ROD; float delta_diagonal_rod; // = DEFAULT_DELTA_DIAGONAL_ROD;
...@@ -357,7 +358,6 @@ millis_t config_last_update = 0; ...@@ -357,7 +358,6 @@ millis_t config_last_update = 0;
{ 0, 0, 0 }, { 0, 0, 0 },
{ 0, 0, 0 }, { 0, 0, 0 },
}; };
float delta[3] = { 0.0, 0.0, 0.0 };
float delta_tmp[3] = { 0.0, 0.0, 0.0 }; float delta_tmp[3] = { 0.0, 0.0, 0.0 };
float probing_feedrate = PROBING_FEEDRATE; float probing_feedrate = PROBING_FEEDRATE;
float default_z_probe_offset[] = Z_PROBE_OFFSET; float default_z_probe_offset[] = Z_PROBE_OFFSET;
...@@ -368,6 +368,7 @@ millis_t config_last_update = 0; ...@@ -368,6 +368,7 @@ millis_t config_last_update = 0;
float z_probe_retract_end_location[] = Z_PROBE_RETRACT_END_LOCATION; float z_probe_retract_end_location[] = Z_PROBE_RETRACT_END_LOCATION;
#define SIN_60 0.8660254037844386 #define SIN_60 0.8660254037844386
#define COS_60 0.5 #define COS_60 0.5
float endstop_adj[3] = { 0 };
static float bed_level[7][7] = { static float bed_level[7][7] = {
{ 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 },
...@@ -1048,54 +1049,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); ...@@ -1048,54 +1049,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
#endif //DUAL_X_CARRIAGE #endif //DUAL_X_CARRIAGE
/** static void axis_is_at_home(int axis) {
* Some planner shorthand inline functions
*/
inline void set_homing_bump_feedrate(AxisEnum axis) {
#ifdef DELTA
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
if (homing_bump_divisor[X_AXIS] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[X_AXIS];
else {
feedrate = homing_feedrate[axis] / 10;
ECHO_LM(ER, MSG_ERR_HOMING_DIV);
}
#else // No DELTA
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
if (homing_bump_divisor[axis] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[axis];
else {
feedrate = homing_feedrate[axis] / 10;
ECHO_LM(ER, MSG_ERR_HOMING_DIV);
}
#endif // No DELTA
}
inline void line_to_current_position() {
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
}
inline void line_to_z(float zPosition) {
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
}
inline void line_to_destination(float mm_m) {
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m/60, active_extruder, active_driver);
}
inline void line_to_destination() {
line_to_destination(feedrate);
}
inline void sync_plan_position() {
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
}
#if defined(DELTA) || defined(SCARA)
inline void sync_plan_position_delta() {
calculate_delta(current_position);
plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
}
#endif
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
#if defined(CARTESIAN) || defined(COREXY) || defined(SCARA)
static void axis_is_at_home(int axis) {
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
if (axis == X_AXIS) { if (axis == X_AXIS) {
...@@ -1150,14 +1104,73 @@ inline void set_destination_to_current() { memcpy(destination, current_position, ...@@ -1150,14 +1104,73 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
min_pos[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis)); min_pos[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis));
max_pos[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis)); max_pos[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis));
} }
else else {
#endif
{
current_position[axis] = base_home_pos(axis) + home_offset[axis]; current_position[axis] = base_home_pos(axis) + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis]; min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; max_pos[axis] = base_max_pos(axis) + home_offset[axis];
} }
#elif defined(DELTA)
current_position[axis] = base_home_pos[axis] + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos[axis] + home_offset[axis];
#else
current_position[axis] = base_home_pos(axis) + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos(axis) + home_offset[axis];
#endif
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0
if (axis == Z_AXIS) current_position[Z_AXIS] += zprobe_zoffset;
#endif
}
/**
* Some planner shorthand inline functions
*/
inline void set_homing_bump_feedrate(AxisEnum axis) {
#ifdef DELTA
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
if (homing_bump_divisor[X_AXIS] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[X_AXIS];
else {
feedrate = homing_feedrate[axis] / 10;
ECHO_LM(ER, MSG_ERR_HOMING_DIV);
} }
#else // No DELTA
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
if (homing_bump_divisor[axis] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[axis];
else {
feedrate = homing_feedrate[axis] / 10;
ECHO_LM(ER, MSG_ERR_HOMING_DIV);
}
#endif // No DELTA
}
inline void line_to_current_position() {
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
}
inline void line_to_z(float zPosition) {
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
}
inline void line_to_destination(float mm_m) {
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], mm_m/60, active_extruder, active_driver);
}
inline void line_to_destination() {
line_to_destination(feedrate);
}
inline void sync_plan_position() {
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
}
#if defined(DELTA) || defined(SCARA)
inline void sync_plan_position_delta() {
calculate_delta(current_position);
plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
}
#endif
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
#if defined(CARTESIAN) || defined(COREXY) || defined(SCARA)
static void do_blocking_move_to(float x, float y, float z) { static void do_blocking_move_to(float x, float y, float z) {
float oldFeedRate = feedrate; float oldFeedRate = feedrate;
...@@ -1467,11 +1480,6 @@ inline void set_destination_to_current() { memcpy(destination, current_position, ...@@ -1467,11 +1480,6 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
#endif // Cartesian || CoreXY || Scara #endif // Cartesian || CoreXY || Scara
#ifdef DELTA #ifdef DELTA
static void axis_is_at_home(int axis) {
current_position[axis] = base_home_pos[axis] + home_offset[axis];
min_pos[axis] = base_min_pos(axis) + home_offset[axis];
max_pos[axis] = base_max_pos[axis] + home_offset[axis];
}
static void homeaxis(AxisEnum axis) { static void homeaxis(AxisEnum axis) {
#define HOMEAXIS_DO(LETTER) \ #define HOMEAXIS_DO(LETTER) \
...@@ -2511,11 +2519,11 @@ inline void wait_bed() { ...@@ -2511,11 +2519,11 @@ inline void wait_bed() {
refresh_cmd_timeout(); refresh_cmd_timeout();
} }
/****************************************************************************** /******************************************************************************
***************************** G-Code Functions ******************************** ***************************** G-Code Functions ********************************
*******************************************************************************/ *******************************************************************************/
/** /**
* G0, G1: Coordinated movement of X Y Z E axes * G0, G1: Coordinated movement of X Y Z E axes
*/ */
...@@ -2542,6 +2550,7 @@ inline void gcode_G0_G1() { ...@@ -2542,6 +2550,7 @@ inline void gcode_G0_G1() {
} }
} }
#endif //FWRETRACT #endif //FWRETRACT
prepare_move(); prepare_move();
//ClearToSend(); //ClearToSend();
} }
...@@ -2740,6 +2749,11 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) { ...@@ -2740,6 +2749,11 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) {
#endif // QUICK_HOME #endif // QUICK_HOME
#ifdef HOME_Y_BEFORE_X
// Home Y
if (home_all_axis || homeY) HOMEAXIS(Y);
#endif
// Home X // Home X
if (home_all_axis || homeX) { if (home_all_axis || homeX) {
#ifdef DUAL_X_CARRIAGE #ifdef DUAL_X_CARRIAGE
...@@ -2759,20 +2773,10 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) { ...@@ -2759,20 +2773,10 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) {
#endif #endif
} }
#ifndef HOME_Y_BEFORE_X
// Home Y // Home Y
if (home_all_axis || homeY) HOMEAXIS(Y); if (home_all_axis || homeY) HOMEAXIS(Y);
#endif
// Set the X position, if included
if (code_seen(axis_codes[X_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[X_AXIS] = code_value();
}
// Set the Y position, if included
if (code_seen(axis_codes[Y_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[Y_AXIS] = code_value();
}
// Home Z last if homing towards the bed // Home Z last if homing towards the bed
#if Z_HOME_DIR < 0 #if Z_HOME_DIR < 0
...@@ -2969,16 +2973,6 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) { ...@@ -2969,16 +2973,6 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) {
#endif //Z_SAFE_HOMING #endif //Z_SAFE_HOMING
#endif //Z_HOME_DIR < 0 #endif //Z_HOME_DIR < 0
// Set the Z position, if included
if (code_seen(axis_codes[Z_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[Z_AXIS] = code_value();
}
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0
if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset; // Add Z_Probe offset (the distance is negative)
#endif
sync_plan_position(); sync_plan_position();
#endif // else DELTA #endif // else DELTA
...@@ -3922,13 +3916,13 @@ inline void gcode_M42() { ...@@ -3922,13 +3916,13 @@ inline void gcode_M42() {
if (radius < 0.0) radius = -radius; if (radius < 0.0) radius = -radius;
X_current = X_probe_location + cos(theta) * radius; X_current = X_probe_location + cos(theta) * radius;
X_current = constrain(X_current, X_MIN_POS, X_MAX_POS); X_current = constrain(X_current, X_MIN_POS + 10, X_MAX_POS - 10);
Y_current = Y_probe_location + sin(theta) * radius; Y_current = Y_probe_location + sin(theta) * radius;
Y_current = constrain(Y_current, Y_MIN_POS, Y_MAX_POS); Y_current = constrain(Y_current, Y_MIN_POS + 10, Y_MAX_POS - 10);
if (verbose_level > 3) { if (verbose_level > 3) {
ECHO_SMV(DB, "x: ", X_current); ECHO_SMV(DB, "x: ", X_current);
ECHO_EMV("y: ", Y_current); ECHO_EMV(" y: ", Y_current);
} }
do_blocking_move_to(X_current, Y_current, Z_current); // this also updates current_position do_blocking_move_to(X_current, Y_current, Z_current); // this also updates current_position
...@@ -3969,9 +3963,10 @@ inline void gcode_M42() { ...@@ -3969,9 +3963,10 @@ inline void gcode_M42() {
sigma = sqrt(sum / (n + 1)); sigma = sqrt(sum / (n + 1));
if (verbose_level > 1) { if (verbose_level > 1) {
ECHO_V(n+1); ECHO_SV(DB, n + 1);
ECHO_MV(" of ", n_samples); ECHO_MV(" of ", n_samples);
ECHO_MV(" z: ", current_position[Z_AXIS], 6); ECHO_EM(" samples");
ECHO_SMV(DB, "z: ", current_position[Z_AXIS], 6);
if (verbose_level > 2) { if (verbose_level > 2) {
ECHO_MV(" mean: ", mean,6); ECHO_MV(" mean: ", mean,6);
ECHO_MV(" sigma: ", sigma,6); ECHO_MV(" sigma: ", sigma,6);
...@@ -4104,25 +4099,24 @@ inline void gcode_M85() { ...@@ -4104,25 +4099,24 @@ inline void gcode_M85() {
} }
/** /**
* M92: Set axis_steps_per_unit - same syntax as G92 * M92: Set axis_steps_per_unit
*/ */
inline void gcode_M92() { inline void gcode_M92() {
for(int8_t i = 0; i < NUM_AXIS; i++) { for(int8_t i = 0; i <= Z_AXIS; i++) {
if (code_seen(axis_codes[i])) { if (code_seen(axis_codes[i])) axis_steps_per_unit[i] = code_value();
if (i == E_AXIS) { }
float value = code_value();
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) { if (value < 20.0) {
float factor = axis_steps_per_unit[i] / value; // increase e constants if M92 E14 is given for netfab. 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_e_jerk *= factor;
max_feedrate[i] *= factor; max_feedrate[E_AXIS + tmp_extruder] *= factor;
axis_steps_per_sqr_second[i] *= factor; axis_steps_per_sqr_second[E_AXIS + tmp_extruder] *= factor;
}
axis_steps_per_unit[i] = value;
}
else {
axis_steps_per_unit[i] = code_value();
}
} }
axis_steps_per_unit[E_AXIS + tmp_extruder] = value;
} }
} }
...@@ -4270,6 +4264,30 @@ inline void gcode_M112() { ...@@ -4270,6 +4264,30 @@ inline void gcode_M112() {
* M114: Output current position to serial port * M114: Output current position to serial port
*/ */
inline void gcode_M114() { inline void gcode_M114() {
//MESSAGE for Host
ECHO_SMV(OK, "X:", current_position[X_AXIS]);
ECHO_MV(" Y:", current_position[Y_AXIS]);
ECHO_MV(" Z:", current_position[Z_AXIS]);
ECHO_MV(" E:", current_position[E_AXIS]);
ECHO_MV(MSG_COUNT_X, float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]);
ECHO_MV(" Y:", float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]);
ECHO_EMV(" Z:", float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]);
#ifdef SCARA
//MESSAGE for Host
ECHO_SMV(OK, "SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
ECHO_SMV(DB, "SCARA Cal - Theta:", delta[X_AXIS]+home_offset[X_AXIS]);
ECHO_EMV(" Psi+Theta (90):", delta[Y_AXIS]-delta[X_AXIS]-90+home_offset[Y_AXIS]);
ECHO_SMV(DB, "SCARA step Cal - Theta:", delta[X_AXIS]/90*axis_steps_per_unit[X_AXIS]);
ECHO_EMV(" Psi+Theta:", (delta[Y_AXIS]-delta[X_AXIS])/90*axis_steps_per_unit[Y_AXIS]);
#endif
if (code_seen('V')) {
//MESSAGE for user
ECHO_SMV(DB, "X:", current_position[X_AXIS]); ECHO_SMV(DB, "X:", current_position[X_AXIS]);
ECHO_MV(" Y:", current_position[Y_AXIS]); ECHO_MV(" Y:", current_position[Y_AXIS]);
ECHO_MV(" Z:", current_position[Z_AXIS]); ECHO_MV(" Z:", current_position[Z_AXIS]);
...@@ -4280,7 +4298,8 @@ inline void gcode_M114() { ...@@ -4280,7 +4298,8 @@ inline void gcode_M114() {
ECHO_EMV(" Z:", float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]); ECHO_EMV(" Z:", float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS]);
#ifdef SCARA #ifdef SCARA
ECHO_SMV(DB, "SCARA Theta:", delta[X_AXIS]); //MESSAGE for User
ECHO_SMV(OK, "SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]); ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
ECHO_SMV(DB, "SCARA Cal - Theta:", delta[X_AXIS]+home_offset[X_AXIS]); ECHO_SMV(DB, "SCARA Cal - Theta:", delta[X_AXIS]+home_offset[X_AXIS]);
...@@ -4289,6 +4308,7 @@ inline void gcode_M114() { ...@@ -4289,6 +4308,7 @@ inline void gcode_M114() {
ECHO_SMV(DB, "SCARA step Cal - Theta:", delta[X_AXIS]/90*axis_steps_per_unit[X_AXIS]); ECHO_SMV(DB, "SCARA step Cal - Theta:", delta[X_AXIS]/90*axis_steps_per_unit[X_AXIS]);
ECHO_EMV(" Psi+Theta:", (delta[Y_AXIS]-delta[X_AXIS])/90*axis_steps_per_unit[Y_AXIS]); ECHO_EMV(" Psi+Theta:", (delta[Y_AXIS]-delta[X_AXIS])/90*axis_steps_per_unit[Y_AXIS]);
#endif #endif
}
} }
/** /**
...@@ -4389,6 +4409,77 @@ inline void gcode_M140() { ...@@ -4389,6 +4409,77 @@ inline void gcode_M140() {
if (code_seen('S')) setTargetBed(code_value()); if (code_seen('S')) setTargetBed(code_value());
} }
#ifdef ULTIPANEL
/**
* M145: Set the heatup state for a material in the LCD menu
* S<material> (0=PLA, 1=ABS, 2=GUM)
* H<hotend temp>
* B<bed temp>
* F<fan speed>
*/
inline void gcode_M145() {
uint8_t material = code_seen('S') ? code_value_short() : 0;
if (material < 0 || material > 2) {
ECHO_SM(DB, MSG_ERR_MATERIAL_INDEX);
}
else {
int v;
switch (material) {
case 0:
if (code_seen('H')) {
v = code_value_short();
plaPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
}
if (code_seen('F')) {
v = code_value_short();
plaPreheatFanSpeed = constrain(v, 0, 255);
}
#if TEMP_SENSOR_BED != 0
if (code_seen('B')) {
v = code_value_short();
plaPreheatHPBTemp = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
}
#endif
break;
case 1:
if (code_seen('H')) {
v = code_value_short();
absPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
}
if (code_seen('F')) {
v = code_value_short();
absPreheatFanSpeed = constrain(v, 0, 255);
}
#if TEMP_SENSOR_BED != 0
if (code_seen('B')) {
v = code_value_short();
absPreheatHPBTemp = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
}
#endif
break;
case 2:
if (code_seen('H')) {
v = code_value_short();
gumPreheatHotendTemp = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
}
if (code_seen('F')) {
v = code_value_short();
gumPreheatFanSpeed = constrain(v, 0, 255);
}
#if TEMP_SENSOR_BED != 0
if (code_seen('B')) {
v = code_value_short();
gumPreheatHPBTemp = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
}
#endif
break;
}
}
}
#endif
#ifdef BLINKM #ifdef BLINKM
/** /**
* M150: Set Status LED Color - Use R-U-B for R-G-B * M150: Set Status LED Color - Use R-U-B for R-G-B
...@@ -4480,10 +4571,15 @@ inline void gcode_M201() { ...@@ -4480,10 +4571,15 @@ 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 (M203 X200 Y200 Z300 E10000) in mm/sec
*/ */
inline void gcode_M203() { inline void gcode_M203() {
for (int8_t i=0; i < NUM_AXIS; i++) { for(int8_t i = 0; i <= Z_AXIS; i++) {
if (code_seen(axis_codes[i])) { if (code_seen(axis_codes[i])) max_feedrate[i] = code_value();
max_feedrate[i] = code_value();
} }
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;
} }
} }
...@@ -5745,11 +5841,11 @@ void process_commands() { ...@@ -5745,11 +5841,11 @@ void process_commands() {
#endif //FWRETRACT #endif //FWRETRACT
case 28: //G28: Home all axes, one at a time case 28: //G28: Home all axes, one at a time
gcode_G28(); break; gcode_G28(); gcode_M114(); break;
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points. case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
gcode_G29(); break; gcode_G29(); gcode_M114(); break;
#ifndef Z_PROBE_SLED #ifndef Z_PROBE_SLED
case 30: // G30 Single Z Probe case 30: // G30 Single Z Probe
gcode_G30(); break; gcode_G30(); break;
......
...@@ -20,77 +20,77 @@ ...@@ -20,77 +20,77 @@
* V21 EEPROM Layout: * V21 EEPROM Layout:
* *
* ver * ver
* axis_steps_per_unit (x7) * M92 XYZ E0 E1 E2 E3 axis_steps_per_unit (x7)
* max_feedrate (x7) * M203 XYZ E0 E1 E2 E3 max_feedrate (x7)
* retraction_feedrate (x4) * M??? E0 E1 E2 E3 retraction_feedrate (x4)
* max_acceleration_units_per_sq_second (x7) * M201 XYZ E0 E1 E2 E3 max_acceleration_units_per_sq_second (x7)
* acceleration * M204 P acceleration
* retract_acceleration * M204 R retract_acceleration
* travel_acceleration * M204 T travel_acceleration
* minimumfeedrate * M205 S minimumfeedrate
* mintravelfeedrate * M205 T mintravelfeedrate
* minsegmenttime * M205 B minsegmenttime
* max_xy_jerk * M205 X max_xy_jerk
* max_z_jerk * M205 Z max_z_jerk
* max_e_jerk * M205 E max_e_jerk
* home_offset (x3) * M206 XYZ home_offset (x3)
* zprobe_zoffset * M666 P zprobe_zoffset
* *
* HOTEND OFFSET: * HOTEND OFFSET:
* hotend_offset (x4) * M218 T XY hotend_offset (x4) (T0..3)
* *
* DELTA: * DELTA:
* endstop_adj (x3) * M666 XYZ endstop_adj (x3)
* delta_radius * M666 ABCDEFG tower_adj (x6)
* delta_diagonal_rod * M666 R delta_radius
* max_pos * M666 D delta_diagonal_rod
* tower_adj (x3) * M666 H Z max_pos
* z_probe_offset * M666 P z_probe_offset
* *
* Z_DUAL_ENDSTOPS * Z_DUAL_ENDSTOPS
* z_endstop_adj * M666 Z z_endstop_adj
* *
* ULTIPANEL: * ULTIPANEL:
* plaPreheatHotendTemp * M145 S0 H plaPreheatHotendTemp
* plaPreheatHPBTemp * M145 S0 B plaPreheatHPBTemp
* plaPreheatFanSpeed * M145 S0 F plaPreheatFanSpeed
* absPreheatHotendTemp * M145 S1 H absPreheatHotendTemp
* absPreheatHPBTemp * M145 S1 B absPreheatHPBTemp
* absPreheatFanSpeed * M145 S1 F absPreheatFanSpeed
* gumPreheatHotendTemp * M145 S2 H gumPreheatHotendTemp
* gumPreheatHPBTemp * M145 S2 B gumPreheatHPBTemp
* gumPreheatFanSpeed * M145 S2 F gumPreheatFanSpeed
* *
* PIDTEMP: * PIDTEMP:
* Kp[0], Ki[0], Kd[0] * M301 E0 PID Kp[0], Ki[0], Kd[0]
* Kp[1], Ki[1], Kd[1] * M301 E1 PID Kp[1], Ki[1], Kd[1]
* Kp[2], Ki[2], Kd[2] * M301 E2 PID Kp[2], Ki[2], Kd[2]
* Kp[3], Ki[3], Kd[3] * M301 E3 PID Kp[3], Ki[3], Kd[3]
* *
* PIDTEMPBED: * PIDTEMPBED:
* bedKp, bedKi, bedKd * M304 PID bedKp, bedKi, bedKd
* *
* DOGLCD: * DOGLCD:
* lcd_contrast * M250 C lcd_contrast
* *
* SCARA: * SCARA:
* axis_scaling (x3) * M365 XYZ axis_scaling (x3)
* *
* FWRETRACT: * FWRETRACT:
* autoretract_enabled * M209 S autoretract_enabled
* retract_length * M207 S retract_length
* retract_length_swap * M207 W retract_length_swap
* retract_feedrate * M207 F retract_feedrate
* retract_zlift * M207 Z retract_zlift
* retract_recover_length * M208 S retract_recover_length
* retract_recover_length_swap * M208 W retract_recover_length_swap
* retract_recover_feedrate * M208 F retract_recover_feedrate
* *
* volumetric_enabled * M200 D volumetric_enabled (D>0 makes this enabled)
* *
* filament_size (x4) * M200 T D filament_size (x4) (T0..3)
* *
* idleoozing_enabled * M??? S idleoozing_enabled
* *
* *
* *
...@@ -127,8 +127,6 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) { ...@@ -127,8 +127,6 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value)) #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value)) #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
//======================================================================================
#define DUMMY_PID_VALUE 3000.0f #define DUMMY_PID_VALUE 3000.0f
#define EEPROM_OFFSET 100 #define EEPROM_OFFSET 100
...@@ -137,6 +135,9 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) { ...@@ -137,6 +135,9 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
#ifdef EEPROM_SETTINGS #ifdef EEPROM_SETTINGS
/**
* Store Configuration Settings - M500
*/
void Config_StoreSettings() { void Config_StoreSettings() {
float dummy = 0.0f; float dummy = 0.0f;
char ver[4] = "000"; char ver[4] = "000";
...@@ -272,12 +273,16 @@ void Config_StoreSettings() { ...@@ -272,12 +273,16 @@ void Config_StoreSettings() {
ECHO_EM(" bytes)"); ECHO_EM(" bytes)");
} }
/**
* Retrieve Configuration Settings - M501
*/
void Config_RetrieveSettings() { void Config_RetrieveSettings() {
int i = EEPROM_OFFSET; int i = EEPROM_OFFSET;
char stored_ver[4]; char stored_ver[4];
char ver[4] = EEPROM_VERSION; char ver[4] = EEPROM_VERSION;
EEPROM_READ_VAR(i, stored_ver); //read stored version EEPROM_READ_VAR(i, stored_ver); //read stored version
// ECHO_EM("Version: [" << ver << "] Stored version: [" << stored_ver << "]");
if (strncmp(ver, stored_ver, 3) != 0) { if (strncmp(ver, stored_ver, 3) != 0) {
Config_ResetDefault(); Config_ResetDefault();
...@@ -432,6 +437,9 @@ void Config_RetrieveSettings() { ...@@ -432,6 +437,9 @@ void Config_RetrieveSettings() {
#endif // EEPROM_SETTINGS #endif // EEPROM_SETTINGS
/**
* Reset Configuration Settings - M502
*/
void Config_ResetDefault() { void Config_ResetDefault() {
float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
...@@ -564,6 +572,9 @@ void Config_ResetDefault() { ...@@ -564,6 +572,9 @@ void Config_ResetDefault() {
#ifndef DISABLE_M503 #ifndef DISABLE_M503
/**
* Print Configuration Settings - M502
*/
void Config_PrintSettings(bool forReplay) { void Config_PrintSettings(bool forReplay) {
// Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
...@@ -724,6 +735,24 @@ void Config_PrintSettings(bool forReplay) { ...@@ -724,6 +735,24 @@ void Config_PrintSettings(bool forReplay) {
ECHO_LMV(DB, " M666 P", zprobe_zoffset); ECHO_LMV(DB, " M666 P", zprobe_zoffset);
#endif // DELTA #endif // DELTA
#ifdef ULTIPANEL
if (!forReplay) {
ECHO_LM(DB, "Material heatup parameters:");
}
ECHO_SMV(DB, " M145 M0 H", plaPreheatHotendTemp);
ECHO_MV(" B", plaPreheatHPBTemp);
ECHO_MV(" F", plaPreheatFanSpeed);
ECHO_EM(" (Material PLA)");
ECHO_SMV(DB, " M145 M1 H", absPreheatHotendTemp);
ECHO_MV(" B", absPreheatHPBTemp);
ECHO_MV(" F", absPreheatFanSpeed);
ECHO_EM(" (Material ABS)");
ECHO_SMV(DB, " M145 M2 H", gumPreheatHotendTemp);
ECHO_MV(" B", gumPreheatHPBTemp);
ECHO_MV(" F", gumPreheatFanSpeed);
ECHO_EM(" (Material GUM)");
#endif // ULTIPANEL
#if defined(PIDTEMP) || defined(PIDTEMPBED) #if defined(PIDTEMP) || defined(PIDTEMPBED)
if (!forReplay) { if (!forReplay) {
ECHO_LM(DB, "PID settings:"); ECHO_LM(DB, "PID settings:");
......
...@@ -9,10 +9,8 @@ void save_lifetime_stats(); ...@@ -9,10 +9,8 @@ void save_lifetime_stats();
#ifndef DISABLE_M503 #ifndef DISABLE_M503
void Config_PrintSettings(bool forReplay=false); void Config_PrintSettings(bool forReplay=false);
void ConfigSD_PrintSettings(bool forReplay=false);
#else #else
FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {} FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {}
FORCE_INLINE void ConfigSD_PrintSettings(bool forReplay=false) {}
#endif #endif
#ifdef EEPROM_SETTINGS #ifdef EEPROM_SETTINGS
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#endif #endif
#include <U8glib.h> #include <U8glib.h>
#include "DOGMbitmaps.h" #include "dogm_bitmaps.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "ultralcd_st7920_u8glib_rrd.h" #include "ultralcd_st7920_u8glib_rrd.h"
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
#elif defined( DISPLAY_CHARSET_ISO10646_KANA ) #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
#include "dogm_font_data_ISO10646_Kana.h" #include "dogm_font_data_ISO10646_Kana.h"
#define FONT_MENU_NAME ISO10646_Kana_5x7 #define FONT_MENU_NAME ISO10646_Kana_5x7
#elif defined( DISPLAY_CHARSET_ISO10646_CN )
#include "dogm_font_data_ISO10646_CN.h"
#define FONT_MENU_NAME ISO10646_CN
#define TALL_FONT_CORRECTION 1
#else // fall-back #else // fall-back
#include "dogm_font_data_ISO10646_1.h" #include "dogm_font_data_ISO10646_1.h"
#define FONT_MENU_NAME ISO10646_1_5x7 #define FONT_MENU_NAME ISO10646_1_5x7
...@@ -106,6 +110,10 @@ ...@@ -106,6 +110,10 @@
#define LCD_WIDTH_EDIT 22 #define LCD_WIDTH_EDIT 22
#endif #endif
#ifndef TALL_FONT_CORRECTION
#define TALL_FONT_CORRECTION 0
#endif
#define START_ROW 0 #define START_ROW 0
// LCD selection // LCD selection
...@@ -123,6 +131,13 @@ ...@@ -123,6 +131,13 @@
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
#endif #endif
#ifndef LCD_PIXEL_WIDTH
#define LCD_PIXEL_WIDTH 128
#endif
#ifndef LCD_PIXEL_HEIGHT
#define LCD_PIXEL_HEIGHT 64
#endif
#include "utf_mapper.h" #include "utf_mapper.h"
int lcd_contrast; int lcd_contrast;
...@@ -172,6 +187,7 @@ char lcd_printPGM(const char* str) { ...@@ -172,6 +187,7 @@ char lcd_printPGM(const char* str) {
static bool show_splashscreen = true; static bool show_splashscreen = true;
/* Warning: This function is called from interrupt context */
static void lcd_implementation_init() { static void lcd_implementation_init() {
#ifdef LCD_PIN_BL // Enable LCD backlight #ifdef LCD_PIN_BL // Enable LCD backlight
...@@ -252,20 +268,21 @@ static void lcd_implementation_status_screen() { ...@@ -252,20 +268,21 @@ static void lcd_implementation_status_screen() {
#ifdef SDSUPPORT #ifdef SDSUPPORT
// SD Card Symbol // SD Card Symbol
u8g.drawBox(42,42,8,7); u8g.drawBox(42, 42 - TALL_FONT_CORRECTION, 8, 7);
u8g.drawBox(50,44,2,5); u8g.drawBox(50, 44 - TALL_FONT_CORRECTION, 2, 5);
u8g.drawFrame(42,49,10,4); u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4);
u8g.drawPixel(50,43); u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION);
// Progress bar frame // Progress bar frame
u8g.drawFrame(54,49,73,4); u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
// SD Card Progress bar and clock // SD Card Progress bar and clock
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
if (IS_SD_PRINTING) { if (IS_SD_PRINTING) {
// Progress bar solid part // Progress bar solid part
u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2); u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - TALL_FONT_CORRECTION);
} }
u8g.setPrintPos(80,48); u8g.setPrintPos(80,48);
...@@ -319,9 +336,9 @@ static void lcd_implementation_status_screen() { ...@@ -319,9 +336,9 @@ static void lcd_implementation_status_screen() {
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
#ifdef USE_SMALL_INFOFONT #ifdef USE_SMALL_INFOFONT
u8g.drawBox(0,30,128,10); u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
#else #else
u8g.drawBox(0,30,128,9); u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
#endif #endif
u8g.setColorIndex(0); // white on black u8g.setColorIndex(0); // white on black
u8g.setPrintPos(2,XYZ_BASELINE); u8g.setPrintPos(2,XYZ_BASELINE);
...@@ -396,7 +413,7 @@ static void lcd_implementation_status_screen() { ...@@ -396,7 +413,7 @@ static void lcd_implementation_status_screen() {
static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) { static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
if (isSelected) { if (isSelected) {
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT); u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3 - TALL_FONT_CORRECTION, LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT);
u8g.setColorIndex(0); // following text must be white on black u8g.setColorIndex(0); // following text must be white on black
} }
else { else {
...@@ -416,13 +433,15 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co ...@@ -416,13 +433,15 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
pstr++; pstr++;
} }
while (n--) lcd_print(' '); while (n--) lcd_print(' ');
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
lcd_print(post_char); lcd_print(post_char);
lcd_print(' '); lcd_print(' ');
} }
static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) { static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
char c; char c;
uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data))); uint8_t vallen = (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
uint8_t n = LCD_WIDTH - 2 - vallen;
lcd_implementation_mark_as_selected(row, isSelected); lcd_implementation_mark_as_selected(row, isSelected);
...@@ -432,6 +451,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c ...@@ -432,6 +451,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
} }
lcd_print(':'); lcd_print(':');
while (n--) lcd_print(' '); while (n--) lcd_print(' ');
u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); } if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
} }
......
...@@ -30,17 +30,14 @@ ...@@ -30,17 +30,14 @@
#endif #endif
#define PROTOCOL_VERSION "1.0" #define PROTOCOL_VERSION "1.0"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
#undef FIRMWARE_URL
#define MACHINE_NAME "Ultimaker" #define MACHINE_NAME "Ultimaker"
#define FIRMWARE_URL "http://firmware.ultimaker.com" #define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MB(RUMBA) #elif MB(RUMBA)
#define MACHINE_NAME "Rumba" #define MACHINE_NAME "Rumba"
#elif MB(3DRAG) #elif MB(3DRAG)
#define MACHINE_NAME "3Drag" #define MACHINE_NAME "3Drag"
#undef FIRMWARE_URL
#define FIRMWARE_URL "http://3dprint.elettronicain.it/" #define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#elif MB(K8200) #elif MB(K8200)
#define MACHINE_NAME "K8200" #define MACHINE_NAME "K8200"
...@@ -48,15 +45,23 @@ ...@@ -48,15 +45,23 @@
#define MACHINE_NAME "Makibox" #define MACHINE_NAME "Makibox"
#elif MB(SAV_MKI) #elif MB(SAV_MKI)
#define MACHINE_NAME "SAV MkI" #define MACHINE_NAME "SAV MkI"
#undef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" #define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
#else // Default firmware set to Mendel #else // Default firmware set to Mendel
#define MACHINE_NAME "Mendel" #define MACHINE_NAME "Mendel"
#endif #endif
#ifdef CUSTOM_MENDEL_NAME #ifdef CUSTOM_MENDEL_NAME
#error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
#define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
#endif
#ifdef CUSTOM_MACHINE_NAME
#undef MACHINE_NAME #undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME #define MACHINE_NAME CUSTOM_MACHINE_NAME
#endif
#ifndef FIRMWARE_URL
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif #endif
#ifndef BUILD_VERSION #ifndef BUILD_VERSION
...@@ -131,6 +136,7 @@ ...@@ -131,6 +136,7 @@
#define MSG_Z_MAX "z_max: " #define MSG_Z_MAX "z_max: "
#define MSG_Z2_MAX "z2_max: " #define MSG_Z2_MAX "z2_max: "
#define MSG_Z_PROBE "z_probe: " #define MSG_Z_PROBE "z_probe: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-2)"
#define MSG_E_MIN "e_min: " #define MSG_E_MIN "e_min: "
#define MSG_FILAMENT_RUNOUT_PIN "filament_runout_pin: " #define MSG_FILAMENT_RUNOUT_PIN "filament_runout_pin: "
#define MSG_M119_REPORT "Reporting endstop status" #define MSG_M119_REPORT "Reporting endstop status"
......
...@@ -2231,8 +2231,8 @@ ...@@ -2231,8 +2231,8 @@
/**************************************************************************************** /****************************************************************************************
* 502 * 502
* Arduino Due pin assignment
* Alligator R2 * Alligator R2
* http://www.3dartists.org/
****************************************************************************************/ ****************************************************************************************/
#if MB(ALLIGATOR) #if MB(ALLIGATOR)
#define KNOWN_BOARD 1 #define KNOWN_BOARD 1
...@@ -2345,6 +2345,87 @@ ...@@ -2345,6 +2345,87 @@
//32Mb //32Mb
#define SPI_FLASH_CS 23 //PA14 #define SPI_FLASH_CS 23 //PA14
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#define BEEPER 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SDCARDDETECT 49
#elif defined(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SDCARDDETECT -1
#define KILL_PIN 41
#elif defined(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SDCARDDETECT 49
#else
//arduino pin which triggers an piezzo beeper
#define BEEPER 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 //the click
#endif
#endif
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define BEEPER 33 //No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif //NEWPANEL
#endif //ULTRA_LCD
#endif //ALLIGATOR #endif //ALLIGATOR
/****************************************************************************************/ /****************************************************************************************/
......
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