diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 251991a2af..03ce3a578d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index abe82ff580..10ab593989 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -808,6 +808,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -849,6 +850,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -890,6 +895,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -975,6 +981,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1026,6 +1033,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 5f190ef266..f83057bed6 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -144,9 +144,10 @@ * 568 M906 E1 stepperE1 current (uint16_t) * 570 M906 E2 stepperE2 current (uint16_t) * 572 M906 E3 stepperE3 current (uint16_t) + * 572 M906 E4 stepperE4 current (uint16_t) * - * 574 Minimum end-point - * 1895 (574 + 36 + 9 + 288 + 988) Maximum end-point + * 576 Minimum end-point + * 1897 (576 + 36 + 9 + 288 + 988) Maximum end-point */ #include "Marlin.h" #include "language.h" @@ -520,7 +521,7 @@ void Config_Postprocess() { EEPROM_WRITE(val); #else val = 0; - for (uint8_t q = 0; q < 10; ++q) EEPROM_WRITE(val); + for (uint8_t q = 0; q < 11; ++q) EEPROM_WRITE(val); #endif if (!eeprom_write_error) { @@ -824,8 +825,12 @@ void Config_Postprocess() { #if ENABLED(E3_IS_TMC2130) stepperE3.setCurrent(val, R_SENSE, HOLD_MULTIPLIER); #endif + EEPROM_READ(val); + #if ENABLED(E4_IS_TMC2130) + stepperE4.setCurrent(val, R_SENSE, HOLD_MULTIPLIER); + #endif #else - for (uint8_t q = 0; q < 10; q++) EEPROM_READ(val); + for (uint8_t q = 0; q < 11; q++) EEPROM_READ(val); #endif if (eeprom_checksum == stored_checksum) { diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 4f451dff86..ff2113c989 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -143,7 +143,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 3 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 00bdd9588c..0e09f7364f 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 95a8da48a6..dc3c07d4ae 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index aa4dbf09e7..79dec2c4b8 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index b01a1c1440..aa0af7f488 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 2 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index a3a89535a1..973ff06eec 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -145,7 +145,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index fe71096ec9..8adcf2d901 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index cb7166891a..e37b7b5c07 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -142,7 +142,7 @@ #define MACHINE_UUID "8d083632-40c5-4649-85b8-43d9ae6c5d55" // BQ Hephestos 2 standard config // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index bfdc956197..27fc54b609 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -789,6 +789,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -830,6 +831,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -871,6 +876,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -956,6 +962,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1007,6 +1014,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 6c91924e15..031b50989c 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -162,7 +162,7 @@ #endif // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index e1dc03cf5f..9466c1f096 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -818,6 +818,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -859,6 +860,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -900,6 +905,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -985,6 +991,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1036,6 +1043,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index ee7c8c3f72..43a5259873 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index 19ccbcaddf..03051ee8c9 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index ef7606ebc4..4637625aa0 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 2 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 7ab7f01269..ea487e811e 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 642a7c6e6c..e87929b6f2 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -145,7 +145,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Single extruder. Set to 2 for dual extruders // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index e6031e329d..eee3019fb0 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index d36c0b53a9..04b5ac7a20 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -174,7 +174,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index ca0052dcc7..f659231cbc 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index a6499369d8..654e362a15 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index db1b995dc0..4a43e23156 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -813,6 +813,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -854,6 +855,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -895,6 +900,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -980,6 +986,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1031,6 +1038,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index e5b2ab3a59..00478c9159 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -164,7 +164,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical @@ -988,13 +988,6 @@ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif - #endif // BED_LEVELING /** diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 986a42f051..05b280fdb5 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -789,6 +789,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -830,6 +831,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -871,6 +876,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -956,6 +962,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1007,6 +1014,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 1e7902b573..7fda8247ef 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -145,7 +145,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index fe71096ec9..8adcf2d901 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 30b7a5dd54..bf8c9863cb 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h index addc89a7cb..b83ee78332 100644 --- a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 39957c1ac9..f8970faaa4 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 9238f00030..65b82c25c7 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -427,6 +427,24 @@ /* actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS */ #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} // AZTEEG_X3_PRO +//=========================================================================== +//============================== Delta Settings ============================= +//=========================================================================== + +#if ENABLED(DELTA_AUTO_CALIBRATION) + /** + * Set the height short (H-10) with M665 Hx.xx. + * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx. + * Run G33 Cx V3 with different values (C2, C-2). + * Take the average for R_FACTOR and maximum for H_FACTOR. + * If R_FACTOR is too low accuracy is reduced. Too high reduces iteration speed. + * Run the tests with default values!!! + */ + //#define DELTA_CALIBRATE_EXPERT_MODE + //#define H_FACTOR 1.02 // 1.0 < H_FACTOR < 1.11, default 1.00 + //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25 +#endif + //=========================================================================== //=============================Additional Features=========================== //=========================================================================== @@ -807,6 +825,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -848,6 +867,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -889,6 +912,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -974,6 +998,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1025,6 +1050,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index faaa5c12c4..b8633ae895 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 9238f00030..65b82c25c7 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -427,6 +427,24 @@ /* actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS */ #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} // AZTEEG_X3_PRO +//=========================================================================== +//============================== Delta Settings ============================= +//=========================================================================== + +#if ENABLED(DELTA_AUTO_CALIBRATION) + /** + * Set the height short (H-10) with M665 Hx.xx. + * Set the delta_radius offset (R-5, R-10, R+5, R+10) with M665 Rx.xx. + * Run G33 Cx V3 with different values (C2, C-2). + * Take the average for R_FACTOR and maximum for H_FACTOR. + * If R_FACTOR is too low accuracy is reduced. Too high reduces iteration speed. + * Run the tests with default values!!! + */ + //#define DELTA_CALIBRATE_EXPERT_MODE + //#define H_FACTOR 1.02 // 1.0 < H_FACTOR < 1.11, default 1.00 + //#define R_FACTOR -3.95 // -6.7 < R_FACTOR < -2.25, default -2.25 +#endif + //=========================================================================== //=============================Additional Features=========================== //=========================================================================== @@ -807,6 +825,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -848,6 +867,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -889,6 +912,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -974,6 +998,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1025,6 +1050,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 83d21af57b..24c795cf9b 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -146,7 +146,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 493a5991f6..436b52bb9c 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -812,6 +812,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -853,6 +854,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -894,6 +899,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -979,6 +985,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1030,6 +1037,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 7152cdc95b..f515fb98ba 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 321dc1b43b..ddd265ea00 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -807,6 +807,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -848,6 +849,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -889,6 +894,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -974,6 +980,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1025,6 +1032,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 942949eb59..84bc07b4eb 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 9a8be713cd..f306dfe931 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 06ede26576..0c2bfeffd7 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -142,7 +142,7 @@ //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" // This defines the number of extruders -// :[1, 2, 3, 4] +// :[1, 2, 3, 4, 5] #define EXTRUDERS 1 // Enable if your E steppers or extruder gear ratios are not identical diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index e4699e4388..3508f97c6e 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -805,6 +805,7 @@ //#define E1_IS_TMC //#define E2_IS_TMC //#define E3_IS_TMC + //#define E4_IS_TMC #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -846,6 +847,10 @@ #define E3_SENSE_RESISTOR 91 #define E3_MICROSTEPS 16 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif // @section TMC2130 @@ -887,6 +892,7 @@ //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 + //#define E4_IS_TMC2130 /** * Stepper driver settings @@ -972,6 +978,7 @@ //#define E1_IS_L6470 //#define E2_IS_L6470 //#define E3_IS_L6470 + //#define E4_IS_L6470 #define X_MICROSTEPS 16 // number of microsteps #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high @@ -1023,6 +1030,11 @@ #define E3_OVERCURRENT 2000 #define E3_STALLCURRENT 1500 + #define E4_MICROSTEPS 16 + #define E4_K_VAL 50 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #endif /** diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 1ee83c423f..bf10b85439 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("E2 trangos/mm") #define MSG_E3STEPS _UxGT("E3 trangos/mm") #define MSG_E4STEPS _UxGT("E4 trangos/mm") +#define MSG_E5STEPS _UxGT("E5 trangos/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimiento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_bg.h b/Marlin/language_bg.h index 2349610f1b..4c6db482da 100644 --- a/Marlin/language_bg.h +++ b/Marlin/language_bg.h @@ -113,6 +113,7 @@ #define MSG_E2STEPS _UxGT("E2 стъпки/mm") #define MSG_E3STEPS _UxGT("E3 стъпки/mm") #define MSG_E4STEPS _UxGT("E4 стъпки/mm") +#define MSG_E5STEPS _UxGT("E5 стъпки/mm") #define MSG_TEMPERATURE _UxGT("Температура") #define MSG_MOTION _UxGT("Движение") #define MSG_VOLUMETRIC _UxGT("Нишка") diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index 796f2a7daa..699706f481 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -117,6 +117,7 @@ #define MSG_E2STEPS _UxGT("E2passos/mm") #define MSG_E3STEPS _UxGT("E3passos/mm") #define MSG_E4STEPS _UxGT("E4passos/mm") +#define MSG_E5STEPS _UxGT("E5passos/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Moviment") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h index 2ef90b7d71..d1b59e8201 100644 --- a/Marlin/language_cn.h +++ b/Marlin/language_cn.h @@ -105,6 +105,7 @@ #define MSG_E2STEPS "E2steps/mm" #define MSG_E3STEPS "E3steps/mm" #define MSG_E4STEPS "E4steps/mm" +#define MSG_E5STEPS "E5steps/mm" #define MSG_TEMPERATURE "\xc9\xd2" #define MSG_MOTION "\xdf\xb2" #define MSG_VOLUMETRIC "Filament" diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index d53ff6dda0..77f9ac21d4 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -116,6 +116,7 @@ #define MSG_E2STEPS _UxGT("E2kroku/mm") #define MSG_E3STEPS _UxGT("E3kroku/mm") #define MSG_E4STEPS _UxGT("E4kroku/mm") +#define MSG_E5STEPS _UxGT("E5kroku/mm") #define MSG_TEMPERATURE _UxGT("Teplota") #define MSG_MOTION _UxGT("Pohyb") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_da.h b/Marlin/language_da.h index 9a963455c0..abe1a775e1 100644 --- a/Marlin/language_da.h +++ b/Marlin/language_da.h @@ -114,6 +114,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") #define MSG_E3STEPS _UxGT("E3steps/mm") #define MSG_E4STEPS _UxGT("E4steps/mm") +#define MSG_E5STEPS _UxGT("E5steps/mm") #define MSG_TEMPERATURE _UxGT("Temperatur") #define MSG_MOTION _UxGT("Bevægelse") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 8a61bb1639..b0b50c2ae9 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -118,6 +118,7 @@ #define MSG_E2STEPS _UxGT("E2 Steps/mm") #define MSG_E3STEPS _UxGT("E3 Steps/mm") #define MSG_E4STEPS _UxGT("E4 Steps/mm") +#define MSG_E5STEPS _UxGT("E5 Steps/mm") #define MSG_TEMPERATURE _UxGT("Temperatur") #define MSG_MOTION _UxGT("Bewegung") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_el-gr.h b/Marlin/language_el-gr.h index 273a07a1d7..2a82988525 100644 --- a/Marlin/language_el-gr.h +++ b/Marlin/language_el-gr.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("Bήματα Ε2 ανά μμ") #define MSG_E3STEPS _UxGT("Bήματα Ε3 ανά μμ") #define MSG_E4STEPS _UxGT("Bήματα Ε4 ανά μμ") +#define MSG_E5STEPS _UxGT("Bήματα Ε5 ανά μμ") #define MSG_TEMPERATURE _UxGT("Θερμοκρασία") #define MSG_MOTION _UxGT("Κίνηση") #define MSG_VOLUMETRIC _UxGT("Νήμα") diff --git a/Marlin/language_el.h b/Marlin/language_el.h index 3f99b2b835..832b4c6c76 100644 --- a/Marlin/language_el.h +++ b/Marlin/language_el.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("Bήματα Ε2 ανά μμ") #define MSG_E3STEPS _UxGT("Bήματα Ε3 ανά μμ") #define MSG_E4STEPS _UxGT("Bήματα Ε4 ανά μμ") +#define MSG_E5STEPS _UxGT("Bήματα Ε5 ανά μμ") #define MSG_TEMPERATURE _UxGT("Θερμοκρασία") #define MSG_MOTION _UxGT("Κίνηση") #define MSG_VOLUMETRIC _UxGT("Νήμα") diff --git a/Marlin/language_en.h b/Marlin/language_en.h index b0ad5c986c..cf03226638 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -291,6 +291,9 @@ #ifndef MSG_E4STEPS #define MSG_E4STEPS _UxGT("E4steps/mm") #endif +#ifndef MSG_E5STEPS + #define MSG_E5STEPS _UxGT("E5steps/mm") +#endif #ifndef MSG_TEMPERATURE #define MSG_TEMPERATURE _UxGT("Temperature") #endif diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 0da06d43b7..7c4da00c7a 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -116,6 +116,7 @@ #define MSG_E2STEPS _UxGT("E2 pasos/mm") #define MSG_E3STEPS _UxGT("E3 pasos/mm") #define MSG_E4STEPS _UxGT("E4 pasos/mm") +#define MSG_E5STEPS _UxGT("E5 pasos/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimiento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index a83edb7006..9c9cd0eca9 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -103,6 +103,7 @@ #define MSG_E2STEPS _UxGT("E2 pausoak/mm") #define MSG_E3STEPS _UxGT("E3 pausoak/mm") #define MSG_E4STEPS _UxGT("E4 pausoak/mm") +#define MSG_E5STEPS _UxGT("E5 pausoak/mm") #define MSG_TEMPERATURE _UxGT("Tenperatura") #define MSG_MOTION _UxGT("Mugimendua") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 8072a8afee..f604752a6a 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -104,6 +104,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") #define MSG_E3STEPS _UxGT("E3steps/mm") #define MSG_E4STEPS _UxGT("E4steps/mm") +#define MSG_E5STEPS _UxGT("E5steps/mm") #define MSG_TEMPERATURE _UxGT("Lämpötila") #define MSG_MOTION _UxGT("Liike") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index c4e1b6e668..c58d43943d 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -117,6 +117,7 @@ #define MSG_E2STEPS _UxGT("E2pas/mm") #define MSG_E3STEPS _UxGT("E3pas/mm") #define MSG_E4STEPS _UxGT("E4pas/mm") +#define MSG_E5STEPS _UxGT("E5pas/mm") #define MSG_TEMPERATURE _UxGT("Tempzrature") #define MSG_MOTION _UxGT("Mouvement") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_gl.h b/Marlin/language_gl.h index 442af39ff4..f1a69aee43 100644 --- a/Marlin/language_gl.h +++ b/Marlin/language_gl.h @@ -113,6 +113,7 @@ #define MSG_E2STEPS _UxGT("E2pasos/mm") #define MSG_E3STEPS _UxGT("E3pasos/mm") #define MSG_E4STEPS _UxGT("E4pasos/mm") +#define MSG_E5STEPS _UxGT("E5pasos/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movemento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h index 3a326793d8..4f7eac9d7d 100644 --- a/Marlin/language_hr.h +++ b/Marlin/language_hr.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") #define MSG_E3STEPS _UxGT("E3steps/mm") #define MSG_E4STEPS _UxGT("E4steps/mm") +#define MSG_E5STEPS _UxGT("E5steps/mm") #define MSG_TEMPERATURE _UxGT("Temperature") #define MSG_MOTION _UxGT("Gibanje") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_it.h b/Marlin/language_it.h index fe1608e7eb..70016cce68 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -120,6 +120,7 @@ #define MSG_E2STEPS _UxGT("E2passi/mm") #define MSG_E3STEPS _UxGT("E3passi/mm") #define MSG_E4STEPS _UxGT("E4passi/mm") +#define MSG_E5STEPS _UxGT("E5passi/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h index 7925adbd02..2752ca5b46 100644 --- a/Marlin/language_kana.h +++ b/Marlin/language_kana.h @@ -137,6 +137,7 @@ #define MSG_E2STEPS "E2steps/mm" #define MSG_E3STEPS "E3steps/mm" #define MSG_E4STEPS "E4steps/mm" + #define MSG_E5STEPS "E5steps/mm" #else #define MSG_XSTEPS "Xsteps" #define MSG_YSTEPS "Ysteps" @@ -146,6 +147,7 @@ #define MSG_E2STEPS "E2steps" #define MSG_E3STEPS "E3steps" #define MSG_E4STEPS "E4steps" + #define MSG_E5STEPS "E5steps" #endif #define MSG_TEMPERATURE "\xb5\xdd\xc4\xde" // "オンド" ("Temperature") #define MSG_MOTION "\xb3\xba\xde\xb7\xbe\xaf\xc3\xb2" // "ウゴキセッテイ" ("Motion") diff --git a/Marlin/language_kana_utf8.h b/Marlin/language_kana_utf8.h index 48ffa37385..a21b1e3a76 100644 --- a/Marlin/language_kana_utf8.h +++ b/Marlin/language_kana_utf8.h @@ -122,6 +122,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") #define MSG_E3STEPS _UxGT("E3steps/mm") #define MSG_E4STEPS _UxGT("E4steps/mm") +#define MSG_E5STEPS _UxGT("E5steps/mm") #define MSG_TEMPERATURE _UxGT("オンド") // "Temperature" #define MSG_MOTION _UxGT("ウゴキセッテイ") // "Motion" #define MSG_VOLUMETRIC _UxGT("フィラメント") // "Filament" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 33d3855041..c75145b9be 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") #define MSG_E3STEPS _UxGT("E3steps/mm") #define MSG_E4STEPS _UxGT("E4steps/mm") +#define MSG_E5STEPS _UxGT("E5steps/mm") #define MSG_TEMPERATURE _UxGT("Temperatuur") #define MSG_MOTION _UxGT("Beweging") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index dc08e10e26..49b53b005e 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -112,6 +112,7 @@ #define MSG_E2STEPS _UxGT("krokiE2/mm") #define MSG_E3STEPS _UxGT("krokiE3/mm") #define MSG_E4STEPS _UxGT("krokiE4/mm") +#define MSG_E5STEPS _UxGT("krokiE5/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Ruch") #define MSG_VOLUMETRIC _UxGT("Filament") diff --git a/Marlin/language_pt-br.h b/Marlin/language_pt-br.h index b6a0778a6c..e1d0ed4b1b 100644 --- a/Marlin/language_pt-br.h +++ b/Marlin/language_pt-br.h @@ -105,6 +105,7 @@ #define MSG_E2STEPS "E2/mm" #define MSG_E3STEPS "E3/mm" #define MSG_E4STEPS "E4/mm" +#define MSG_E5STEPS "E5/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" #define MSG_VOLUMETRIC "Filamento" diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h index ece1ff84a1..2b34886a01 100644 --- a/Marlin/language_pt-br_utf8.h +++ b/Marlin/language_pt-br_utf8.h @@ -105,6 +105,7 @@ #define MSG_E2STEPS _UxGT("E2/mm") #define MSG_E3STEPS _UxGT("E3/mm") #define MSG_E4STEPS _UxGT("E4/mm") +#define MSG_E5STEPS _UxGT("E5/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 16a2cb9458..2682da58ec 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -109,6 +109,7 @@ #define MSG_E2STEPS "E2 passo/mm" #define MSG_E3STEPS "E3 passo/mm" #define MSG_E4STEPS "E4 passo/mm" +#define MSG_E5STEPS "E5 passo/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" #define MSG_VOLUMETRIC "Filamento" diff --git a/Marlin/language_pt_utf8.h b/Marlin/language_pt_utf8.h index 84f95188a8..e2aedb50d0 100644 --- a/Marlin/language_pt_utf8.h +++ b/Marlin/language_pt_utf8.h @@ -109,6 +109,7 @@ #define MSG_E2STEPS _UxGT("E2 passo/mm") #define MSG_E3STEPS _UxGT("E3 passo/mm") #define MSG_E4STEPS _UxGT("E4 passo/mm") +#define MSG_E5STEPS _UxGT("E5 passo/mm") #define MSG_TEMPERATURE _UxGT("Temperatura") #define MSG_MOTION _UxGT("Movimento") #define MSG_VOLUMETRIC _UxGT("Filamento") diff --git a/Marlin/language_tr.h b/Marlin/language_tr.h index d007a0afb2..095eedd9dc 100644 --- a/Marlin/language_tr.h +++ b/Marlin/language_tr.h @@ -117,6 +117,7 @@ #define MSG_E2STEPS _UxGT("E2steps/mm") // E2steps/mm #define MSG_E3STEPS _UxGT("E3steps/mm") // E3steps/mm #define MSG_E4STEPS _UxGT("E4steps/mm") // E4steps/mm +#define MSG_E5STEPS _UxGT("E5steps/mm") // E4steps/mm #define MSG_TEMPERATURE _UxGT("Sıcaklık") // Sıcaklık #define MSG_MOTION _UxGT("Hareket") // Hareket #define MSG_VOLUMETRIC _UxGT("Filaman") // Filaman diff --git a/Marlin/language_uk.h b/Marlin/language_uk.h index 4279edc8f0..f36a366fee 100644 --- a/Marlin/language_uk.h +++ b/Marlin/language_uk.h @@ -113,6 +113,7 @@ #define MSG_E2STEPS _UxGT("E2кроків/мм") #define MSG_E3STEPS _UxGT("E3кроків/мм") #define MSG_E4STEPS _UxGT("E4кроків/мм") +#define MSG_E5STEPS _UxGT("E5кроків/мм") #define MSG_TEMPERATURE _UxGT("Температура") #define MSG_MOTION _UxGT("Рух") #define MSG_VOLUMETRIC _UxGT("Волокно") diff --git a/Marlin/pinsDebug_list.h b/Marlin/pinsDebug_list.h index 9ce20fb130..54b7ae5d7d 100644 --- a/Marlin/pinsDebug_list.h +++ b/Marlin/pinsDebug_list.h @@ -212,6 +212,9 @@ #if PIN_EXISTS(E3_STEP) REPORT_NAME_DIGITAL(E3_STEP_PIN, __LINE__ ) #endif +#if PIN_EXISTS(E4_AUTO_FAN) + REPORT_NAME_DIGITAL(E4_AUTO_FAN_PIN, __LINE__ ) +#endif #if PIN_EXISTS(E4_DIR) REPORT_NAME_DIGITAL(E4_DIR_PIN, __LINE__ ) #endif @@ -434,6 +437,9 @@ #if PIN_EXISTS(ORIG_E3_AUTO_FAN) REPORT_NAME_DIGITAL(ORIG_E3_AUTO_FAN_PIN, __LINE__ ) #endif +#if PIN_EXISTS(ORIG_E4_AUTO_FAN) + REPORT_NAME_DIGITAL(ORIG_E4_AUTO_FAN_PIN, __LINE__ ) +#endif #if PIN_EXISTS(PHOTOGRAPH) REPORT_NAME_DIGITAL(PHOTOGRAPH_PIN, __LINE__ ) #endif diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index cf7d1c23aa..4627017950 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -931,6 +931,9 @@ void Stepper::init() { #if HAS_E3_DIR E3_DIR_INIT; #endif + #if HAS_E4_DIR + E4_DIR_INIT; + #endif // Init Enable Pins - steppers default to disabled. #if HAS_X_ENABLE @@ -973,6 +976,10 @@ void Stepper::init() { E3_ENABLE_INIT; if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH); #endif + #if HAS_E4_ENABLE + E4_ENABLE_INIT; + if (!E_ENABLE_ON) E4_ENABLE_WRITE(HIGH); + #endif // Init endstops and pullups endstops.init(); diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp index 930b2752d4..4e072dff2e 100644 --- a/Marlin/stepper_indirection.cpp +++ b/Marlin/stepper_indirection.cpp @@ -75,6 +75,9 @@ #if ENABLED(E3_IS_TMC) _TMC_DEFINE(E3); #endif + #if ENABLED(E4_IS_TMC) + _TMC_DEFINE(E4); + #endif #define _TMC_INIT(A) do{ \ stepper##A.setMicrosteps(A##_MICROSTEPS); \ @@ -112,6 +115,9 @@ #if ENABLED(E3_IS_TMC) _TMC_INIT(E3); #endif + #if ENABLED(E4_IS_TMC) + _TMC_INIT(E4); + #endif } #endif // HAVE_TMCDRIVER @@ -157,6 +163,9 @@ #if ENABLED(E3_IS_TMC2130) _TMC2130_DEFINE(E3); #endif + #if ENABLED(E4_IS_TMC2130) + _TMC2130_DEFINE(E4); + #endif // Use internal reference voltage for current calculations. This is the default. // Following values from Trinamic's spreadsheet with values for a NEMA17 (42BYGHW609) @@ -213,6 +222,9 @@ #if ENABLED(E3_IS_TMC2130) _TMC2130_INIT(E3); #endif + #if ENABLED(E4_IS_TMC2130) + _TMC2130_INIT(E4); + #endif TMC2130_ADV() } @@ -260,6 +272,9 @@ #if ENABLED(E3_IS_L6470) _L6470_DEFINE(E3); #endif + #if ENABLED(E4_IS_L6470) + _L6470_DEFINE(E4); + #endif #define _L6470_INIT(A) do{ \ stepper##A.init(A##_K_VAL); \ @@ -300,6 +315,9 @@ #if ENABLED(E3_IS_L6470) _L6470_INIT(E3); #endif + #if ENABLED(E4_IS_L6470) + _L6470_INIT(E4); + #endif } #endif // HAVE_L6470DRIVER diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 22056072cd..79a8da4f63 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -381,6 +381,37 @@ #define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE) #define E3_STEP_READ READ(E3_STEP_PIN) +// E4 Stepper +#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E4_IS_L6470) + extern L6470 stepperE4; + #define E4_ENABLE_INIT NOOP + #define E4_ENABLE_WRITE(STATE) do{ if (STATE) stepperE4.Step_Clock(stepperE4.getStatus() & STATUS_HIZ); else stepperE4.softFree(); }while(0) + #define E4_ENABLE_READ (stepperE4.getStatus() & STATUS_HIZ) + #define E4_DIR_INIT NOOP + #define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE) + #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) +#else + #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E4_IS_TMC) + extern TMC26XStepper stepperE4; + #define E4_ENABLE_INIT NOOP + #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) + #define E4_ENABLE_READ stepperE4.isEnabled() + #else + #if ENABLED(HAVE_TMC2130) && ENABLED(E4_IS_TMC2130) + extern TMC2130Stepper stepperE4; + #endif + #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) + #define E4_ENABLE_WRITE(STATE) WRITE(E4_ENABLE_PIN,STATE) + #define E4_ENABLE_READ READ(E4_ENABLE_PIN) + #endif + #define E4_DIR_INIT SET_OUTPUT(E4_DIR_PIN) + #define E4_DIR_WRITE(STATE) WRITE(E4_DIR_PIN,STATE) + #define E4_DIR_READ READ(E4_DIR_PIN) +#endif +#define E4_STEP_INIT SET_OUTPUT(E4_STEP_PIN) +#define E4_STEP_WRITE(STATE) WRITE(E4_STEP_PIN,STATE) +#define E4_STEP_READ READ(E4_STEP_PIN) + /** * Extruder indirection for the single E axis */ diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 0bf8e31415..e9c8700b94 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -918,39 +918,26 @@ void kill_screen(const char* lcd_msg) { /** * Watch temperature callbacks */ - #if WATCH_HOTENDS - #if HAS_TEMP_HOTEND - void watch_temp_callback_E0() { thermalManager.start_watching_heater(0); } - #if HOTENDS > 1 - void watch_temp_callback_E1() { thermalManager.start_watching_heater(1); } - #if HOTENDS > 2 - void watch_temp_callback_E2() { thermalManager.start_watching_heater(2); } - #if HOTENDS > 3 - void watch_temp_callback_E3() { thermalManager.start_watching_heater(3); } - #if HOTENDS > 4 - void watch_temp_callback_E4() { thermalManager.start_watching_heater(4); } - #endif // HOTENDS > 4 - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 + #if HAS_TEMP_HOTEND + #if WATCH_HOTENDS + #define _WATCH_FUNC(N) thermalManager.start_watching_heater(N) + #else + #define _WATCH_FUNC(N) NOOP #endif - #else - #if HAS_TEMP_HOTEND - void watch_temp_callback_E0() {} - #if HOTENDS > 1 - void watch_temp_callback_E1() {} - #if HOTENDS > 2 - void watch_temp_callback_E2() {} - #if HOTENDS > 3 - void watch_temp_callback_E3() {} - #if HOTENDS > 4 - void watch_temp_callback_E4() {} - #endif // HOTENDS > 4 - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - #endif - #endif + void watch_temp_callback_E0() { _WATCH_FUNC(0); } + #if HOTENDS > 1 + void watch_temp_callback_E1() { _WATCH_FUNC(1); } + #if HOTENDS > 2 + void watch_temp_callback_E2() { _WATCH_FUNC(2); } + #if HOTENDS > 3 + void watch_temp_callback_E3() { _WATCH_FUNC(3); } + #if HOTENDS > 4 + void watch_temp_callback_E4() { _WATCH_FUNC(4); } + #endif // HOTENDS > 4 + #endif // HOTENDS > 3 + #endif // HOTENDS > 2 + #endif // HOTENDS > 1 + #endif // HAS_TEMP_HOTEND #if WATCH_THE_BED void watch_temp_callback_bed() { thermalManager.start_watching_bed(); } @@ -1905,10 +1892,13 @@ void kill_screen(const char* lcd_msg) { case 2: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E3); break; #if E_MANUAL > 3 case 3: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E4); break; - #endif - #endif + #if E_MANUAL > 4 + case 4: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E5); break; + #endif // E_MANUAL > 4 + #endif // E_MANUAL > 3 + #endif // E_MANUAL > 2 } - #endif + #endif // E_MANUAL > 1 lcd_implementation_drawedit(pos_label, ftostr41sign(current_position[E_AXIS])); } } @@ -1921,9 +1911,12 @@ void kill_screen(const char* lcd_msg) { void lcd_move_e2() { _lcd_move_e(2); } #if E_MANUAL > 3 void lcd_move_e3() { _lcd_move_e(3); } - #endif - #endif - #endif + #if E_MANUAL > 4 + void lcd_move_e4() { _lcd_move_e(4); } + #endif // E_MANUAL > 4 + #endif // E_MANUAL > 3 + #endif // E_MANUAL > 2 + #endif // E_MANUAL > 1 /** * @@ -1970,9 +1963,12 @@ void kill_screen(const char* lcd_msg) { void lcd_move_get_e2_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e2); } #if E_MANUAL > 3 void lcd_move_get_e3_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e3); } - #endif - #endif - #endif + #if E_MANUAL > 4 + void lcd_move_get_e4_amount() { _lcd_move_distance_menu(E_AXIS, lcd_move_e4); } + #endif // E_MANUAL > 4 + #endif // E_MANUAL > 3 + #endif // E_MANUAL > 2 + #endif // E_MANUAL > 1 /** * @@ -2033,9 +2029,12 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_get_e2_amount); #if E_MANUAL > 3 MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E4, lcd_move_get_e3_amount); - #endif - #endif - #endif + #if E_MANUAL > 4 + MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E5, lcd_move_get_e4_amount); + #endif // E_MANUAL > 4 + #endif // E_MANUAL > 3 + #endif // E_MANUAL > 2 + #endif // E_MANUAL > 1 END_MENU(); } @@ -2239,6 +2238,7 @@ void kill_screen(const char* lcd_msg) { // PID-P E2, PID-I E2, PID-D E2, PID-C E2, PID Autotune E2 // PID-P E3, PID-I E3, PID-D E3, PID-C E3, PID Autotune E3 // PID-P E4, PID-I E4, PID-D E4, PID-C E4, PID Autotune E4 + // PID-P E5, PID-I E5, PID-D E5, PID-C E5, PID Autotune E5 // #if ENABLED(PIDTEMP) @@ -2350,8 +2350,11 @@ void kill_screen(const char* lcd_msg) { void _reset_e2_acceleration_rate() { _reset_e_acceleration_rate(2); } #if E_STEPPERS > 3 void _reset_e3_acceleration_rate() { _reset_e_acceleration_rate(3); } - #endif - #endif + #if E_STEPPERS > 4 + void _reset_e4_acceleration_rate() { _reset_e_acceleration_rate(4); } + #endif // E_STEPPERS > 4 + #endif // E_STEPPERS > 3 + #endif // E_STEPPERS > 2 #endif void _planner_refresh_positioning() { planner.refresh_positioning(); } @@ -2368,8 +2371,11 @@ void kill_screen(const char* lcd_msg) { void _planner_refresh_e2_positioning() { _reset_e_acceleration_rate(2); } #if E_STEPPERS > 3 void _planner_refresh_e3_positioning() { _reset_e_acceleration_rate(3); } - #endif - #endif + #if E_STEPPERS > 4 + void _planner_refresh_e4_positioning() { _reset_e_acceleration_rate(4); } + #endif // E_STEPPERS > 4 + #endif // E_STEPPERS > 3 + #endif // E_STEPPERS > 2 #endif /** @@ -2411,9 +2417,12 @@ void kill_screen(const char* lcd_msg) { #if E_STEPPERS > 2 MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.max_feedrate_mm_s[E_AXIS + 2], 1, 999); #if E_STEPPERS > 3 - MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.max_feedrate_mm_s[E_AXIS + 3], 1, 999); - #endif - #endif + MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E4, &planner.max_feedrate_mm_s[E_AXIS + 3], 1, 999); + #if E_STEPPERS > 4 + MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E5, &planner.max_feedrate_mm_s[E_AXIS + 4], 1, 999); + #endif // E_STEPPERS > 4 + #endif // E_STEPPERS > 3 + #endif // E_STEPPERS > 2 #else MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999); #endif @@ -2436,8 +2445,11 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E3, &planner.max_acceleration_mm_per_s2[E_AXIS + 2], 100, 99000, _reset_e2_acceleration_rate); #if E_STEPPERS > 3 MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E4, &planner.max_acceleration_mm_per_s2[E_AXIS + 3], 100, 99000, _reset_e3_acceleration_rate); - #endif - #endif + #if E_STEPPERS > 4 + MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E5, &planner.max_acceleration_mm_per_s2[E_AXIS + 4], 100, 99000, _reset_e4_acceleration_rate); + #endif // E_STEPPERS > 4 + #endif // E_STEPPERS > 3 + #endif // E_STEPPERS > 2 #else MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates); #endif @@ -2460,8 +2472,11 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM_EDIT_CALLBACK(float62, MSG_E3STEPS, &planner.axis_steps_per_mm[E_AXIS + 2], 5, 9999, _planner_refresh_e2_positioning); #if E_STEPPERS > 3 MENU_ITEM_EDIT_CALLBACK(float62, MSG_E4STEPS, &planner.axis_steps_per_mm[E_AXIS + 3], 5, 9999, _planner_refresh_e3_positioning); - #endif - #endif + #if E_STEPPERS > 4 + MENU_ITEM_EDIT_CALLBACK(float62, MSG_E5STEPS, &planner.axis_steps_per_mm[E_AXIS + 4], 5, 9999, _planner_refresh_e4_positioning); + #endif // E_STEPPERS > 4 + #endif // E_STEPPERS > 3 + #endif // E_STEPPERS > 2 #else MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); #endif