Browse Source

Merge pull request #11610 from Freeviv/bugfix-2.0.x

[2.0.x] Editable servo angles
pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
8e18e48d49
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Marlin/Configuration.h
  2. 7
      Marlin/src/config/default/Configuration.h
  3. 7
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  4. 7
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  5. 7
      Marlin/src/config/examples/Anet/A6/Configuration.h
  6. 7
      Marlin/src/config/examples/Anet/A8/Configuration.h
  7. 7
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  8. 7
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  9. 7
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  10. 7
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  11. 7
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  12. 7
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  13. 7
      Marlin/src/config/examples/Cartesio/Configuration.h
  14. 7
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  15. 7
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  16. 7
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  17. 7
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  18. 7
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  19. 7
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  20. 7
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  21. 7
      Marlin/src/config/examples/Einstart-S/Configuration.h
  22. 7
      Marlin/src/config/examples/Felix/Configuration.h
  23. 7
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  24. 7
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  25. 7
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  26. 7
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  27. 7
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  28. 7
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  29. 7
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  30. 7
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  31. 7
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  32. 7
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  33. 7
      Marlin/src/config/examples/MakerParts/Configuration.h
  34. 7
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  35. 7
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  36. 7
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  37. 7
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  38. 7
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  39. 7
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  40. 7
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  41. 7
      Marlin/src/config/examples/RigidBot/Configuration.h
  42. 7
      Marlin/src/config/examples/SCARA/Configuration.h
  43. 7
      Marlin/src/config/examples/STM32F10/Configuration.h
  44. 7
      Marlin/src/config/examples/STM32F4/Configuration.h
  45. 7
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  46. 7
      Marlin/src/config/examples/TheBorg/Configuration.h
  47. 7
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  48. 7
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  49. 7
      Marlin/src/config/examples/Tronxy/X3A/Configuration.h
  50. 7
      Marlin/src/config/examples/Tronxy/X5S/Configuration.h
  51. 7
      Marlin/src/config/examples/Tronxy/XY100/Configuration.h
  52. 7
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  53. 7
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  54. 7
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  55. 7
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  56. 7
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
  57. 7
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  58. 7
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  59. 7
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
  60. 7
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  61. 7
      Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
  62. 7
      Marlin/src/config/examples/delta/generic/Configuration.h
  63. 7
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  64. 7
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  65. 7
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  66. 7
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  67. 7
      Marlin/src/config/examples/makibox/Configuration.h
  68. 7
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  69. 7
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  70. 7
      Marlin/src/config/examples/wt150/Configuration.h
  71. 56
      Marlin/src/gcode/config/M281.cpp
  72. 12
      Marlin/src/gcode/config/M43.cpp
  73. 3
      Marlin/src/gcode/gcode.cpp
  74. 4
      Marlin/src/gcode/gcode.h
  75. 4
      Marlin/src/inc/SanityCheck.h
  76. 106
      Marlin/src/module/configuration_store.cpp
  77. 3
      Marlin/src/module/probe.cpp
  78. 1
      Marlin/src/module/probe.h
  79. 1
      Marlin/src/module/servo.cpp
  80. 5
      Marlin/src/module/servo.h
  81. 13
      Marlin/src/module/tool_change.cpp
  82. 4
      Marlin/src/pins/pins.h

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

7
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

56
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 <http://www.gnu.org/licenses/>.
*
*/
#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

12
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

3
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)

4
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<index> S<angle|µs>". (Requires servos)
* M281 - Set servo min|max position: "M281 P<index> L<min> U<max>". (Requires EDITABLE_SERVO_ANGLES)
* M290 - Babystepping (Requires BABYSTEPPING)
* M300 - Play beep sound S<frequency Hz> P<duration ms>
* 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)

4
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
/**

106
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) {

3
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)

1
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

1
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

5
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_

13
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);
}

4
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
//

Loading…
Cancel
Save