Commit 2e30da9a authored by MagoKimbra's avatar MagoKimbra

Same fix

parent f44099d2
...@@ -570,6 +570,7 @@ bool enqueuecommand(const char *cmd) { ...@@ -570,6 +570,7 @@ bool enqueuecommand(const char *cmd) {
SET_OUTPUT(EXP_VOLTAGE_LEVEL_PIN); SET_OUTPUT(EXP_VOLTAGE_LEVEL_PIN);
WRITE(EXP_VOLTAGE_LEVEL_PIN,UI_VOLTAGE_LEVEL); WRITE(EXP_VOLTAGE_LEVEL_PIN,UI_VOLTAGE_LEVEL);
ExternalDac::begin(); //initialize ExternalDac ExternalDac::begin(); //initialize ExternalDac
lcd_buzz(10,10);
} }
#endif #endif
...@@ -2857,14 +2858,14 @@ inline void gcode_G4() { ...@@ -2857,14 +2858,14 @@ inline void gcode_G4() {
* Z Home to the Z endstop * Z Home to the Z endstop
* *
*/ */
inline void gcode_G28(boolean home_x = false, boolean home_y = false) { inline void gcode_G28(boolean home_XY = false) {
// Wait for planner moves to finish! // Wait for planner moves to finish!
st_synchronize(); st_synchronize();
// For auto bed leveling, clear the level matrix // For auto bed leveling, clear the level matrix
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
plan_bed_level_matrix.set_to_identity(); if (!home_XY) plan_bed_level_matrix.set_to_identity();
#endif #endif
setup_for_endstop_move(); setup_for_endstop_move();
...@@ -2873,10 +2874,10 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) { ...@@ -2873,10 +2874,10 @@ inline void gcode_G28(boolean home_x = false, boolean home_y = false) {
feedrate = 0.0; feedrate = 0.0;
bool homeX = code_seen(axis_codes[X_AXIS]) || home_x, bool homeX = code_seen(axis_codes[X_AXIS]) || home_XY,
homeY = code_seen(axis_codes[Y_AXIS]) || home_y, homeY = code_seen(axis_codes[Y_AXIS]) || home_XY,
homeZ = code_seen(axis_codes[Z_AXIS]), homeZ = code_seen(axis_codes[Z_AXIS]) && !home_XY,
homeE = code_seen(axis_codes[E_AXIS]); homeE = code_seen(axis_codes[E_AXIS]) && !home_XY;
home_all_axis = (!homeX && !homeY && !homeZ && !homeE) || (homeX && homeY && homeZ); home_all_axis = (!homeX && !homeY && !homeZ && !homeE) || (homeX && homeY && homeZ);
...@@ -5547,7 +5548,7 @@ inline void gcode_M503() { ...@@ -5547,7 +5548,7 @@ inline void gcode_M503() {
* M600: Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] * M600: Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
*/ */
inline void gcode_M600() { inline void gcode_M600() {
float target[NUM_AXIS], lastpos[NUM_AXIS], fr60 = feedrate / 60; float target[NUM_AXIS], fr60 = feedrate / 60;
filament_changing = true; filament_changing = true;
for (int i=0; i < NUM_AXIS; i++) for (int i=0; i < NUM_AXIS; i++)
target[i] = lastpos[i] = current_position[i]; target[i] = lastpos[i] = current_position[i];
...@@ -5622,10 +5623,7 @@ inline void gcode_M503() { ...@@ -5622,10 +5623,7 @@ inline void gcode_M503() {
if ((millis() - last_set > 60000) && cnt <= FILAMENTCHANGE_PRINTEROFF) beep = true; if ((millis() - last_set > 60000) && cnt <= FILAMENTCHANGE_PRINTEROFF) beep = true;
if (cnt >= FILAMENTCHANGE_PRINTEROFF && !sleep) { if (cnt >= FILAMENTCHANGE_PRINTEROFF && !sleep) {
disable_all_heaters(); disable_all_heaters();
disable_x(); disable_all_steppers();
disable_y();
disable_z();
disable_e();
sleep = true; sleep = true;
lcd_reset_alert_level(); lcd_reset_alert_level();
LCD_ALERTMESSAGEPGM("Zzzz Zzzz Zzzz"); LCD_ALERTMESSAGEPGM("Zzzz Zzzz Zzzz");
...@@ -5644,8 +5642,8 @@ inline void gcode_M503() { ...@@ -5644,8 +5642,8 @@ inline void gcode_M503() {
lcd_reset_alert_level(); lcd_reset_alert_level();
if (sleep) { if (sleep) {
for(int8_t e = 0; e < HOTENDS; e++) enable_all_steppers(); // Enable all stepper
{ for(int8_t e = 0; e < HOTENDS; e++) {
setTargetHotend(old_target_temperature[e], e); setTargetHotend(old_target_temperature[e], e);
no_wait_for_cooling = true; no_wait_for_cooling = true;
wait_heater(); wait_heater();
...@@ -5668,8 +5666,12 @@ inline void gcode_M503() { ...@@ -5668,8 +5666,12 @@ inline void gcode_M503() {
current_position[E_AXIS] = target[E_AXIS]; //the long retract of L is compensated by manual filament feeding current_position[E_AXIS] = target[E_AXIS]; //the long retract of L is compensated by manual filament feeding
plan_set_e_position(current_position[E_AXIS]); plan_set_e_position(current_position[E_AXIS]);
RUNPLAN; // should do nothing
lcd_reset_alert_level();
// HOME X & Y & Z(only Delta) // HOME X & Y & Z(only Delta)
//gcode_G28(true,true); //Trovare un'altra soluzione //gcode_G28(true); Devo trovare un'altra soluzione
#ifdef DELTA #ifdef DELTA
calculate_delta(lastpos); calculate_delta(lastpos);
......
...@@ -2002,19 +2002,19 @@ ...@@ -2002,19 +2002,19 @@
#define ORIG_X_DIR_PIN 62 #define ORIG_X_DIR_PIN 62
#define ORIG_X_ENABLE_PIN 48 #define ORIG_X_ENABLE_PIN 48
#define X_MIN_PIN 22 #define X_MIN_PIN 22
#define X_MAX_PIN 2 #define X_MAX_PIN 30
#define ORIG_Y_STEP_PIN 65 #define ORIG_Y_STEP_PIN 65
#define ORIG_Y_DIR_PIN 64 #define ORIG_Y_DIR_PIN 64
#define ORIG_Y_ENABLE_PIN 46 #define ORIG_Y_ENABLE_PIN 46
#define Y_MIN_PIN 24 #define Y_MIN_PIN 24
#define Y_MAX_PIN 15 #define Y_MAX_PIN 38
#define ORIG_Z_STEP_PIN 67 #define ORIG_Z_STEP_PIN 67
#define ORIG_Z_DIR_PIN 66 #define ORIG_Z_DIR_PIN 66
#define ORIG_Z_ENABLE_PIN 44 #define ORIG_Z_ENABLE_PIN 44
#define Z_MIN_PIN 26 #define Z_MIN_PIN 26
#define Z_MAX_PIN -1 #define Z_MAX_PIN 34
#define ORIG_E0_STEP_PIN 36 #define ORIG_E0_STEP_PIN 36
#define ORIG_E0_DIR_PIN 28 #define ORIG_E0_DIR_PIN 28
...@@ -2049,11 +2049,11 @@ ...@@ -2049,11 +2049,11 @@
#define HEATER_1_PIN 10 #define HEATER_1_PIN 10
#define HEATER_2_PIN 11 #define HEATER_2_PIN 11
#define TEMP_BED_PIN 0 // ANALOG NUMBERING #define TEMP_BED_PIN 7 // ANALOG NUMBERING
#define TEMP_0_PIN 1 // ANALOG NUMBERING #define TEMP_0_PIN 6 // ANALOG NUMBERING
#define TEMP_1_PIN -1 // 2 // ANALOG NUMBERING #define TEMP_1_PIN 5 // 2 // ANALOG NUMBERING
#define TEMP_2_PIN -1 // 3 // ANALOG NUMBERING #define TEMP_2_PIN 4 // 3 // ANALOG NUMBERING
#define TEMP_3_PIN -1 // ANALOG NUMBERING #define TEMP_3_PIN -1 // ANALOG NUMBERING
#define TEMP_4_PIN -1 // ANALOG NUMBERING #define TEMP_4_PIN -1 // ANALOG NUMBERING
......
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