diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 51af621f95..0ceef8b393 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1947,9 +1947,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 3aaff5fe23..a0bb172cf4 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index a8a248a862..99250cc4dc 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -1966,9 +1966,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 4be1966c80..11aa98ac05 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index f7c01a3b22..60d0f11652 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -2101,9 +2101,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 843dfcc0a7..a2483b6879 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1955,9 +1955,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index 546da031e9..84f8ba7bbe 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -1966,9 +1966,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 690a051230..9569815c4a 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -1920,9 +1920,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 075abee0ca..c6b7922222 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -1920,9 +1920,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index b82f5433f8..36b1ea50a5 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -1934,9 +1934,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 651c337f84..d687a298e7 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index e3c3c2d027..604890fa7a 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -1934,9 +1934,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 30195cfc28..5dcefaef91 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -1945,9 +1945,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index f2af5c0a88..af931b3647 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1956,9 +1956,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index a025b4ea81..cddc06f2af 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -1951,9 +1951,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h index 6643861316..f654ab0e03 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h @@ -1965,9 +1965,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h index 90f42f48a3..db0b62e174 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h @@ -1956,9 +1956,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h index 36198868c6..e7c1303f85 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h @@ -1950,9 +1950,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h index 760d5ce5c2..da1db3f10f 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h @@ -1950,9 +1950,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h index 084c82ccae..4561497df8 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h @@ -1956,9 +1956,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Einstart-S/Configuration.h b/Marlin/src/config/examples/Einstart-S/Configuration.h index 896e4a108a..59bf8a4a60 100644 --- a/Marlin/src/config/examples/Einstart-S/Configuration.h +++ b/Marlin/src/config/examples/Einstart-S/Configuration.h @@ -1935,9 +1935,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index 70dea0836a..8b0b40229b 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -1928,9 +1928,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 3d02326ba1..45e9084c58 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -1928,9 +1928,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index b4bc4d8753..db7112ba3d 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1952,9 +1952,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 500, 500 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter #define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index a12c6a3ae9..3dc6dfe1e9 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1961,9 +1961,7 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE /** @@ -1975,4 +1973,7 @@ #define LCD_WIDTH_OVERRIDE 20 // Default is 22. For this Geeetech use 20. #endif +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 9822d0ad7f..3bacd21a6d 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 54b3aea36c..b9a5d72dc0 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1962,9 +1962,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 221f7d0858..3de17cd1bb 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1961,9 +1961,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 661db6fd0f..6f44657a8c 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index bd6ad10ed1..db2df210e5 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 5449e5c708..ba8af95927 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1950,9 +1950,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index 10a758c382..1f5f9d48a8 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1957,9 +1957,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index 6a8fe2dc4d..b5267e8745 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -1966,9 +1966,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 33e604a546..9fb4863de9 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -1948,9 +1948,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index 749a09054f..1505df13b8 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -1945,9 +1945,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 5cbe0e1c33..1857b6daa5 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -1950,9 +1950,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index ec042aecd4..5e59c01c9b 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -1950,9 +1950,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index a2c870641d..52c3a270de 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h index df24fe6a0e..b3c5759170 100644 --- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h +++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h @@ -1995,9 +1995,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 56766b7034..a3233d5add 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 3c07df0359..5ae32c6431 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 33369c0300..3c87f55d89 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1959,9 +1959,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index 629adc0a76..0c45dd68b3 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1948,9 +1948,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h index 8ef33bb741..034044a696 100644 --- a/Marlin/src/config/examples/STM32F4/Configuration.h +++ b/Marlin/src/config/examples/STM32F4/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index ae313566c0..92c0fe42de 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1977,9 +1977,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index 4e1119ef44..d9b1608991 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index f205da2b0e..f371e555b6 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -2002,9 +2002,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index 40143d2f85..115ba6d9ec 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h index 2bfac79cad..077522e1bb 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h @@ -1951,9 +1951,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 1227244238..f857dc93fe 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index b3fde900b6..a99b0e7efe 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -1957,9 +1957,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index b09f19c322..effb6fa2e2 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -1946,9 +1946,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index b6555f876e..b1b4d8bb61 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1981,9 +1981,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 33491027c5..e086dda509 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1947,9 +1947,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index a398889358..29e735f59a 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1947,9 +1947,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index d870ecfa5b..ef20500e55 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -1959,9 +1959,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 36295a73fa..7ff104b9b6 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -1952,9 +1952,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 895469e970..d068962a6d 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -2082,9 +2082,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index 94e05ede81..6daa1e5073 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -2081,9 +2081,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index b8231b94e1..e5f31bc56b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -2080,9 +2080,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h index 9fe06cc2d3..71633e7747 100644 --- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -2083,9 +2083,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 47b9a23d56..c146dc9889 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -2068,9 +2068,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 709213f0e8..72480bb3a5 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -2070,9 +2070,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 88100ff9e1..a390163a04 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -2071,9 +2071,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 4f7dbedcc7..871d2f5c63 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -2071,9 +2071,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index a60f8f83f0..42c75712cd 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1960,9 +1960,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300, 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 0529b2058e..07f02391ec 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1949,9 +1949,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 0f4554d756..19606944a3 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -1948,9 +1948,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index fa419f10f6..79be5f84fc 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -1941,9 +1941,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index bbbeb7a081..391f8e6611 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -1951,9 +1951,10 @@ // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. +// Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES + #endif // CONFIGURATION_H diff --git a/Marlin/src/gcode/config/M281.cpp b/Marlin/src/gcode/config/M281.cpp new file mode 100644 index 0000000000..08e6f56334 --- /dev/null +++ b/Marlin/src/gcode/config/M281.cpp @@ -0,0 +1,56 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../inc/MarlinConfig.h" + +#if HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES) + +#include "../gcode.h" +#include "../../module/servo.h" + +void GcodeSuite::M281() { + if (!parser.seenval('P')) return; + const int servo_index = parser.value_int(); + if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) { + bool angle_change = false; + if (parser.seen('L')) { + servo_angles[servo_index][0] = parser.value_int(); + angle_change = true; + } + if (parser.seen('U')) { + servo_angles[servo_index][1] = parser.value_int(); + angle_change = true; + } + if (!angle_change) { + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR(" Servo ", servo_index); + SERIAL_ECHOPAIR(" L", servo_angles[servo_index][0]); + SERIAL_ECHOLNPAIR(" U", servo_angles[servo_index][1]); + } + } + else { + SERIAL_ERROR_START(); + SERIAL_ECHOPAIR("Servo ", servo_index); + SERIAL_ECHOLNPGM(" out of range"); + } +} + +#endif // HAS_SERVOS && EDITABLE_SERVO_ANGLES diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index e9d36efd67..62863e0028 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -103,8 +103,8 @@ inline void servo_probe_test() { SERIAL_PROTOCOLLNPGM("Servo probe test"); SERIAL_PROTOCOLLNPAIR(". using index: ", probe_index); - SERIAL_PROTOCOLLNPAIR(". deploy angle: ", z_servo_angle[0]); - SERIAL_PROTOCOLLNPAIR(". stow angle: ", z_servo_angle[1]); + SERIAL_PROTOCOLLNPAIR(". deploy angle: ", servo_angles[probe_index][0]); + SERIAL_PROTOCOLLNPAIR(". stow angle: ", servo_angles[probe_index][1]); bool probe_inverting; @@ -146,10 +146,10 @@ inline void servo_probe_test() { uint8_t i = 0; bool deploy_state, stow_state; do { - MOVE_SERVO(probe_index, z_servo_angle[0]); //deploy + MOVE_SERVO(probe_index, servo_angles[Z_PROBE_SERVO_NR][0]); // Deploy safe_delay(500); deploy_state = READ(PROBE_TEST_PIN); - MOVE_SERVO(probe_index, z_servo_angle[1]); //stow + MOVE_SERVO(probe_index, servo_angles[Z_PROBE_SERVO_NR][1]); // Stow safe_delay(500); stow_state = READ(PROBE_TEST_PIN); } while (++i < 4); @@ -170,7 +170,7 @@ inline void servo_probe_test() { #endif } else { // measure active signal length - MOVE_SERVO(probe_index, z_servo_angle[0]); // deploy + MOVE_SERVO(probe_index, servo_angles[Z_PROBE_SERVO_NR][0]); // Deploy safe_delay(500); SERIAL_PROTOCOLLNPGM("please trigger probe"); uint16_t probe_counter = 0; @@ -194,7 +194,7 @@ inline void servo_probe_test() { else SERIAL_PROTOCOLLNPGM("noise detected - please re-run test"); // less than 2mS pulse - MOVE_SERVO(probe_index, z_servo_angle[1]); //stow + MOVE_SERVO(probe_index, servo_angles[Z_PROBE_SERVO_NR][1]); // Stow } // pulse detected diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index ef282add0a..6682cfbeb9 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -487,6 +487,9 @@ void GcodeSuite::process_parsed_command( #if HAS_SERVOS case 280: M280(); break; // M280: Set servo position absolute + #if ENABLED(EDITABLE_SERVO_ANGLES) + case 281: M281(); break; // M281: Set servo angles + #endif #endif #if ENABLED(BABYSTEPPING) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 2130b1636e..cb9e03b58f 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -172,6 +172,7 @@ * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS) * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS) * M280 - Set servo position absolute: "M280 P S". (Requires servos) + * M281 - Set servo min|max position: "M281 P L U". (Requires EDITABLE_SERVO_ANGLES) * M290 - Babystepping (Requires BABYSTEPPING) * M300 - Play beep sound S P * M301 - Set PID parameters P I and D. (Requires PIDTEMP) @@ -627,6 +628,9 @@ private: #if HAS_SERVOS static void M280(); + #if ENABLED(EDITABLE_SERVO_ANGLES) + static void M281(); + #endif #endif #if ENABLED(BABYSTEPPING) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5348a1d516..7d5843b7d3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -720,8 +720,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, /** * Limited number of servos */ -#if NUM_SERVOS > 4 - #error "The maximum number of SERVOS in Marlin is 4." +#if NUM_SERVOS > MAX_SERVOS + #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS." #endif /** diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index a97dbb73c5..9028df8a26 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -37,7 +37,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V55" +#define EEPROM_VERSION "V56" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -70,6 +70,10 @@ #include "../feature/bedlevel/bedlevel.h" #endif +#if HAS_SERVOS + #include "servo.h" +#endif + #if HAS_BED_PROBE #include "../module/probe.h" #endif @@ -174,6 +178,11 @@ typedef struct SettingsDataStruct { bool planner_leveling_active; // M420 S planner.leveling_active int8_t ubl_storage_slot; // ubl.storage_slot + // + // SERVO_ANGLES + // + uint16_t servo_angles[MAX_SERVOS][2]; // M281 P L U + // // DELTA / [XYZ]_DUAL_ENDSTOPS // @@ -532,6 +541,26 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(storage_slot); #endif // AUTO_BED_LEVELING_UBL + #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES) + #if ENABLED(SWITCHING_EXTRUDER) + constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES; + #endif + constexpr uint16_t servo_angles[MAX_SERVOS][2] = { + #if ENABLED(SWITCHING_EXTRUDER) + [SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0], sesa[1] } + #if EXTRUDERS > 3 + , [SWITCHING_EXTRUDER_E23_SERVO_NR] = { sesa[2], sesa[3] } + #endif + #elif ENABLED(SWITCHING_NOZZLE) + [SWITCHING_NOZZLE_SERVO_NR] = SWITCHING_NOZZLE_SERVO_ANGLES + #elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR) + [Z_PROBE_SERVO_NR] = Z_SERVO_ANGLES + #endif + }; + #endif + + EEPROM_WRITE(servo_angles); + // 11 floats for DELTA / [XYZ]_DUAL_ENDSTOPS #if ENABLED(DELTA) @@ -1135,6 +1164,14 @@ void MarlinSettings::postprocess() { EEPROM_READ(dummyui8); #endif // AUTO_BED_LEVELING_UBL + // + // SERVO_ANGLES + // + #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES) + uint16_t servo_angles[MAX_SERVOS][2]; + #endif + EEPROM_READ(servo_angles); + // // DELTA Geometry or Dual Endstops offsets // @@ -1774,6 +1811,44 @@ void MarlinSettings::reset(PORTARG_SOLO) { zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; #endif + // + // Servo Angles + // + + #if HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES) + + #if ENABLED(SWITCHING_EXTRUDER) + + #if EXTRUDERS > 3 + #define REQ_ANGLES 4 + #else + #define REQ_ANGLES 2 + #endif + constexpr uint16_t extruder_angles[] = SWITCHING_EXTRUDER_SERVO_ANGLES; + static_assert(COUNT(extruder_angles) == REQ_ANGLES, "SWITCHING_EXTRUDER_SERVO_ANGLES needs " STRINGIFY(REQ_ANGLES) " angles."); + servo_angles[SWITCHING_EXTRUDER_SERVO_NR][0] = extruder_angles[0]; + servo_angles[SWITCHING_EXTRUDER_SERVO_NR][1] = extruder_angles[1]; + #if EXTRUDERS > 3 + servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][0] = extruder_angles[2]; + servo_angles[SWITCHING_EXTRUDER_E23_SERVO_NR][1] = extruder_angles[3]; + #endif + + #elif ENABLED(SWITCHING_NOZZLE) + + constexpr uint16_t nozzle_angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES; + servo_angles[SWITCHING_NOZZLE_SERVO_NR][0] = nozzle_angles[0]; + servo_angles[SWITCHING_NOZZLE_SERVO_NR][1] = nozzle_angles[1]; + + #elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR) + + constexpr uint16_t z_probe_angles[2] = Z_SERVO_ANGLES; + servo_angles[Z_PROBE_SERVO_NR][0] = z_probe_angles[0]; + servo_angles[Z_PROBE_SERVO_NR][1] = z_probe_angles[1]; + + #endif + + #endif // HAS_SERVOS && EDITABLE_SERVO_ANGLES + #if ENABLED(DELTA) const float adj[ABC] = DELTA_ENDSTOP_ADJ, dta[ABC] = DELTA_TOWER_ANGLE_TRIM; @@ -2253,6 +2328,35 @@ void MarlinSettings::reset(PORTARG_SOLO) { #endif // HAS_LEVELING + #if HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES) + + if (!forReplay) { + CONFIG_ECHO_START; + SERIAL_ECHOLNPGM_P(port, "Servo Angles:"); + } + for (uint8_t i = 0; i < NUM_SERVOS; i++) { + switch (i) { + #if ENABLED(SWITCHING_EXTRUDER) + case SWITCHING_EXTRUDER_SERVO_NR: + #if EXTRUDERS > 3 + case SWITCHING_EXTRUDER_E23_SERVO_NR: + #endif + #elif ENABLED(SWITCHING_NOZZLE) + case SWITCHING_NOZZLE_SERVO_NR: + #elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR) + case Z_PROBE_SERVO_NR: + #endif + CONFIG_ECHO_START; + SERIAL_ECHOPAIR_P(port, " M281 P", int(i)); + SERIAL_ECHOPAIR_P(port, " L", servo_angles[i][0]); + SERIAL_ECHOPAIR_P(port, " U", servo_angles[i][1]); + SERIAL_EOL_P(port); + default: break; + } + } + + #endif // HAS_SERVOS && EDITABLE_SERVO_ANGLES + #if ENABLED(DELTA) if (!forReplay) { diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 1b9cd39cda..ed2ff0b9aa 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -54,7 +54,6 @@ float zprobe_zoffset; // Initialized by settings.load() #if HAS_Z_SERVO_PROBE #include "../module/servo.h" - const int z_servo_angle[2] = Z_SERVO_ANGLES; #endif #if ENABLED(Z_PROBE_SLED) @@ -435,7 +434,7 @@ bool set_probe_deployed(const bool deploy) { #elif HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH) - MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[deploy ? 0 : 1]); + MOVE_SERVO(Z_PROBE_SERVO_NR, servo_angles[Z_PROBE_SERVO_NR][deploy ? 0 : 1]); #elif ENABLED(Z_PROBE_ALLEN_KEY) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index fe4c17b79e..f81482dcec 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -53,7 +53,6 @@ #endif #if HAS_Z_SERVO_PROBE - extern const int z_servo_angle[2]; void servo_probe_init(); #endif diff --git a/Marlin/src/module/servo.cpp b/Marlin/src/module/servo.cpp index a1f9633f78..fbb3e6a764 100644 --- a/Marlin/src/module/servo.cpp +++ b/Marlin/src/module/servo.cpp @@ -31,6 +31,7 @@ #include "servo.h" HAL_SERVO_LIB servo[NUM_SERVOS]; +uint16_t servo_angles[NUM_SERVOS][2]; void servo_init() { #if NUM_SERVOS >= 1 && HAS_SERVO_0 diff --git a/Marlin/src/module/servo.h b/Marlin/src/module/servo.h index 05f4d6f4ef..bd7e2acf5c 100644 --- a/Marlin/src/module/servo.h +++ b/Marlin/src/module/servo.h @@ -30,6 +30,7 @@ #include "../HAL/shared/servo.h" extern HAL_SERVO_LIB servo[NUM_SERVOS]; +extern uint16_t servo_angles[NUM_SERVOS][2]; extern void servo_init(); #define MOVE_SERVO(I, P) servo[I].move(P) @@ -37,8 +38,8 @@ extern void servo_init(); #include "../inc/MarlinConfig.h" #if HAS_Z_SERVO_PROBE - #define DEPLOY_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[0]) - #define STOW_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[1]) + #define DEPLOY_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, servo_angles[Z_PROBE_SERVO_NR][0]) + #define STOW_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, servo_angles[Z_PROBE_SERVO_NR][1]) #endif #endif // _SERVO_H_ diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 48d1272625..6539e8ec98 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -60,22 +60,18 @@ #if DO_SWITCH_EXTRUDER #if EXTRUDERS > 3 - #define REQ_ANGLES 4 - #define _SERVO_NR (e < 2 ? SWITCHING_EXTRUDER_SERVO_NR : SWITCHING_EXTRUDER_E23_SERVO_NR) + #define _SERVO_NR(E) ((E) < 2 ? SWITCHING_EXTRUDER_SERVO_NR : SWITCHING_EXTRUDER_E23_SERVO_NR) #else - #define REQ_ANGLES 2 - #define _SERVO_NR SWITCHING_EXTRUDER_SERVO_NR + #define _SERVO_NR(E) SWITCHING_EXTRUDER_SERVO_NR #endif void move_extruder_servo(const uint8_t e) { - constexpr int16_t angles[] = SWITCHING_EXTRUDER_SERVO_ANGLES; - static_assert(COUNT(angles) == REQ_ANGLES, "SWITCHING_EXTRUDER_SERVO_ANGLES needs " STRINGIFY(REQ_ANGLES) " angles."); planner.synchronize(); #if EXTRUDERS & 1 if (e < EXTRUDERS - 1) #endif { - MOVE_SERVO(_SERVO_NR, angles[e]); + MOVE_SERVO(_SERVO_NR(e), servo_angles[_SERVO_NR(e)][e]); safe_delay(500); } } @@ -85,9 +81,8 @@ #if ENABLED(SWITCHING_NOZZLE) void move_nozzle_servo(const uint8_t e) { - const int16_t angles[2] = SWITCHING_NOZZLE_SERVO_ANGLES; planner.synchronize(); - MOVE_SERVO(SWITCHING_NOZZLE_SERVO_NR, angles[e]); + MOVE_SERVO(SWITCHING_NOZZLE_SERVO_NR, servo_angles[SWITCHING_NOZZLE_SERVO_NR][e]); safe_delay(500); } diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 19f34d5897..90ad0382cc 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -625,6 +625,10 @@ #define MAX_EXTRUDERS 5 #endif +#ifndef MAX_SERVOS + #define MAX_SERVOS 4 +#endif + // // Assign auto fan pins if needed //