From 73cc1c9c8a51689c0945791054dcf5658ad57050 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 26 Sep 2017 03:21:33 +0200 Subject: [PATCH 1/5] =?UTF-8?q?initial=20state=20of=20crash=20detect=20and?= =?UTF-8?q?=20filament=20sensor=20is=20ON=20slowed=20down=20return=20speed?= =?UTF-8?q?=20from=20crash=20detect=20after=20home=20Added=20babystep=20ap?= =?UTF-8?q?ply=20after=20return=20from=20crash=20detect=20(don=E2=80=99t?= =?UTF-8?q?=20know=20if=20it=E2=80=99s=20accurate)=20Added=20D10=20to=20se?= =?UTF-8?q?t=20machine=20to=20XYZ=20correctly=20calibrated=20Added=20resum?= =?UTF-8?q?e=20debug=20directive=20to=20mask=20additional=20menu=20item?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Firmware/Marlin_main.cpp | 13 +++++++++---- Firmware/tmc2130.cpp | 2 +- Firmware/ultralcd.cpp | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 3b77c51a..4b849416 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -586,6 +586,7 @@ void crashdet_stop_and_save_print() void crashdet_restore_print_and_continue() { restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change + babystep_apply(); } @@ -614,7 +615,7 @@ void fsensor_restore_print_and_continue() } -bool fsensor_enabled = false; +bool fsensor_enabled = true; bool fsensor_ignore_error = true; bool fsensor_M600 = false; long fsensor_prev_pos_e = 0; @@ -1053,10 +1054,11 @@ void setup() eeprom_write_byte((uint8_t*)EEPROM_UVLO, 0); } -#ifndef DEBUG_DISABLE_STARTMSGS check_babystep(); //checking if Z babystep is in allowed range setup_uvlo_interrupt(); +#ifndef DEBUG_DISABLE_STARTMSGS + if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED || calibration_status() == CALIBRATION_STATUS_UNKNOWN) { // Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled. @@ -5754,6 +5756,9 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp MYSERIAL.print("selectedSerialPort = "); MYSERIAL.println(selectedSerialPort, DEC); break; + case 10: // D10 - Tell the printer that XYZ calibration went OK + calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST); + break; case 999: { MYSERIAL.println("D999 - crash"); @@ -7298,7 +7303,7 @@ void stop_and_save_print_to_ram(float z_move, float e_move) // card.closefile(); saved_printing = true; sei(); - if ((z_move != 0) || (e_move != 0)) { // extruder and z move + if ((z_move != 0) || (e_move != 0)) { // extruder or z move #if 1 // Rather than calling plan_buffer_line directly, push the move into the command queue, char buf[48]; @@ -7332,7 +7337,7 @@ void restore_print_from_ram_and_continue(float e_move) feedrate = saved_feedrate2; //restore feedrate float e = saved_pos[E_AXIS] - e_move; plan_set_e_position(e); - plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS], active_extruder); + plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS]/10, active_extruder); st_synchronize(); memcpy(current_position, saved_pos, sizeof(saved_pos)); memcpy(destination, current_position, sizeof(destination)); diff --git a/Firmware/tmc2130.cpp b/Firmware/tmc2130.cpp index 6fe8adba..f320c952 100644 --- a/Firmware/tmc2130.cpp +++ b/Firmware/tmc2130.cpp @@ -56,7 +56,7 @@ uint32_t tmc2130_sg_pos[4] = {0, 0, 0, 0}; uint8_t sg_homing_axes_mask = 0x00; -bool tmc2130_sg_stop_on_crash = false; +bool tmc2130_sg_stop_on_crash = true; bool tmc2130_sg_crash = false; uint8_t tmc2130_diag_mask = 0x00; uint16_t tmc2130_sg_err[4] = {0, 0, 0, 0}; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 54b88ef2..77196d8b 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -105,9 +105,9 @@ int8_t SDscrool = 0; int8_t SilentModeMenu = 0; -int8_t FSensorStateMenu = 0; +int8_t FSensorStateMenu = 1; -int8_t CrashDetectMenu = 0; +int8_t CrashDetectMenu = 1; extern void fsensor_enable(); extern void fsensor_disable(); @@ -3869,10 +3869,12 @@ static void lcd_main_menu() MENU_ITEM(back, MSG_WATCH, lcd_status_screen); +#ifdef RESUME_DEBUG if (!saved_printing) MENU_ITEM(function, PSTR("tst - Save"), lcd_menu_test_save); else MENU_ITEM(function, PSTR("tst - Restore"), lcd_menu_test_restore); +#ifdef //RESUME_DEBUG #ifdef TMC2130_DEBUG MENU_ITEM(function, PSTR("recover print"), recover_print); From a883c8df84020a9d4f130aac9c984fd9befd623c Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 26 Sep 2017 03:23:08 +0200 Subject: [PATCH 2/5] preklep --- Firmware/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 77196d8b..dc798cef 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3874,7 +3874,7 @@ static void lcd_main_menu() MENU_ITEM(function, PSTR("tst - Save"), lcd_menu_test_save); else MENU_ITEM(function, PSTR("tst - Restore"), lcd_menu_test_restore); -#ifdef //RESUME_DEBUG +#endif //RESUME_DEBUG #ifdef TMC2130_DEBUG MENU_ITEM(function, PSTR("recover print"), recover_print); From 89121e6e34470aef4377d229a2620e87aa2d834a Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 26 Sep 2017 04:30:10 +0200 Subject: [PATCH 3/5] Maker Faire brainstorm 2.0 Added filament sensor and crash detection to EEPROM Added crash-detection counters display disable directive Added Restore/Save print directive Added crash detection and filament sensor settings to Tune menu --- Firmware/Configuration.h | 4 ++++ Firmware/Configuration_prusa.h | 5 +++- Firmware/Marlin.h | 1 + Firmware/Marlin_main.cpp | 43 +++++++++++++++++++++++++++++++++- Firmware/tmc2130.cpp | 2 ++ Firmware/ultralcd.cpp | 29 +++++++++++++++++------ 6 files changed, 75 insertions(+), 9 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index 81d30c39..f7ec8ebd 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -60,6 +60,10 @@ #define EEPROM_UVLO_MESH_BED_LEVELING (EEPROM_FAN_CHECK_ENABLED - 9*2) #define EEPROM_UVLO_Z_MICROSTEPS (EEPROM_UVLO_MESH_BED_LEVELING - 2) +// Crash detection mode EEPROM setting +#define EEPROM_CRASH_DET (EEPROM_UVLO_MESH_BED_LEVELING-12) +// Filament sensor on/off EEPROM setting +#define EEPROM_FSENSOR (EEPROM_UVLO_MESH_BED_LEVELING-14) // Currently running firmware, each digit stored as uint16_t. // The flavor differentiates a dev, alpha, beta, release candidate or a release version. diff --git a/Firmware/Configuration_prusa.h b/Firmware/Configuration_prusa.h index 36b1cd35..36de0d47 100644 --- a/Firmware/Configuration_prusa.h +++ b/Firmware/Configuration_prusa.h @@ -79,6 +79,9 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o //DEBUG #define DEBUG_DCODES //D codes #if 1 +//#define DEBUG_CRASHDET_COUNTERS //Display crash-detection counters on LCD +//#define DEBUG_RESUME_PRINT //Resume/save print debug enable +//#define DEBUG_UVLO_AUTOMATIC_RECOVER // Power panic automatic recovery debug output //#define DEBUG_DISABLE_XMINLIMIT //x min limit ignored //#define DEBUG_DISABLE_XMAXLIMIT //x max limit ignored //#define DEBUG_DISABLE_YMINLIMIT //y min limit ignored @@ -88,7 +91,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o #define DEBUG_DISABLE_STARTMSGS //no startup messages //#define DEBUG_DISABLE_MINTEMP //mintemp error ignored //#define DEBUG_DISABLE_SWLIMITS //sw limits ignored -#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line +//#define DEBUG_DISABLE_LCD_STATUS_LINE //empty four lcd line //#define DEBUG_DISABLE_PREVENT_EXTRUDER //cold extrusion and long extrusion allowed #define DEBUG_DISABLE_PRUSA_STATISTICS //disable prusa_statistics() mesages //#define DEBUG_XSTEP_DUP_PIN 21 //duplicate x-step output to pin 21 (SCL on P3) diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index fbf913f6..9f2b8dc9 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -371,6 +371,7 @@ void serialecho_temperatures(); void uvlo_(); void recover_print(); +void recover_print(uint8_t automatic); void setup_uvlo_interrupt(); extern void recover_machine_state_after_power_panic(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 4b849416..63d98e79 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -567,15 +567,24 @@ static void lcd_language_menu(); void stop_and_save_print_to_ram(float z_move, float e_move); void restore_print_from_ram_and_continue(float e_move); +extern int8_t CrashDetectMenu; + void crashdet_enable() { + MYSERIAL.println("crashdet_enable"); tmc2130_sg_stop_on_crash = true; + eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0xFF); + CrashDetectMenu = 1; + } void crashdet_disable() { + MYSERIAL.println("crashdet_disable"); tmc2130_sg_stop_on_crash = false; + eeprom_update_byte((uint8_t*)EEPROM_CRASH_DET, 0x00); + CrashDetectMenu = 0; } void crashdet_stop_and_save_print() @@ -586,7 +595,7 @@ void crashdet_stop_and_save_print() void crashdet_restore_print_and_continue() { restore_print_from_ram_and_continue(0); //XYZ = orig, E - no change - babystep_apply(); +// babystep_apply(); } @@ -630,6 +639,9 @@ uint8_t fsensor_err_cnt = 0; //#define FSENS_MAXERR 2 //filament sensor max error count #define FSENS_MAXERR 5 //filament sensor max error count +extern int8_t FSensorStateMenu; + + void fsensor_enable() { MYSERIAL.println("fsensor_enable"); @@ -639,12 +651,16 @@ void fsensor_enable() fsensor_enabled = true; fsensor_ignore_error = true; fsensor_M600 = false; + eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0xFF); + FSensorStateMenu = 1; } void fsensor_disable() { MYSERIAL.println("fsensor_disable"); fsensor_enabled = false; + eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x00); + FSensorStateMenu = 0; } void fsensor_update() @@ -882,11 +898,36 @@ void setup() #ifdef TMC2130 uint8_t silentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT); tmc2130_mode = silentMode?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL; + uint8_t crashdet = eeprom_read_byte((uint8_t*)EEPROM_CRASH_DET); + if (crashdet) + { + crashdet_enable(); + MYSERIAL.println("CrashDetect ENABLED!"); + } + else + { + crashdet_disable(); + MYSERIAL.println("CrashDetect DISABLED"); + } + #endif //TMC2130 #ifdef PAT9125 MYSERIAL.print("PAT9125_init:"); MYSERIAL.println(pat9125_init(200, 200)); + + uint8_t fsensor = eeprom_read_byte((uint8_t*)EEPROM_FSENSOR); + if (fsensor) + { + fsensor_enable(); + MYSERIAL.println("Filament Sensor ENABLED!"); + } + else + { + fsensor_disable(); + MYSERIAL.println("Filament Sensor DISABLED"); + } + #endif //PAT9125 st_init(); // Initialize stepper, this enables interrupts! diff --git a/Firmware/tmc2130.cpp b/Firmware/tmc2130.cpp index f320c952..e80b141b 100644 --- a/Firmware/tmc2130.cpp +++ b/Firmware/tmc2130.cpp @@ -453,6 +453,7 @@ void tmc2130_check_overtemp() checktime = millis(); tmc2130_sg_change = true; } +#ifdef DEBUG_CRASHDET_COUNTERS if (tmc2130_sg_change) { for (int i = 0; i < 4; i++) @@ -463,6 +464,7 @@ void tmc2130_check_overtemp() lcd.print(' '); } } +#endif DEBUG_CRASHDET_COUNTERS } void tmc2130_setup_chopper(uint8_t axis, uint8_t mres, uint8_t current_h, uint8_t current_r) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index dc798cef..b2c628b5 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2544,12 +2544,12 @@ static void lcd_silent_mode_set() { static void lcd_crash_mode_set() { - if (!CrashDetectMenu==0) { + CrashDetectMenu = !CrashDetectMenu; //set also from crashdet_enable() and crashdet_disable() + if (CrashDetectMenu==0) { crashdet_disable(); }else{ crashdet_enable(); } - CrashDetectMenu = !CrashDetectMenu; lcd_goto_menu(lcd_settings_menu, 7); } @@ -2566,12 +2566,12 @@ static void lcd_set_lang(unsigned char lang) { static void lcd_fsensor_state_set() { - if (!FSensorStateMenu==0) { + FSensorStateMenu = !FSensorStateMenu; //set also from fsensor_enable() and fsensor_disable() + if (FSensorStateMenu==0) { fsensor_disable(); }else{ fsensor_enable(); } - FSensorStateMenu = !FSensorStateMenu; lcd_goto_menu(lcd_settings_menu, 7); } @@ -4078,11 +4078,26 @@ static void lcd_tune_menu() MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_colorprint_change);//7 #endif - if (SilentModeMenu == 0) { - MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set_tune); + if (FSensorStateMenu == 0) { + MENU_ITEM(function, MSG_FSENSOR_OFF, lcd_fsensor_state_set); } else { - MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set_tune); + MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set); } + + if (SilentModeMenu == 0) { + MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); + } else { + MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); + } + + if (SilentModeMenu == 0) { + if (CrashDetectMenu == 0) { + MENU_ITEM(function, MSG_CRASHDETECT_OFF, lcd_crash_mode_set); + } else { + MENU_ITEM(function, MSG_CRASHDETECT_ON, lcd_crash_mode_set); + } + } + END_MENU(); } From b475d11bdb578bd0e27d04d014bd3d5b6549ab05 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 26 Sep 2017 06:11:42 +0200 Subject: [PATCH 4/5] Maker Faire brainstorm 2.0 (2) Automatic recover after short power loss (according to heatbed temperature drop) Adjusted crashdetection - TMC2130_TCOOLTHRS_X and TMC2130_TCOOLTHRS_Y = 450 to be enabled at low speed !!!ALL FEATURES TESTED AT THIS POINT!!! --- Firmware/Configuration_prusa.h | 6 +++-- Firmware/Marlin.h | 1 - Firmware/Marlin_main.cpp | 48 +++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Firmware/Configuration_prusa.h b/Firmware/Configuration_prusa.h index 36de0d47..1b7b1439 100644 --- a/Firmware/Configuration_prusa.h +++ b/Firmware/Configuration_prusa.h @@ -140,8 +140,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o #define TMC2130_TPWMTHRS 0 // TPWMTHRS - Sets the switching speed threshold based on TSTEP from stealthChop to spreadCycle mode #define TMC2130_THIGH 0 // THIGH - unused -#define TMC2130_TCOOLTHRS_X 400 // TCOOLTHRS - coolstep treshold -#define TMC2130_TCOOLTHRS_Y 400 // TCOOLTHRS - coolstep treshold +#define TMC2130_TCOOLTHRS_X 450 // TCOOLTHRS - coolstep treshold +#define TMC2130_TCOOLTHRS_Y 450 // TCOOLTHRS - coolstep treshold #define TMC2130_TCOOLTHRS_Z 500 // TCOOLTHRS - coolstep treshold #define TMC2130_TCOOLTHRS_E 500 // TCOOLTHRS - coolstep treshold @@ -494,6 +494,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o // At 400 microsteps per mm, a full step lifts the Z axis by 0.04mm, and a stepper driver cycle is 0.16mm. // The following example, 12 * (4 * 16 / 400) = 12 * 0.16mm = 1.92mm. #define UVLO_Z_AXIS_SHIFT 1.92 +// If power panic occured, and the current temperature is higher then target temperature before interrupt minus this offset, print will be recovered automatically. +#define AUTOMATIC_UVLO_BED_TEMP_OFFSET 5 #define HEATBED_V2 diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 9f2b8dc9..8c964efe 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -370,7 +370,6 @@ void wait_for_heater(long codenum); void serialecho_temperatures(); void uvlo_(); -void recover_print(); void recover_print(uint8_t automatic); void setup_uvlo_interrupt(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 63d98e79..f1bf1f76 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1126,6 +1126,7 @@ void setup() // so the next time the firmware gets updated, it will know from which version it has been updated. update_current_firmware_version_to_eeprom(); if (eeprom_read_byte((uint8_t*)EEPROM_UVLO) == 1) { //previous print was terminated by UVLO +/* if (lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_RECOVER_PRINT, false)) recover_print(); else { eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0); @@ -1133,6 +1134,35 @@ void setup() lcd_update(2); lcd_setstatuspgm(WELCOME_MSG); } +*/ + manage_heater(); // Update temperatures +#ifdef DEBUG_UVLO_AUTOMATIC_RECOVER + MYSERIAL.println("Power panic detected!"); + MYSERIAL.print("Current bed temp:"); + MYSERIAL.println(degBed()); + MYSERIAL.print("Saved bed temp:"); + MYSERIAL.println((float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED)); +#endif + if ( degBed() > ( (float)eeprom_read_byte((uint8_t*)EEPROM_UVLO_TARGET_BED) - AUTOMATIC_UVLO_BED_TEMP_OFFSET) ){ + #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER + MYSERIAL.println("Automatic recovery!"); + #endif + recover_print(1); + } + else{ + #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER + MYSERIAL.println("Normal recovery!"); + #endif + if ( lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_RECOVER_PRINT, false) ) recover_print(0); + else { + eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0); + lcd_update_enable(true); + lcd_update(2); + lcd_setstatuspgm(WELCOME_MSG); + } + + } + } } @@ -7061,7 +7091,7 @@ ISR(INT4_vect) { if (IS_SD_PRINTING) uvlo_(); } -void recover_print() { +void recover_print(uint8_t automatic) { char cmd[30]; lcd_update_enable(true); lcd_update(2); @@ -7069,18 +7099,28 @@ void recover_print() { recover_machine_state_after_power_panic(); + // Set the target bed and nozzle temperatures. + sprintf_P(cmd, PSTR("M104 S%d"), target_temperature[active_extruder]); + enquecommand(cmd); + sprintf_P(cmd, PSTR("M140 S%d"), target_temperature_bed); + enquecommand(cmd); + // Lift the print head, so one may remove the excess priming material. if (current_position[Z_AXIS] < 25) enquecommand_P(PSTR("G1 Z25 F800")); // Home X and Y axes. Homing just X and Y shall not touch the babystep and the world2machine transformation status. enquecommand_P(PSTR("G28 X Y")); - // Set the target bed and nozzle temperatures. + // Set the target bed and nozzle temperatures and wait. sprintf_P(cmd, PSTR("M109 S%d"), target_temperature[active_extruder]); enquecommand(cmd); sprintf_P(cmd, PSTR("M190 S%d"), target_temperature_bed); enquecommand(cmd); enquecommand_P(PSTR("M83")); //E axis relative mode - enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure + //enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure + // If not automatically recoreverd (long power loss), extrude extra filament to stabilize + if(automatic == 0){ + enquecommand_P(PSTR("G1 E5 F120")); //Extrude some filament to stabilize pessure + } enquecommand_P(PSTR("G1 E" STRINGIFY(-DEFAULT_RETRACTION)" F480")); // Mark the power panic status as inactive. eeprom_update_byte((uint8_t*)EEPROM_UVLO, 0); @@ -7378,7 +7418,7 @@ void restore_print_from_ram_and_continue(float e_move) feedrate = saved_feedrate2; //restore feedrate float e = saved_pos[E_AXIS] - e_move; plan_set_e_position(e); - plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS]/10, active_extruder); + plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], homing_feedrate[Z_AXIS]/13, active_extruder); st_synchronize(); memcpy(current_position, saved_pos, sizeof(saved_pos)); memcpy(destination, current_position, sizeof(destination)); From 345fee66be29e385b7adc331e817c1dac6c46f6a Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Tue, 26 Sep 2017 07:20:54 +0200 Subject: [PATCH 5/5] Silent mode x-axis amplitude adjust from 200 to 210, because of layershift at high speed. --- Firmware/Configuration_prusa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Configuration_prusa.h b/Firmware/Configuration_prusa.h index 1b7b1439..c4001fd1 100644 --- a/Firmware/Configuration_prusa.h +++ b/Firmware/Configuration_prusa.h @@ -113,7 +113,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o #define TMC2130_INTPOL_E 1 // extrapolate 256 for E axis #define TMC2130_PWM_GRAD_X 4 // PWMCONF -#define TMC2130_PWM_AMPL_X 200 // PWMCONF +#define TMC2130_PWM_AMPL_X 210 // PWMCONF #define TMC2130_PWM_AUTO_X 1 // PWMCONF #define TMC2130_PWM_FREQ_X 2 // PWMCONF