Browse Source

Singleton for cutting tools (#14429)

Scott Lahteine 5 years ago
parent
commit
d7d80418ae
No account linked to committer's email address
100 changed files with 2017 additions and 1975 deletions
  1. 27
    25
      Marlin/Configuration_adv.h
  2. 8
    58
      Marlin/src/HAL/HAL_AVR/SanityCheck.h
  3. 5
    42
      Marlin/src/HAL/HAL_LINUX/SanityCheck.h
  4. 4
    42
      Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
  5. 4
    42
      Marlin/src/HAL/HAL_STM32/SanityCheck.h
  6. 1
    44
      Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
  7. 4
    42
      Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
  8. 4
    44
      Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
  9. 6
    9
      Marlin/src/Marlin.cpp
  10. 99
    0
      Marlin/src/feature/spindle_laser.cpp
  11. 83
    0
      Marlin/src/feature/spindle_laser.h
  12. 19
    105
      Marlin/src/gcode/control/M3-M5.cpp
  13. 1
    1
      Marlin/src/gcode/gcode.cpp
  14. 4
    4
      Marlin/src/gcode/gcode.h
  15. 2
    0
      Marlin/src/inc/Conditionals_adv.h
  16. 1
    1
      Marlin/src/inc/Conditionals_post.h
  17. 69
    1
      Marlin/src/inc/SanityCheck.h
  18. 12
    0
      Marlin/src/lcd/language/language_en.h
  19. 2
    1
      Marlin/src/lcd/menu/menu.cpp
  20. 7
    4
      Marlin/src/lcd/menu/menu.h
  21. 9
    0
      Marlin/src/lcd/menu/menu_main.cpp
  22. 54
    0
      Marlin/src/lcd/menu/menu_spindle_laser.cpp
  23. 0
    46
      Marlin/src/lcd/menu/menu_temperature.cpp
  24. 14
    9
      Marlin/src/libs/numtostr.cpp
  25. 5
    2
      Marlin/src/libs/numtostr.h
  26. 1
    1
      Marlin/src/pins/pins_3DRAG.h
  27. 1
    1
      Marlin/src/pins/pins_AZTEEG_X3.h
  28. 1
    1
      Marlin/src/pins/pins_AZTEEG_X3_PRO.h
  29. 1
    1
      Marlin/src/pins/pins_COHESION3D_MINI.h
  30. 1
    1
      Marlin/src/pins/pins_COHESION3D_REMIX.h
  31. 1
    1
      Marlin/src/pins/pins_FORMBOT_RAPTOR2.h
  32. 1
    1
      Marlin/src/pins/pins_MINITRONICS.h
  33. 6
    4
      Marlin/src/pins/pins_RAMPS.h
  34. 1
    1
      Marlin/src/pins/pins_RAMPS_FD_V1.h
  35. 1
    1
      Marlin/src/pins/pins_RAMPS_LINUX.h
  36. 6
    2
      Marlin/src/pins/pins_RAMPS_RE_ARM.h
  37. 3
    3
      Marlin/src/pins/pins_SANGUINOLOLU_11.h
  38. 1
    1
      Marlin/src/pins/pins_STM3R_MINI.h
  39. 1
    1
      Marlin/src/pins/pins_ULTIMAIN_2.h
  40. 4
    4
      Marlin/src/pins/pins_ULTIMAKER_OLD.h
  41. 1
    1
      Marlin/src/pins/pins_Z_BOLT_X_SERIES.h
  42. 3
    3
      buildroot/share/tests/megaatmega2560-tests
  43. 27
    25
      config/default/Configuration_adv.h
  44. 27
    25
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  45. 27
    25
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  46. 27
    25
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  47. 27
    25
      config/examples/Anet/A2/Configuration_adv.h
  48. 27
    25
      config/examples/Anet/A2plus/Configuration_adv.h
  49. 27
    25
      config/examples/Anet/A6/Configuration_adv.h
  50. 27
    25
      config/examples/Anet/A8/Configuration_adv.h
  51. 27
    25
      config/examples/Anet/A8plus/Configuration_adv.h
  52. 27
    25
      config/examples/Anet/E16/Configuration_adv.h
  53. 27
    25
      config/examples/AnyCubic/i3/Configuration_adv.h
  54. 27
    25
      config/examples/ArmEd/Configuration_adv.h
  55. 27
    25
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  56. 27
    25
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  57. 27
    25
      config/examples/BQ/Hephestos/Configuration_adv.h
  58. 27
    25
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  59. 27
    25
      config/examples/BQ/WITBOX/Configuration_adv.h
  60. 27
    25
      config/examples/Cartesio/Configuration_adv.h
  61. 27
    25
      config/examples/Creality/CR-10/Configuration_adv.h
  62. 27
    25
      config/examples/Creality/CR-10S/Configuration_adv.h
  63. 27
    25
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  64. 27
    25
      config/examples/Creality/CR-10mini/Configuration_adv.h
  65. 27
    25
      config/examples/Creality/CR-8/Configuration_adv.h
  66. 27
    25
      config/examples/Creality/Ender-2/Configuration_adv.h
  67. 27
    25
      config/examples/Creality/Ender-3/Configuration_adv.h
  68. 27
    25
      config/examples/Creality/Ender-4/Configuration_adv.h
  69. 27
    25
      config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
  70. 27
    25
      config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
  71. 27
    25
      config/examples/Einstart-S/Configuration_adv.h
  72. 27
    25
      config/examples/Felix/Configuration_adv.h
  73. 27
    25
      config/examples/FlashForge/CreatorPro/Configuration_adv.h
  74. 27
    25
      config/examples/FolgerTech/i3-2020/Configuration_adv.h
  75. 27
    25
      config/examples/Formbot/Raptor/Configuration_adv.h
  76. 27
    25
      config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  77. 27
    25
      config/examples/Formbot/T_Rex_3/Configuration_adv.h
  78. 27
    25
      config/examples/Fysetc/AIO_II/Configuration_adv.h
  79. 27
    25
      config/examples/Fysetc/CHEETAH/Configuration_adv.h
  80. 27
    25
      config/examples/Fysetc/F6_13/Configuration_adv.h
  81. 27
    25
      config/examples/Geeetech/A10/Configuration_adv.h
  82. 27
    25
      config/examples/Geeetech/A10M/Configuration_adv.h
  83. 27
    25
      config/examples/Geeetech/A20M/Configuration_adv.h
  84. 27
    25
      config/examples/Geeetech/MeCreator2/Configuration_adv.h
  85. 27
    25
      config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  86. 27
    25
      config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  87. 27
    25
      config/examples/Infitary/i3-M508/Configuration_adv.h
  88. 27
    25
      config/examples/JGAurora/A1/Configuration_adv.h
  89. 27
    25
      config/examples/JGAurora/A5/Configuration_adv.h
  90. 27
    25
      config/examples/JGAurora/A5S/Configuration_adv.h
  91. 27
    25
      config/examples/MakerParts/Configuration_adv.h
  92. 27
    25
      config/examples/Malyan/M150/Configuration_adv.h
  93. 27
    25
      config/examples/Malyan/M200/Configuration_adv.h
  94. 27
    25
      config/examples/Micromake/C1/enhanced/Configuration_adv.h
  95. 27
    25
      config/examples/Mks/Robin/Configuration_adv.h
  96. 27
    25
      config/examples/Mks/Sbase/Configuration_adv.h
  97. 27
    25
      config/examples/RapideLite/RL200/Configuration_adv.h
  98. 27
    25
      config/examples/RigidBot/Configuration_adv.h
  99. 27
    25
      config/examples/SCARA/Configuration_adv.h
  100. 0
    0
      config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h

+ 27
- 25
Marlin/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 8
- 58
Marlin/src/HAL/HAL_AVR/SanityCheck.h View File

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * Test AVR specific configuration values for errors at compile-time.
25
+ * Test AVR-specific configuration values for errors at compile-time.
26 26
  */
27 27
 
28 28
 /**
@@ -43,65 +43,15 @@
43 43
 #endif
44 44
 
45 45
 /**
46
- * Sanity checks for Spindle / Laser
46
+ * Sanity checks for Spindle / Laser PWM
47 47
  */
48
-#if ENABLED(SPINDLE_LASER_ENABLE)
49
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
50
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
51
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
52
-    #error "SPINDLE_DIR_PIN not defined."
53
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
54
-    #if !(WITHIN(SPINDLE_LASER_PWM_PIN, 2, 13) || WITHIN(SPINDLE_LASER_PWM_PIN, 44, 46))
55
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
56
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
57
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
58
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
59
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
60
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
61
-      #error "SPINDLE_LASER_PWM_INVERT missing."
62
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
63
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
64
-    #elif SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
65
-      #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
66
-    #elif PIN_EXISTS(X_MAX) && X_MAX_PIN == SPINDLE_LASER_PWM_PIN
67
-      #error "SPINDLE_LASER_PWM pin is in use by X_MAX endstop."
68
-    #elif PIN_EXISTS(X_MIN) && X_MIN_PIN == SPINDLE_LASER_PWM_PIN
69
-      #error "SPINDLE_LASER_PWM pin is in use by X_MIN endstop."
70
-    #elif PIN_EXISTS(Z_STEP) && Z_STEP_PIN == SPINDLE_LASER_PWM_PIN
71
-      #error "SPINDLE_LASER_PWM pin in use by Z_STEP."
72
-    #elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
73
-      #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
74
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
75
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
76
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
77
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
78
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
79
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
80
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
81
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
82
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
83
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
84
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
85
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
86
-    #elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN
87
-      #error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN."
88
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
89
-      #error "SPINDLE_LASER_PWM_PIN is used by FAN_PIN."
90
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
91
-      #error "SPINDLE_LASER_PWM_PIN is used by FAN1_PIN."
92
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
93
-      #error "SPINDLE_LASER_PWM_PIN is used by FAN2_PIN."
94
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
95
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
96
-    #elif PIN_EXISTS(MOTOR_CURRENT_PWM_XY) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_XY_PIN
97
-      #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_XY."
98
-    #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_Z_PIN
99
-      #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_Z."
100
-    #elif PIN_EXISTS(MOTOR_CURRENT_PWM_E) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_E_PIN
101
-      #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_E."
102
-    #endif
48
+#if ENABLED(SPINDLE_LASER_PWM)
49
+  #if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
50
+    #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
51
+  #elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
52
+    #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
103 53
   #endif
104
-#endif // SPINDLE_LASER_ENABLE
54
+#endif
105 55
 
106 56
 /**
107 57
  * The Trinamic library includes SoftwareSerial.h, leading to a compile error.

+ 5
- 42
Marlin/src/HAL/HAL_LINUX/SanityCheck.h View File

@@ -21,50 +21,13 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Test X86_64 configuration values for errors at compile-time.
24
+ * Test X86_64-specific configuration values for errors at compile-time.
25 25
  */
26 26
 
27
-#if ENABLED(SPINDLE_LASER_ENABLE)
28
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
29
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
30
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
31
-    #error "SPINDLE_DIR_PIN not defined."
32
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
33
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
34
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
35
-    #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
36
-      #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
37
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
38
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
39
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
40
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
41
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
42
-      #error "SPINDLE_LASER_PWM_INVERT missing."
43
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
44
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
45
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
46
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
47
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
48
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
49
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
50
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
51
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
52
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
53
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
54
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
55
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
56
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
57
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
58
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
59
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
60
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
61
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
62
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
63
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
64
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
65
-    #endif
66
-  #endif
67
-#endif // SPINDLE_LASER_ENABLE
27
+// Emulating RAMPS
28
+#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
29
+  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
30
+#endif
68 31
 
69 32
 #if ENABLED(FAST_PWM_FAN)
70 33
   #error "FAST_PWM_FAN is not yet implemented for this platform."

+ 4
- 42
Marlin/src/HAL/HAL_LPC1768/SanityCheck.h View File

@@ -21,50 +21,12 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Test Re-ARM specific configuration values for errors at compile-time.
24
+ * Test LPC176x-specific configuration values for errors at compile-time.
25 25
  */
26 26
 
27
-#if ENABLED(SPINDLE_LASER_ENABLE)
28
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
29
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
30
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
31
-    #error "SPINDLE_DIR_PIN not defined."
32
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
33
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
34
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
35
-    #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
36
-      #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
37
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
38
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
39
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
40
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
41
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
42
-      #error "SPINDLE_LASER_PWM_INVERT missing."
43
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
44
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
45
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
46
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
47
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
48
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
49
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
50
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
51
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
52
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
53
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
54
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
55
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
56
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
57
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
58
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
59
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
60
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
61
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
62
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
63
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
64
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
65
-    #endif
66
-  #endif
67
-#endif // SPINDLE_LASER_ENABLE
27
+//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
28
+//  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
29
+//#endif
68 30
 
69 31
 #if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
70 32
   #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"

+ 4
- 42
Marlin/src/HAL/HAL_STM32/SanityCheck.h View File

@@ -22,49 +22,11 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * Test Re-ARM specific configuration values for errors at compile-time.
25
+ * Test STM32-specific configuration values for errors at compile-time.
26 26
  */
27
-#if ENABLED(SPINDLE_LASER_ENABLE)
28
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
29
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
30
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
31
-    #error "SPINDLE_DIR_PIN not defined."
32
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
33
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
34
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
35
-    #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
36
-      #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
37
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
38
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
39
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
40
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
41
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
42
-      #error "SPINDLE_LASER_PWM_INVERT missing."
43
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
44
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
45
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
46
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
47
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
48
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
49
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
50
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
51
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
52
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
53
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
54
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
55
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
56
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
57
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
58
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
59
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
60
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
61
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
62
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
63
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
64
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
65
-    #endif
66
-  #endif
67
-#endif // SPINDLE_LASER_ENABLE
27
+//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
28
+//  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
29
+//#endif
68 30
 
69 31
 #if ENABLED(EMERGENCY_PARSER)
70 32
   #error "EMERGENCY_PARSER is not yet implemented for STM32. Disable EMERGENCY_PARSER to continue."

+ 1
- 44
Marlin/src/HAL/HAL_STM32F1/SanityCheck.h View File

@@ -21,52 +21,9 @@
21 21
  */
22 22
 
23 23
 /**
24
- * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
24
+ * Test STM32F1-specific configuration values for errors at compile-time.
25 25
  */
26 26
 
27
-/**
28
- * Test Re-ARM specific configuration values for errors at compile-time.
29
- */
30
-#if ENABLED(SPINDLE_LASER_ENABLE)
31
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
32
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
33
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
34
-    #error "SPINDLE_DIR_PIN not defined."
35
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
36
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
37
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
38
-    #elif SPINDLE_LASER_POWERUP_DELAY < 0
39
-      #error "SPINDLE_LASER_POWERUP_DELAY must be positive"
40
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 0
41
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be positive"
42
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
43
-      #error "SPINDLE_LASER_PWM_INVERT missing."
44
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
45
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
46
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
47
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
48
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
49
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
50
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
51
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
52
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
53
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
54
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
55
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
56
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
57
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
58
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
59
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
60
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
61
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
62
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
63
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
64
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
65
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
66
-    #endif
67
-  #endif
68
-#endif // SPINDLE_LASER_ENABLE
69
-
70 27
 #if ENABLED(EMERGENCY_PARSER)
71 28
   #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
72 29
 #endif

+ 4
- 42
Marlin/src/HAL/HAL_STM32F4/SanityCheck.h View File

@@ -21,49 +21,11 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Test Re-ARM specific configuration values for errors at compile-time.
24
+ * Test STM32F4-specific configuration values for errors at compile-time.
25 25
  */
26
-#if ENABLED(SPINDLE_LASER_ENABLE)
27
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
28
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
29
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
30
-    #error "SPINDLE_DIR_PIN not defined."
31
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
32
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
33
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
34
-    #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
35
-      #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
36
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
37
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
38
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
39
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
40
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
41
-      #error "SPINDLE_LASER_PWM_INVERT missing."
42
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
43
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
44
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
45
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
46
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
47
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
48
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
49
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
50
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
51
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
52
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
53
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
54
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
55
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
56
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
57
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
58
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
59
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
60
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
61
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
62
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
63
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
64
-    #endif
65
-  #endif
66
-#endif // SPINDLE_LASER_ENABLE
26
+//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
27
+//  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
28
+//#endif
67 29
 
68 30
 #if ENABLED(EMERGENCY_PARSER)
69 31
   #error "EMERGENCY_PARSER is not yet implemented for STM32F4. Disable EMERGENCY_PARSER to continue."

+ 4
- 44
Marlin/src/HAL/HAL_STM32F7/SanityCheck.h View File

@@ -21,51 +21,11 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Test Re-ARM specific configuration values for errors at compile-time.
24
+ * Test STM32F7-specific configuration values for errors at compile-time.
25 25
  */
26
-#if ENABLED(SPINDLE_LASER_ENABLE)
27
-  #if !PIN_EXISTS(SPINDLE_LASER_ENA)
28
-    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
29
-  #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
30
-    #error "SPINDLE_DIR_PIN not defined."
31
-  #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
32
-    #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
33
-      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
34
-    #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
35
-      #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
36
-    #elif SPINDLE_LASER_POWERUP_DELAY < 1
37
-      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
38
-    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
39
-      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
40
-    #elif !defined(SPINDLE_LASER_PWM_INVERT)
41
-      #error "SPINDLE_LASER_PWM_INVERT missing."
42
-    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
43
-      #error "SPINDLE_LASER_PWM equation constant(s) missing."
44
-    #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
45
-      #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
46
-    #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
47
-      #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
48
-    #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
49
-      #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
50
-    #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
51
-      #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
52
-    #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
53
-      #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
54
-    #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
55
-      #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
56
-    #elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN
57
-      #error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN."
58
-    #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
59
-      #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
60
-    #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
61
-      #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
62
-    #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
63
-      #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
64
-    #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
65
-      #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
66
-    #endif
67
-  #endif
68
-#endif // SPINDLE_LASER_ENABLE
26
+//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
27
+//  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
28
+//#endif
69 29
 
70 30
 #if ENABLED(EMERGENCY_PARSER)
71 31
   #error "EMERGENCY_PARSER is not yet implemented for STM32F7. Disable EMERGENCY_PARSER to continue."

+ 6
- 9
Marlin/src/Marlin.cpp View File

@@ -106,6 +106,10 @@
106 106
   #include "feature/tmc_util.h"
107 107
 #endif
108 108
 
109
+#if HAS_CUTTER
110
+  #include "feature/spindle_laser.h"
111
+#endif
112
+
109 113
 #if ENABLED(SDSUPPORT)
110 114
   CardReader card;
111 115
 #endif
@@ -967,15 +971,8 @@ void setup() {
967 971
     OUT_WRITE(PHOTOGRAPH_PIN, LOW);
968 972
   #endif
969 973
 
970
-  #if ENABLED(SPINDLE_LASER_ENABLE)
971
-    OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);  // init spindle to off
972
-    #if SPINDLE_DIR_CHANGE
973
-      OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0);  // init rotation to clockwise (M3)
974
-    #endif
975
-    #if ENABLED(SPINDLE_LASER_PWM) && defined(SPINDLE_LASER_PWM_PIN) && SPINDLE_LASER_PWM_PIN >= 0
976
-      SET_PWM(SPINDLE_LASER_PWM_PIN);
977
-      analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);  // set to lowest speed
978
-    #endif
974
+  #if HAS_CUTTER
975
+    cutter.init();
979 976
   #endif
980 977
 
981 978
   #if ENABLED(COOLANT_MIST)

+ 99
- 0
Marlin/src/feature/spindle_laser.cpp View File

@@ -0,0 +1,99 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * feature/spindle_laser.cpp
25
+ */
26
+
27
+#include "../inc/MarlinConfig.h"
28
+
29
+#if HAS_CUTTER
30
+
31
+#include "spindle_laser.h"
32
+
33
+SpindleLaser cutter;
34
+
35
+cutter_power_t SpindleLaser::power; // = 0
36
+
37
+void SpindleLaser::init() {
38
+  OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Init spindle to off
39
+  #if ENABLED(SPINDLE_CHANGE_DIR)
40
+    OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0);   // Init rotation to clockwise (M3)
41
+  #endif
42
+  #if ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
43
+    SET_PWM(SPINDLE_LASER_PWM_PIN);
44
+    analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);  // set to lowest speed
45
+  #endif
46
+}
47
+
48
+#if ENABLED(SPINDLE_LASER_PWM)
49
+
50
+  /**
51
+   * ocr_val_mode() is used for debugging and to get the points needed to compute the RPM vs ocr_val line
52
+   *
53
+   * it accepts inputs of 0-255
54
+   */
55
+  void SpindleLaser::set_ocr(const uint8_t ocr) {
56
+    WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ACTIVE_HIGH); // turn spindle on (active low)
57
+    #if ENABLED(SPINDLE_LASER_PWM)
58
+      analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
59
+    #endif
60
+  }
61
+
62
+#endif
63
+
64
+void SpindleLaser::update_output() {
65
+  const bool ena = enabled();
66
+  #if ENABLED(SPINDLE_LASER_PWM)
67
+    if (ena) {
68
+      constexpr float inv_slope = RECIPROCAL(SPEED_POWER_SLOPE),
69
+                      min_ocr = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * inv_slope,  // Minimum allowed
70
+                      max_ocr = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * inv_slope;  // Maximum allowed
71
+      int16_t ocr_val;
72
+           if (power <= SPEED_POWER_MIN) ocr_val = min_ocr;                               // Use minimum if set below
73
+      else if (power >= SPEED_POWER_MAX) ocr_val = max_ocr;                               // Use maximum if set above
74
+      else ocr_val = (power - (SPEED_POWER_INTERCEPT)) * inv_slope;                       // Use calculated OCR value
75
+      set_ocr(ocr_val & 0xFF);                                                            // ...limited to Atmel PWM max
76
+    }
77
+    else {                                                                                // Convert RPM to PWM duty cycle
78
+      WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH);                         // Turn spindle off (active low)
79
+      analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);             // Only write low byte
80
+    }
81
+  #else
82
+    WRITE(SPINDLE_LASER_ENA_PIN, ena ? SPINDLE_LASER_ACTIVE_HIGH : !SPINDLE_LASER_ACTIVE_HIGH);
83
+  #endif
84
+  power_delay(ena);
85
+}
86
+
87
+#if ENABLED(SPINDLE_CHANGE_DIR)
88
+
89
+  void SpindleLaser::set_direction(const bool reverse) {
90
+    const bool dir_state = (reverse == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted
91
+    #if ENABLED(SPINDLE_STOP_ON_DIR_CHANGE)
92
+      if (enabled() && READ(SPINDLE_DIR_PIN) != dir_state) disable();
93
+    #endif
94
+    WRITE(SPINDLE_DIR_PIN, dir_state);
95
+  }
96
+
97
+#endif
98
+
99
+#endif // HAS_CUTTER

+ 83
- 0
Marlin/src/feature/spindle_laser.h View File

@@ -0,0 +1,83 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * feature/spindle_laser.h
26
+ * Support for Laser Power or Spindle Power & Direction
27
+ */
28
+
29
+#include "../inc/MarlinConfig.h"
30
+
31
+#if ENABLED(SPINDLE_FEATURE)
32
+  #define _MSG_CUTTER(M) MSG_SPINDLE_##M
33
+#else
34
+  #define _MSG_CUTTER(M) MSG_LASER_##M
35
+#endif
36
+#define MSG_CUTTER(M) _MSG_CUTTER(M)
37
+
38
+#if SPEED_POWER_MAX > 255
39
+  #define cutter_power_t   uint16_t
40
+  #define CUTTER_MENU_TYPE uint16_5
41
+#else
42
+  #define cutter_power_t   uint8_t
43
+  #define CUTTER_MENU_TYPE uint8
44
+#endif
45
+
46
+class SpindleLaser {
47
+public:
48
+  static cutter_power_t power;
49
+
50
+  static void init();
51
+
52
+  static inline bool enabled() { return !!power; }
53
+
54
+  static inline void set_power(const uint8_t pwr) { power = pwr; update_output(); }
55
+
56
+  static inline void set_enabled(const bool enable) { set_power(enable ? 255 : 0); }
57
+
58
+  //static bool active() { return READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ACTIVE_HIGH; }
59
+
60
+  #if ENABLED(SPINDLE_LASER_PWM)
61
+    static void update_output();
62
+    static void set_ocr(const uint8_t ocr);
63
+    static inline void set_ocr_power(const uint8_t pwr) { power = pwr; set_ocr(pwr); }
64
+  #else
65
+    static inline void update_output() { }
66
+  #endif
67
+
68
+  // Wait for spindle to spin up or spin down
69
+  static inline void power_delay(const bool on) { safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); }
70
+
71
+  #if ENABLED(SPINDLE_CHANGE_DIR)
72
+    static void set_direction(const bool reverse);
73
+  #else
74
+    static inline void set_direction(const bool reverse) { UNUSED(reverse); }
75
+  #endif
76
+
77
+  static inline void disable() { set_enabled(false); }
78
+  static inline void enable_forward() { set_direction(false); set_enabled(true); }
79
+  static inline void enable_reverse() { set_direction(true); set_enabled(true); }
80
+
81
+};
82
+
83
+extern SpindleLaser cutter;

+ 19
- 105
Marlin/src/gcode/control/M3-M5.cpp View File

@@ -22,23 +22,23 @@
22 22
 
23 23
 #include "../../inc/MarlinConfig.h"
24 24
 
25
-#if ENABLED(SPINDLE_LASER_ENABLE)
25
+#if HAS_CUTTER
26 26
 
27 27
 #include "../gcode.h"
28
+#include "../../feature/spindle_laser.h"
28 29
 #include "../../module/stepper.h"
29 30
 
30
-uint8_t spindle_laser_power; // = 0
31
-
32 31
 /**
33
- * M3: Spindle Clockwise
34
- * M4: Spindle Counter-clockwise
32
+ *  M3 - Cutter ON (Clockwise)
33
+ *  M4 - Cutter ON (Counter-clockwise)
35 34
  *
36
- *  S0 turns off spindle.
35
+ *    S<power> - Set power. S0 turns it off.
36
+ *    O<ocr>   - Set power and OCR
37 37
  *
38
- *  If no speed PWM output is defined then M3/M4 just turns it on.
38
+ *  If no PWM pin is defined then M3/M4 just turns it on.
39 39
  *
40
- *  At least 12.8KHz (50Hz * 256) is needed for spindle PWM.
41
- *  Hardware PWM is required. ISRs are too slow.
40
+ *  At least 12.8KHz (50Hz * 256) is needed for Spindle PWM.
41
+ *  Hardware PWM is required on AVR. ISRs are too slow.
42 42
  *
43 43
  * NOTE: WGM for timers 3, 4, and 5 must be either Mode 1 or Mode 5.
44 44
  *       No other settings give a PWM signal that goes from 0 to 5 volts.
@@ -59,114 +59,28 @@ uint8_t spindle_laser_power; // = 0
59 59
  *
60 60
  *  PWM duty cycle goes from 0 (off) to 255 (always on).
61 61
  */
62
-
63
-// Wait for spindle to come up to speed
64
-inline void delay_for_power_up() { safe_delay(SPINDLE_LASER_POWERUP_DELAY); }
65
-
66
-// Wait for spindle to stop turning
67
-inline void delay_for_power_down() { safe_delay(SPINDLE_LASER_POWERDOWN_DELAY); }
68
-
69
-/**
70
- * ocr_val_mode() is used for debugging and to get the points needed to compute the RPM vs ocr_val line
71
- *
72
- * it accepts inputs of 0-255
73
- */
74
-
75
-inline void set_spindle_laser_ocr(const uint8_t ocr) {
76
-  WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low)
77
-  #if ENABLED(SPINDLE_LASER_PWM)
78
-    analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
79
-  #endif
80
-}
81
-
82
-#if ENABLED(SPINDLE_LASER_PWM)
83
-
84
-  void update_spindle_laser_power() {
85
-    if (spindle_laser_power == 0) {
86
-      WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);                      // turn spindle off (active low)
87
-      analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);             // only write low byte
88
-      delay_for_power_down();
89
-    }
90
-    else {                                                                                // Convert RPM to PWM duty cycle
91
-      constexpr float inv_slope = 1.0f / (SPEED_POWER_SLOPE),
92
-                      min_ocr = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * inv_slope,  // Minimum allowed
93
-                      max_ocr = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * inv_slope;  // Maximum allowed
94
-      int16_t ocr_val;
95
-           if (spindle_laser_power <= SPEED_POWER_MIN) ocr_val = min_ocr;                 // Use minimum if set below
96
-      else if (spindle_laser_power >= SPEED_POWER_MAX) ocr_val = max_ocr;                 // Use maximum if set above
97
-      else ocr_val = (spindle_laser_power - (SPEED_POWER_INTERCEPT)) * inv_slope;         // Use calculated OCR value
98
-      set_spindle_laser_ocr(ocr_val & 0xFF);                                              // ...limited to Atmel PWM max
99
-      delay_for_power_up();
100
-    }
101
-  }
102
-
103
-#endif // SPINDLE_LASER_PWM
104
-
105
-bool spindle_laser_enabled() {
106
-  return !!spindle_laser_power; // READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ENABLE_INVERT;
107
-}
108
-
109
-void set_spindle_laser_enabled(const bool enable) {
110
-  // Enabled by PWM setting elsewhere
111
-  spindle_laser_power = enable ? 255 : 0;
112
-  #if ENABLED(SPINDLE_LASER_PWM)
113
-    update_spindle_laser_power();
114
-  #else
115
-    if (enable) {
116
-      WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT);
117
-      delay_for_power_up();
118
-    }
119
-    else {
120
-      WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);
121
-      delay_for_power_down();
122
-    }
123
-  #endif
124
-}
125
-
126
-#if SPINDLE_DIR_CHANGE
127
-
128
-  void set_spindle_direction(const bool reverse_dir) {
129
-    const bool dir_state = (reverse_dir == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted
130
-    if (SPINDLE_STOP_ON_DIR_CHANGE && spindle_laser_enabled() && READ(SPINDLE_DIR_PIN) != dir_state)
131
-      set_spindle_laser_enabled(false);
132
-    WRITE(SPINDLE_DIR_PIN, dir_state);
133
-  }
134
-
135
-#endif
136
-
137 62
 void GcodeSuite::M3_M4(const bool is_M4) {
138 63
 
139
-  planner.synchronize();   // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle
64
+  planner.synchronize();   // Wait for previous movement commands (G0/G0/G2/G3) to complete before changing power
140 65
 
141
-  #if SPINDLE_DIR_CHANGE
142
-    set_spindle_direction(is_M4);
143
-  #endif
66
+  cutter.set_direction(is_M4);
144 67
 
145
-  /**
146
-   * Our final value for ocr_val is an unsigned 8 bit value between 0 and 255 which usually means uint8_t.
147
-   * Went to uint16_t because some of the uint8_t calculations would sometimes give 1000 0000 rather than 1111 1111.
148
-   * Then needed to AND the uint16_t result with 0x00FF to make sure we only wrote the byte of interest.
149
-   */
150 68
   #if ENABLED(SPINDLE_LASER_PWM)
151
-    if (parser.seen('O')) {
152
-      spindle_laser_power = parser.value_byte();
153
-      set_spindle_laser_ocr(spindle_laser_power);
154
-    }
155
-    else {
156
-      spindle_laser_power = parser.intval('S', 255);
157
-      update_spindle_laser_power();
158
-    }
69
+    if (parser.seen('O'))
70
+      cutter.set_ocr_power(parser.value_byte()); // The OCR is a value from 0 to 255 (uint8_t)
71
+    else
72
+      cutter.set_power(parser.intval('S', 255));
159 73
   #else
160
-    set_spindle_laser_enabled(true);
74
+    cutter.set_enabled(true);
161 75
   #endif
162 76
 }
163 77
 
164 78
 /**
165
- * M5 turn off spindle
79
+ * M5 - Cutter OFF
166 80
  */
167 81
 void GcodeSuite::M5() {
168 82
   planner.synchronize();
169
-  set_spindle_laser_enabled(false);
83
+  cutter.set_enabled(false);
170 84
 }
171 85
 
172
-#endif // SPINDLE_LASER_ENABLE
86
+#endif // HAS_CUTTER

+ 1
- 1
Marlin/src/gcode/gcode.cpp View File

@@ -322,7 +322,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
322 322
         case 1: M0_M1(); break;                                   // M1: Conditional stop - Wait for user button press on LCD
323 323
       #endif
324 324
 
325
-      #if ENABLED(SPINDLE_LASER_ENABLE)
325
+      #if HAS_CUTTER
326 326
         case 3: M3_M4(false); break;                              // M3: Turn ON Laser | Spindle (clockwise), set Power | Speed
327 327
         case 4: M3_M4(true ); break;                              // M4: Turn ON Laser | Spindle (counter-clockwise), set Power | Speed
328 328
         case 5: M5(); break;                                      // M5: Turn OFF Laser | Spindle

+ 4
- 4
Marlin/src/gcode/gcode.h View File

@@ -75,9 +75,9 @@
75 75
  *
76 76
  * M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
77 77
  * M1   -> M0
78
- * M3   - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_LASER_ENABLE)
79
- * M4   - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_LASER_ENABLE)
80
- * M5   - Turn OFF Laser | Spindle. (Requires SPINDLE_LASER_ENABLE)
78
+ * M3   - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
79
+ * M4   - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
80
+ * M5   - Turn OFF Laser | Spindle. (Requires SPINDLE_FEATURE or LASER_FEATURE)
81 81
  * M7   - Turn mist coolant ON. (Requires COOLANT_CONTROL)
82 82
  * M8   - Turn flood coolant ON. (Requires COOLANT_CONTROL)
83 83
  * M9   - Turn coolant OFF. (Requires COOLANT_CONTROL)
@@ -453,7 +453,7 @@ private:
453 453
     static void M0_M1();
454 454
   #endif
455 455
 
456
-  #if ENABLED(SPINDLE_LASER_ENABLE)
456
+  #if HAS_CUTTER
457 457
     static void M3_M4(const bool is_M4);
458 458
     static void M5();
459 459
   #endif

+ 2
- 0
Marlin/src/inc/Conditionals_adv.h View File

@@ -26,6 +26,8 @@
26 26
  * Defines that depend on advanced configuration.
27 27
  */
28 28
 
29
+#define HAS_CUTTER EITHER(SPINDLE_FEATURE, LASER_FEATURE)
30
+
29 31
 #if !defined(__AVR__) || !defined(USBCON)
30 32
   // Define constants and variables for buffering serial data.
31 33
   // Use only 0 or powers of 2 greater than 1

+ 1
- 1
Marlin/src/inc/Conditionals_post.h View File

@@ -1692,7 +1692,7 @@
1692 1692
   #endif
1693 1693
 #endif
1694 1694
 
1695
-// needs to be here so that we catch the above changes to our defines
1695
+// Defined here to catch the above defines
1696 1696
 #if ENABLED(SDCARD_SORT_ALPHA)
1697 1697
   #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
1698 1698
 #endif

+ 69
- 1
Marlin/src/inc/SanityCheck.h View File

@@ -348,8 +348,16 @@
348 348
   #error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins."
349 349
 #elif defined(MAX6675_SS2)
350 350
   #error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins."
351
+#elif defined(SPINDLE_LASER_ENABLE)
352
+  #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE. Please update your Configuration_adv.h."
351 353
 #elif defined(SPINDLE_LASER_ENABLE_PIN)
352
-  #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your configuration and/or pins."
354
+  #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your Configuration_adv.h and/or pins."
355
+#elif defined(SPINDLE_DIR_CHANGE)
356
+  #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR. Please update your Configuration_adv.h."
357
+#elif defined(SPINDLE_STOP_ON_DIR_CHANGE)
358
+  #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP. Please update your Configuration_adv.h."
359
+#elif defined(SPINDLE_LASER_ENABLE_INVERT)
360
+  #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_HIGH. Please update your Configuration_adv.h."
353 361
 #elif defined(CHAMBER_HEATER_PIN)
354 362
   #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN. Please update your configuration and/or pins."
355 363
 #elif defined(TMC_Z_CALIBRATION)
@@ -2284,3 +2292,63 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2284 2292
     #error "MIN_ and MAX_SOFTWARE_ENDSTOPS are both required with offset hotends."
2285 2293
   #endif
2286 2294
 #endif
2295
+
2296
+#if HAS_CUTTER
2297
+  #define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN)
2298
+  #if BOTH(SPINDLE_FEATURE, LASER_FEATURE)
2299
+    #error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE."
2300
+  #elif !PIN_EXISTS(SPINDLE_LASER_ENA)
2301
+    #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN."
2302
+  #elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR)
2303
+    #error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR."
2304
+  #elif ENABLED(SPINDLE_LASER_PWM)
2305
+    #if !defined(SPINDLE_LASER_PWM_PIN) || SPINDLE_LASER_PWM_PIN < 0
2306
+      #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_PWM."
2307
+    #elif !PWM_PIN(SPINDLE_LASER_PWM_PIN)
2308
+      #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
2309
+    #elif SPINDLE_LASER_POWERUP_DELAY < 1
2310
+      #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
2311
+    #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
2312
+      #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
2313
+    #elif !defined(SPINDLE_LASER_PWM_INVERT)
2314
+      #error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE."
2315
+    #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
2316
+      #error "SPINDLE_LASER_PWM equation constant(s) missing."
2317
+    #elif _PIN_CONFLICT(X_MIN)
2318
+      #error "SPINDLE_LASER_PWM pin conflicts with X_MIN_PIN."
2319
+    #elif _PIN_CONFLICT(X_MAX)
2320
+      #error "SPINDLE_LASER_PWM pin conflicts with X_MAX_PIN."
2321
+    #elif _PIN_CONFLICT(Z_STEP)
2322
+      #error "SPINDLE_LASER_PWM pin conflicts with Z_STEP_PIN."
2323
+    #elif _PIN_CONFLICT(CASE_LIGHT)
2324
+      #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN."
2325
+    #elif _PIN_CONFLICT(E0_AUTO_FAN)
2326
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E0_AUTO_FAN_PIN."
2327
+    #elif _PIN_CONFLICT(E1_AUTO_FAN)
2328
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E1_AUTO_FAN_PIN."
2329
+    #elif _PIN_CONFLICT(E2_AUTO_FAN)
2330
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E2_AUTO_FAN_PIN."
2331
+    #elif _PIN_CONFLICT(E3_AUTO_FAN)
2332
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E3_AUTO_FAN_PIN."
2333
+    #elif _PIN_CONFLICT(E4_AUTO_FAN)
2334
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E4_AUTO_FAN_PIN."
2335
+    #elif _PIN_CONFLICT(E5_AUTO_FAN)
2336
+      #error "SPINDLE_LASER_PWM_PIN conflicts with E5_AUTO_FAN_PIN."
2337
+    #elif _PIN_CONFLICT(FAN)
2338
+      #error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN."
2339
+    #elif _PIN_CONFLICT(FAN1)
2340
+      #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN."
2341
+    #elif _PIN_CONFLICT(FAN2)
2342
+      #error "SPINDLE_LASER_PWM_PIN conflicts with FAN2_PIN."
2343
+    #elif _PIN_CONFLICT(CONTROLLERFAN)
2344
+      #error "SPINDLE_LASER_PWM_PIN conflicts with CONTROLLERFAN_PIN."
2345
+    #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_XY)
2346
+      #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_XY."
2347
+    #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_Z)
2348
+      #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_Z."
2349
+    #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_E)
2350
+      #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_E."
2351
+    #endif
2352
+  #endif
2353
+  #undef _PIN_CONFLICT
2354
+#endif

+ 12
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -190,6 +190,18 @@
190 190
 #ifndef MSG_LASER_POWER
191 191
   #define MSG_LASER_POWER                     _UxGT("Laser power")
192 192
 #endif
193
+#ifndef MSG_SPINDLE_MENU
194
+  #define MSG_SPINDLE_MENU                    _UxGT("Spindle Control")
195
+#endif
196
+#ifndef MSG_SPINDLE_OFF
197
+  #define MSG_SPINDLE_OFF                     _UxGT("Spindle Off")
198
+#endif
199
+#ifndef MSG_SPINDLE_ON
200
+  #define MSG_SPINDLE_ON                      _UxGT("Spindle On")
201
+#endif
202
+#ifndef MSG_SPINDLE_POWER
203
+  #define MSG_SPINDLE_POWER                   _UxGT("Spindle power")
204
+#endif
193 205
 #ifndef MSG_SPINDLE_REVERSE
194 206
   #define MSG_SPINDLE_REVERSE                 _UxGT("Spindle Reverse")
195 207
 #endif

+ 2
- 1
Marlin/src/lcd/menu/menu.cpp View File

@@ -162,7 +162,8 @@ DEFINE_MENU_EDIT_ITEM(int4);        // 1234, -123 right-justified
162 162
 DEFINE_MENU_EDIT_ITEM(int8);        // 123, -12   right-justified
163 163
 DEFINE_MENU_EDIT_ITEM(uint8);       // 123        right-justified
164 164
 DEFINE_MENU_EDIT_ITEM(uint16_3);    // 123, -12   right-justified
165
-DEFINE_MENU_EDIT_ITEM(uint16_4);    // 1234, -123 right-justified
165
+DEFINE_MENU_EDIT_ITEM(uint16_4);    // 1234       right-justified
166
+DEFINE_MENU_EDIT_ITEM(uint16_5);    // 12345      right-justified
166 167
 DEFINE_MENU_EDIT_ITEM(float3);      // 123        right-justified
167 168
 DEFINE_MENU_EDIT_ITEM(float52);     // 123.45
168 169
 DEFINE_MENU_EDIT_ITEM(float43);     // 1.234

+ 7
- 4
Marlin/src/lcd/menu/menu.h View File

@@ -51,8 +51,9 @@ DECLARE_MENU_EDIT_TYPE(int16_t,  int3,        i16tostr3,       1     );   // 123
51 51
 DECLARE_MENU_EDIT_TYPE(int16_t,  int4,        i16tostr4sign,   1     );   // 1234, -123 right-justified
52 52
 DECLARE_MENU_EDIT_TYPE(int8_t,   int8,        i8tostr3,        1     );   // 123, -12   right-justified
53 53
 DECLARE_MENU_EDIT_TYPE(uint8_t,  uint8,       ui8tostr3,       1     );   // 123        right-justified
54
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3,    ui16tostr3,      1     );   // 123, -12   right-justified
55
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4,    ui16tostr4,      0.1   );   // 1234, -123 right-justified
54
+DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3,    ui16tostr3,      1     );   // 123        right-justified
55
+DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4,    ui16tostr4,      0.1   );   // 1234       right-justified
56
+DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_5,    ui16tostr5,      0.01  );   // 12345      right-justified
56 57
 DECLARE_MENU_EDIT_TYPE(float,    float3,      ftostr3,         1     );   // 123        right-justified
57 58
 DECLARE_MENU_EDIT_TYPE(float,    float52,     ftostr42_52,   100     );   // _2.34, 12.34, -2.34 or 123.45, -23.45
58 59
 DECLARE_MENU_EDIT_TYPE(float,    float43,     ftostr43sign, 1000     );   // 1.234
@@ -121,8 +122,9 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int3);             // 123, -12   right-justif
121 122
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int4);             // 1234, -123 right-justified
122 123
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int8);             // 123, -12   right-justified
123 124
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint8);            // 123        right-justified
124
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3);         // 123, -12   right-justified
125
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4);         // 1234, -123 right-justified
125
+DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3);         // 123        right-justified
126
+DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4);         // 1234       right-justified
127
+DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_5);         // 12345      right-justified
126 128
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float3);           // 123        right-justified
127 129
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52);          // _2.34, 12.34, -2.34 or 123.45, -23.45
128 130
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float43);          // 1.234
@@ -206,6 +208,7 @@ DECLARE_MENU_EDIT_ITEM(int8);
206 208
 DECLARE_MENU_EDIT_ITEM(uint8);
207 209
 DECLARE_MENU_EDIT_ITEM(uint16_3);
208 210
 DECLARE_MENU_EDIT_ITEM(uint16_4);
211
+DECLARE_MENU_EDIT_ITEM(uint16_5);
209 212
 DECLARE_MENU_EDIT_ITEM(float3);
210 213
 DECLARE_MENU_EDIT_ITEM(float52);
211 214
 DECLARE_MENU_EDIT_ITEM(float43);

+ 9
- 0
Marlin/src/lcd/menu/menu_main.cpp View File

@@ -74,6 +74,11 @@ void menu_configuration();
74 74
   void menu_led();
75 75
 #endif
76 76
 
77
+#if HAS_CUTTER
78
+  #include "../../feature/spindle_laser.h"
79
+  void menu_spindle_laser();
80
+#endif
81
+
77 82
 #if ENABLED(MIXING_EXTRUDER)
78 83
   void menu_mixer();
79 84
 #endif
@@ -153,6 +158,10 @@ void menu_main() {
153 158
     MENU_ITEM(submenu, MSG_MOTION, menu_motion);
154 159
   }
155 160
 
161
+  #if HAS_CUTTER
162
+    MENU_ITEM(submenu, MSG_CUTTER(MENU), menu_spindle_laser);
163
+  #endif
164
+
156 165
   MENU_ITEM(submenu, MSG_TEMPERATURE, menu_temperature);
157 166
 
158 167
   #if ENABLED(MIXING_EXTRUDER)

+ 54
- 0
Marlin/src/lcd/menu/menu_spindle_laser.cpp View File

@@ -0,0 +1,54 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+//
24
+// Spindle / Laser Menu
25
+//
26
+
27
+#include "../../inc/MarlinConfig.h"
28
+
29
+#if HAS_CUTTER
30
+
31
+  #include "menu.h"
32
+
33
+  #include "../../feature/spindle_laser.h"
34
+
35
+  void menu_spindle_laser() {
36
+
37
+    START_MENU();
38
+    MENU_BACK(MSG_MAIN);
39
+    if (cutter.enabled()) {
40
+      #if ENABLED(SPINDLE_LASER_PWM)
41
+        MENU_ITEM_EDIT_CALLBACK(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output);
42
+      #endif
43
+      MENU_ITEM(function, MSG_CUTTER(OFF), cutter.disable);
44
+    }
45
+    else {
46
+      MENU_ITEM(function, MSG_CUTTER(ON), cutter.enable_forward);
47
+      #if ENABLED(SPINDLE_CHANGE_DIR)
48
+        MENU_ITEM(function, MSG_SPINDLE_REVERSE, cutter.enable_reverse);
49
+      #endif
50
+    }
51
+    END_MENU();
52
+  }
53
+
54
+#endif // HAS_CUTTER

+ 0
- 46
Marlin/src/lcd/menu/menu_temperature.cpp View File

@@ -303,48 +303,6 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
303 303
 
304 304
 #endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
305 305
 
306
-#if ENABLED(SPINDLE_LASER_ENABLE)
307
-
308
-  extern uint8_t spindle_laser_power;
309
-  bool spindle_laser_enabled();
310
-  void set_spindle_laser_enabled(const bool enabled);
311
-  #if ENABLED(SPINDLE_LASER_PWM)
312
-    void update_spindle_laser_power();
313
-  #endif
314
-
315
-  inline void _lcd_spindle_laser_off() { set_spindle_laser_enabled(false); }
316
-  void set_spindle_direction(bool);
317
-  inline void _lcd_spindle_laser_on(const bool is_M4) {
318
-    #if SPINDLE_DIR_CHANGE
319
-      set_spindle_direction(is_M4);
320
-    #endif
321
-    set_spindle_laser_enabled(true);
322
-  }
323
-  inline void _lcd_spindle_laser_on() { _lcd_spindle_laser_on(false); }
324
-  #if SPINDLE_DIR_CHANGE
325
-    inline void _lcd_spindle_on_reverse() { _lcd_spindle_laser_on(true); }
326
-  #endif
327
-
328
-  void menu_spindle_laser() {
329
-    START_MENU();
330
-    MENU_BACK(MSG_MAIN);
331
-    if (spindle_laser_enabled()) {
332
-      #if ENABLED(SPINDLE_LASER_PWM)
333
-        MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power);
334
-      #endif
335
-      MENU_ITEM(function, MSG_LASER_OFF, _lcd_spindle_laser_off);
336
-    }
337
-    else {
338
-      MENU_ITEM(function, MSG_LASER_ON, _lcd_spindle_laser_on);
339
-      #if SPINDLE_DIR_CHANGE
340
-        MENU_ITEM(function, MSG_SPINDLE_REVERSE, _lcd_spindle_on_reverse);
341
-      #endif
342
-    }
343
-    END_MENU();
344
-  }
345
-
346
-#endif // SPINDLE_LASER_ENABLE
347
-
348 306
 void menu_temperature() {
349 307
   START_MENU();
350 308
   MENU_BACK(MSG_MAIN);
@@ -415,10 +373,6 @@ void menu_temperature() {
415 373
     #endif
416 374
   #endif // FAN_COUNT > 0
417 375
 
418
-  #if ENABLED(SPINDLE_LASER_ENABLE)
419
-    MENU_ITEM(submenu, MSG_LASER_MENU, menu_spindle_laser);
420
-  #endif
421
-
422 376
   #if HAS_TEMP_HOTEND
423 377
 
424 378
     //

+ 14
- 9
Marlin/src/libs/numtostr.cpp View File

@@ -57,12 +57,14 @@ char* i8tostr3(const int8_t x) {
57 57
   return &conv[4];
58 58
 }
59 59
 
60
-// Convert unsigned 16bit int to string 123 format
61
-char* ui16tostr3(const uint16_t xx) {
60
+// Convert unsigned 16bit int to string 12345 format
61
+char* ui16tostr5(const uint16_t xx) {
62
+  conv[2] = RJDIGIT(xx, 10000);
63
+  conv[3] = RJDIGIT(xx, 1000);
62 64
   conv[4] = RJDIGIT(xx, 100);
63 65
   conv[5] = RJDIGIT(xx, 10);
64 66
   conv[6] = DIGIMOD(xx, 1);
65
-  return &conv[4];
67
+  return &conv[2];
66 68
 }
67 69
 
68 70
 // Convert unsigned 16bit int to string 1234 format
@@ -74,6 +76,14 @@ char* ui16tostr4(const uint16_t xx) {
74 76
   return &conv[3];
75 77
 }
76 78
 
79
+// Convert unsigned 16bit int to string 123 format
80
+char* ui16tostr3(const uint16_t xx) {
81
+  conv[4] = RJDIGIT(xx, 100);
82
+  conv[5] = RJDIGIT(xx, 10);
83
+  conv[6] = DIGIMOD(xx, 1);
84
+  return &conv[4];
85
+}
86
+
77 87
 // Convert signed 16bit int to rj string with 123 or -12 format
78 88
 char* i16tostr3(const int16_t x) {
79 89
   int xx = x;
@@ -215,12 +225,7 @@ char* ftostr54sign(const float &f, char plus/*=' '*/) {
215 225
 // Convert unsigned float to rj string with 12345 format
216 226
 char* ftostr5rj(const float &f) {
217 227
   const long i = ((f < 0 ? -f : f) * 10 + 5) / 10;
218
-  conv[2] = RJDIGIT(i, 10000);
219
-  conv[3] = RJDIGIT(i, 1000);
220
-  conv[4] = RJDIGIT(i, 100);
221
-  conv[5] = RJDIGIT(i, 10);
222
-  conv[6] = DIGIMOD(i, 1);
223
-  return &conv[2];
228
+  return ui16tostr5(i);
224 229
 }
225 230
 
226 231
 // Convert signed float to string with +1234.5 format

+ 5
- 2
Marlin/src/libs/numtostr.h View File

@@ -32,12 +32,15 @@ char* ui8tostr3(const uint8_t i);
32 32
 // Convert int8_t to string with 123 format
33 33
 char* i8tostr3(const int8_t x);
34 34
 
35
-// Convert uint16_t to string with 123 format
36
-char* ui16tostr3(const uint16_t x);
35
+// Convert uint16_t to string with 12345 format
36
+char* ui16tostr5(const uint16_t x);
37 37
 
38 38
 // Convert uint16_t to string with 1234 format
39 39
 char* ui16tostr4(const uint16_t x);
40 40
 
41
+// Convert uint16_t to string with 123 format
42
+char* ui16tostr3(const uint16_t x);
43
+
41 44
 // Convert int16_t to string with 123 format
42 45
 char* i16tostr3(const int16_t x);
43 46
 

+ 1
- 1
Marlin/src/pins/pins_3DRAG.h View File

@@ -140,7 +140,7 @@
140 140
 #undef SPINDLE_LASER_ENA_PIN
141 141
 #undef SPINDLE_DIR_PIN
142 142
 
143
-#if ENABLED(SPINDLE_LASER_ENABLE)
143
+#if HAS_CUTTER
144 144
   #if !EXTRUDERS
145 145
     #undef E0_DIR_PIN
146 146
     #undef E0_ENABLE_PIN

+ 1
- 1
Marlin/src/pins/pins_AZTEEG_X3.h View File

@@ -84,7 +84,7 @@
84 84
 #undef SPINDLE_LASER_ENA_PIN
85 85
 #undef SPINDLE_DIR_PIN
86 86
 
87
-#if ENABLED(SPINDLE_LASER_ENABLE)
87
+#if HAS_CUTTER
88 88
   #undef SDA                       // use EXP3 header
89 89
   #undef SCL
90 90
   #if SERVO0_PIN == 7

+ 1
- 1
Marlin/src/pins/pins_AZTEEG_X3_PRO.h View File

@@ -157,7 +157,7 @@
157 157
 #undef SPINDLE_LASER_ENA_PIN
158 158
 #undef SPINDLE_DIR_PIN
159 159
 
160
-#if ENABLED(SPINDLE_LASER_ENABLE)   // EXP2 header
160
+#if HAS_CUTTER   // EXP2 header
161 161
   #if ANY(VIKI2, miniVIKI)
162 162
     #undef BTN_EN2
163 163
     #define BTN_EN2             31   // need 7 for the spindle speed PWM

+ 1
- 1
Marlin/src/pins/pins_COHESION3D_MINI.h View File

@@ -116,7 +116,7 @@
116 116
 //
117 117
 // M3/M4/M5 - Spindle/Laser Control
118 118
 //
119
-#if ENABLED(SPINDLE_LASER_ENABLE)
119
+#if HAS_CUTTER
120 120
   #undef HEATER_0_PIN
121 121
   #define SPINDLE_LASER_ENA_PIN     P2_07   // FET 1
122 122
   #undef HEATER_BED_PIN

+ 1
- 1
Marlin/src/pins/pins_COHESION3D_REMIX.h View File

@@ -137,7 +137,7 @@
137 137
 //
138 138
 // M3/M4/M5 - Spindle/Laser Control
139 139
 //
140
-#if ENABLED(SPINDLE_LASER_ENABLE)
140
+#if HAS_CUTTER
141 141
   #undef HEATER_0_PIN
142 142
   #undef HEATER_BED_PIN
143 143
   #undef FAN_PIN

+ 1
- 1
Marlin/src/pins/pins_FORMBOT_RAPTOR2.h View File

@@ -40,7 +40,7 @@
40 40
 //
41 41
 // M3/M4/M5 - Spindle/Laser Control
42 42
 //
43
-#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
43
+#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
44 44
   #if !NUM_SERVOS                       // Try to use servo connector first
45 45
     #define SPINDLE_LASER_ENA_PIN     6 // Pin should have a pullup/pulldown!
46 46
     #define SPINDLE_LASER_PWM_PIN     4 // MUST BE HARDWARE PWM

+ 1
- 1
Marlin/src/pins/pins_MINITRONICS.h View File

@@ -130,7 +130,7 @@
130 130
 //
131 131
 // M3/M4/M5 - Spindle/Laser Control
132 132
 //
133
-#if ENABLED(SPINDLE_LASER_ENABLE)  // assumes we're only doing CNC work (no 3D printing)
133
+#if HAS_CUTTER  // assumes we're only doing CNC work (no 3D printing)
134 134
   #undef HEATER_BED_PIN
135 135
   #undef TEMP_BED_PIN             // need to free up some pins but also need to
136 136
   #undef TEMP_0_PIN               // re-assign them (to unused pins) because Marlin

+ 6
- 4
Marlin/src/pins/pins_RAMPS.h View File

@@ -255,17 +255,17 @@
255 255
 
256 256
 #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
257 257
   #if NUM_SERVOS <= 1 // try to use servo connector first
258
-    #define CASE_LIGHT_PIN    6   // MUST BE HARDWARE PWM
258
+    #define CASE_LIGHT_PIN  6   // MUST BE HARDWARE PWM
259 259
   #elif AUX2_PINS_FREE
260
-    #define CASE_LIGHT_PIN   44   // MUST BE HARDWARE PWM
260
+    #define CASE_LIGHT_PIN 44   // MUST BE HARDWARE PWM
261 261
   #endif
262 262
 #endif
263 263
 
264 264
 //
265 265
 // M3/M4/M5 - Spindle/Laser Control
266 266
 //
267
-#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
268
-  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
267
+#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
268
+  #if !NUM_SERVOS                         // Use servo connector if possible
269 269
     #define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup/pulldown!
270 270
     #define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM
271 271
     #define SPINDLE_DIR_PIN           5
@@ -273,6 +273,8 @@
273 273
     #define SPINDLE_LASER_ENA_PIN    40   // Pin should have a pullup/pulldown!
274 274
     #define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
275 275
     #define SPINDLE_DIR_PIN          65
276
+  #else
277
+    #error "No auto-assignable Spindle/Laser pins available."
276 278
   #endif
277 279
 #endif
278 280
 

+ 1
- 1
Marlin/src/pins/pins_RAMPS_FD_V1.h View File

@@ -227,7 +227,7 @@
227 227
 //
228 228
 // M3/M4/M5 - Spindle/Laser Control
229 229
 //
230
-#if HOTENDS < 3 && ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
230
+#if HOTENDS < 3 && HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
231 231
   #define SPINDLE_LASER_ENA_PIN 45   // Use E2 ENA
232 232
   #define SPINDLE_LASER_PWM_PIN 12   // MUST BE HARDWARE PWM
233 233
   #define SPINDLE_DIR_PIN       47   // Use E2 DIR

+ 1
- 1
Marlin/src/pins/pins_RAMPS_LINUX.h View File

@@ -228,7 +228,7 @@
228 228
 //
229 229
 // M3/M4/M5 - Spindle/Laser Control
230 230
 //
231
-#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
231
+#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
232 232
   #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
233 233
     #define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup/pulldown!
234 234
     #define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM

+ 6
- 2
Marlin/src/pins/pins_RAMPS_RE_ARM.h View File

@@ -239,9 +239,13 @@
239 239
 // M3/M4/M5 - Spindle/Laser Control
240 240
 //            Use servo pins, if available
241 241
 //
242
-#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
242
+#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
243 243
   #if NUM_SERVOS > 1
244
-    #error "SPINDLE_LASER_ENABLE requires 3 free servo pins."
244
+    #if ENABLED(SPINDLE_FEATURE)
245
+      #error "SPINDLE_FEATURE requires 3 free servo pins."
246
+    #else
247
+      #error "LASER_FEATURE requires 3 free servo pins."
248
+    #endif
245 249
   #endif
246 250
   #define SPINDLE_LASER_ENA_PIN    SERVO1_PIN   // (6) Pin should have a pullup/pulldown!
247 251
   #define SPINDLE_LASER_PWM_PIN    SERVO3_PIN   // (4) MUST BE HARDWARE PWM

+ 3
- 3
Marlin/src/pins/pins_SANGUINOLOLU_11.h View File

@@ -137,7 +137,7 @@
137 137
   #define LCD_BACKLIGHT_PIN 17   // LCD backlight LED
138 138
 #endif
139 139
 
140
-#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)  // try to use IO Header
140
+#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)  // try to use IO Header
141 141
   #define CASE_LIGHT_PIN     4   // MUST BE HARDWARE PWM  - see if IO Header is available
142 142
 #endif
143 143
 
@@ -276,7 +276,7 @@
276 276
 //
277 277
 // M3/M4/M5 - Spindle/Laser Control
278 278
 //
279
-#if ENABLED(SPINDLE_LASER_ENABLE)
279
+#if HAS_CUTTER
280 280
   #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)  // try to use IO Header
281 281
 
282 282
     #define SPINDLE_LASER_ENA_PIN    10   // Pin should have a pullup/pulldown!
@@ -322,4 +322,4 @@
322 322
     #define SPINDLE_LASER_ENA_PIN    21   // Pin should have a pullup!
323 323
     #define SPINDLE_DIR_PIN          -1   // No pin available on the socket for the direction pin
324 324
   #endif
325
-#endif // SPINDLE_LASER_ENABLE
325
+#endif

+ 1
- 1
Marlin/src/pins/pins_STM3R_MINI.h View File

@@ -106,7 +106,7 @@
106 106
 #define TEMP_2_PIN         PA3
107 107
 
108 108
 // Laser control
109
-#if ENABLED(SPINDLE_LASER_ENABLE)
109
+#if HAS_CUTTER
110 110
   #define SPINDLE_LASER_PWM_PIN     PB8
111 111
   #define SPINDLE_LASER_ENA_PIN     PD5
112 112
 #endif

+ 1
- 1
Marlin/src/pins/pins_ULTIMAIN_2.h View File

@@ -128,7 +128,7 @@
128 128
 //
129 129
 // M3/M4/M5 - Spindle/Laser Control
130 130
 //
131
-#if ENABLED(SPINDLE_LASER_ENABLE)   // use the LED_PIN for spindle speed control or case light
131
+#if HAS_CUTTER   // use the LED_PIN for spindle speed control or case light
132 132
   #undef LED_PIN
133 133
   #define SPINDLE_DIR_PIN          16
134 134
   #define SPINDLE_LASER_ENA_PIN    17   // Pin should have a pullup!

+ 4
- 4
Marlin/src/pins/pins_ULTIMAKER_OLD.h View File

@@ -80,7 +80,7 @@
80 80
 #endif
81 81
 
82 82
 #if ENABLED(BOARD_REV_1_0)
83
-  #if ENABLED(SPINDLE_LASER_ENABLE)
83
+  #if HAS_CUTTER
84 84
     #define X_STOP_PIN     13   // SW1  (didn't change) - also has a useable hardware PWM
85 85
     #define Y_STOP_PIN     12   // SW2
86 86
     #define Z_STOP_PIN     11   // SW3
@@ -106,7 +106,7 @@
106 106
 //
107 107
 // Z Probe (when not Z_MIN_PIN)
108 108
 //
109
-#if !defined(Z_MIN_PROBE_PIN) && !BOTH(SPINDLE_LASER_ENABLE, BOARD_REV_1_0)
109
+#if !defined(Z_MIN_PROBE_PIN) && !(HAS_CUTTER && ENABLED(BOARD_REV_1_0))
110 110
   #define Z_MIN_PROBE_PIN  Z_MAX_PIN
111 111
 #endif
112 112
 
@@ -125,7 +125,7 @@
125 125
 #define Z_DIR_PIN          39
126 126
 #define Z_ENABLE_PIN       35
127 127
 
128
-#if BOTH(SPINDLE_LASER_ENABLE, BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1
128
+#if HAS_CUTTER && ENABLED(BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1
129 129
   // Move E0 to the spare and get Spindle/Laser signals from E0
130 130
   #define E0_STEP_PIN      49
131 131
   #define E0_DIR_PIN       47
@@ -214,7 +214,7 @@
214 214
 //
215 215
 // M3/M4/M5 - Spindle/Laser Control
216 216
 //
217
-#if ENABLED(SPINDLE_LASER_ENABLE)
217
+#if HAS_CUTTER
218 218
   #if EITHER(BOARD_REV_1_0, BOARD_REV_1_5) // Use the last three SW positions
219 219
     #define SPINDLE_DIR_PIN          10   // 1.0: SW4  1.5: EXP3-6 ("10")
220 220
     #define SPINDLE_LASER_PWM_PIN     9   // 1.0: SW5  1.5: EXP3-7 ( "9") .. MUST BE HARDWARE PWM

+ 1
- 1
Marlin/src/pins/pins_Z_BOLT_X_SERIES.h View File

@@ -177,7 +177,7 @@
177 177
 //
178 178
 // M3/M4/M5 - Spindle/Laser Control
179 179
 //
180
-#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
180
+#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
181 181
   #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
182 182
     #define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup/pulldown!
183 183
     #define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM

+ 3
- 3
buildroot/share/tests/megaatmega2560-tests View File

@@ -58,7 +58,7 @@ opt_set TEMP_SENSOR_3 20
58 58
 opt_set TEMP_SENSOR_4 1000
59 59
 opt_set TEMP_SENSOR_BED 1
60 60
 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \
61
-           EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT GCODE_MACROS SPINDLE_LASER_ENABLE \
61
+           EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT GCODE_MACROS \
62 62
            USB_FLASH_DRIVE_SUPPORT SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI \
63 63
            CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME JUNCTION_DEVIATION MULTI_NOZZLE_DUPLICATION
64 64
 exec_test $1 $2 "Azteeg X3 with 5 extruders, RRDFGSC, probeless UBL, Linear Advance, and more"
@@ -87,8 +87,8 @@ exec_test $1 $2 "RAMPS with ZONESTAR_LCD, Servo Probe, 3-Point ABL, DEBUG_LEVELI
87 87
 # Test MESH_BED_LEVELING feature, with LCD
88 88
 #
89 89
 restore_configs
90
-opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING MESH_EDIT_MENU ULTIMAKERCONTROLLER
91
-exec_test $1 $2 "MESH_BED_LEVELING feature, with LCD"
90
+opt_enable SPINDLE_FEATURE MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING MESH_EDIT_MENU ULTIMAKERCONTROLLER
91
+exec_test $1 $2 "Spindle, MESH_BED_LEVELING, and LCD"
92 92
 
93 93
 #
94 94
 # Test MINIRAMBO with PWM_MOTOR_CURRENT and many features

+ 27
- 25
config/default/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/3DFabXYZ/Migbot/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/AliExpress/UM2pExt/Configuration_adv.h View File

@@ -2123,36 +2123,38 @@
2123 2123
  *
2124 2124
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2125 2125
  */
2126
-//#define SPINDLE_LASER_ENABLE
2127
-#if ENABLED(SPINDLE_LASER_ENABLE)
2128
-
2129
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2130
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2126
+//#define SPINDLE_FEATURE
2127
+//#define LASER_FEATURE
2128
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2129
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2130
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2131 2131
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2132 2132
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2133 2133
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2134
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2135
-  #define SPINDLE_INVERT_DIR            false
2136
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2137
-
2138
-  /**
2139
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
-   *
2141
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
-   *    where PWM duty cycle varies from 0 to 255
2143
-   *
2144
-   *  set the following for your controller (ALL MUST BE SET)
2145
-   */
2146 2134
 
2147
-  #define SPEED_POWER_SLOPE    118.4
2148
-  #define SPEED_POWER_INTERCEPT  0
2149
-  #define SPEED_POWER_MIN     5000
2150
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2135
+  #if ENABLED(SPINDLE_FEATURE)
2136
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2137
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2138
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2151 2139
 
2152
-  //#define SPEED_POWER_SLOPE      0.3922
2153
-  //#define SPEED_POWER_INTERCEPT  0
2154
-  //#define SPEED_POWER_MIN       10
2155
-  //#define SPEED_POWER_MAX      100      // 0-100%
2140
+    /**
2141
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2142
+     *
2143
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2144
+     *    where PWM duty cycle varies from 0 to 255
2145
+     *
2146
+     *  set the following for your controller (ALL MUST BE SET)
2147
+     */
2148
+    #define SPEED_POWER_SLOPE    118.4
2149
+    #define SPEED_POWER_INTERCEPT  0
2150
+    #define SPEED_POWER_MIN     5000
2151
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2152
+  #else
2153
+    #define SPEED_POWER_SLOPE      0.3922
2154
+    #define SPEED_POWER_INTERCEPT  0
2155
+    #define SPEED_POWER_MIN       10
2156
+    #define SPEED_POWER_MAX      100    // 0-100%
2157
+  #endif
2156 2158
 #endif
2157 2159
 
2158 2160
 /**

+ 27
- 25
config/examples/Anet/A2/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Anet/A6/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Anet/A8/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Anet/A8plus/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Anet/E16/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/AnyCubic/i3/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/ArmEd/Configuration_adv.h View File

@@ -2125,36 +2125,38 @@
2125 2125
  *
2126 2126
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2127 2127
  */
2128
-//#define SPINDLE_LASER_ENABLE
2129
-#if ENABLED(SPINDLE_LASER_ENABLE)
2130
-
2131
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2132
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2128
+//#define SPINDLE_FEATURE
2129
+//#define LASER_FEATURE
2130
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2131
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2132
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2133 2133
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2134 2134
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2135 2135
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2136
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2137
-  #define SPINDLE_INVERT_DIR            false
2138
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2139
-
2140
-  /**
2141
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2142
-   *
2143
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2144
-   *    where PWM duty cycle varies from 0 to 255
2145
-   *
2146
-   *  set the following for your controller (ALL MUST BE SET)
2147
-   */
2148 2136
 
2149
-  #define SPEED_POWER_SLOPE    118.4
2150
-  #define SPEED_POWER_INTERCEPT  0
2151
-  #define SPEED_POWER_MIN     5000
2152
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2137
+  #if ENABLED(SPINDLE_FEATURE)
2138
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2139
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2140
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2153 2141
 
2154
-  //#define SPEED_POWER_SLOPE      0.3922
2155
-  //#define SPEED_POWER_INTERCEPT  0
2156
-  //#define SPEED_POWER_MIN       10
2157
-  //#define SPEED_POWER_MAX      100      // 0-100%
2142
+    /**
2143
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2144
+     *
2145
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2146
+     *    where PWM duty cycle varies from 0 to 255
2147
+     *
2148
+     *  set the following for your controller (ALL MUST BE SET)
2149
+     */
2150
+    #define SPEED_POWER_SLOPE    118.4
2151
+    #define SPEED_POWER_INTERCEPT  0
2152
+    #define SPEED_POWER_MIN     5000
2153
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2154
+  #else
2155
+    #define SPEED_POWER_SLOPE      0.3922
2156
+    #define SPEED_POWER_INTERCEPT  0
2157
+    #define SPEED_POWER_MIN       10
2158
+    #define SPEED_POWER_MAX      100    // 0-100%
2159
+  #endif
2158 2160
 #endif
2159 2161
 
2160 2162
 /**

+ 27
- 25
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -2129,36 +2129,38 @@
2129 2129
  *
2130 2130
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2131 2131
  */
2132
-//#define SPINDLE_LASER_ENABLE
2133
-#if ENABLED(SPINDLE_LASER_ENABLE)
2134
-
2135
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2136
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2132
+//#define SPINDLE_FEATURE
2133
+//#define LASER_FEATURE
2134
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2135
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2136
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2137 2137
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2138 2138
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2139 2139
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2140
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2141
-  #define SPINDLE_INVERT_DIR            false
2142
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2143
-
2144
-  /**
2145
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2146
-   *
2147
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2148
-   *    where PWM duty cycle varies from 0 to 255
2149
-   *
2150
-   *  set the following for your controller (ALL MUST BE SET)
2151
-   */
2152 2140
 
2153
-  #define SPEED_POWER_SLOPE    118.4
2154
-  #define SPEED_POWER_INTERCEPT  0
2155
-  #define SPEED_POWER_MIN     5000
2156
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2141
+  #if ENABLED(SPINDLE_FEATURE)
2142
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2143
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2144
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2157 2145
 
2158
-  //#define SPEED_POWER_SLOPE      0.3922
2159
-  //#define SPEED_POWER_INTERCEPT  0
2160
-  //#define SPEED_POWER_MIN       10
2161
-  //#define SPEED_POWER_MAX      100      // 0-100%
2146
+    /**
2147
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2148
+     *
2149
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2150
+     *    where PWM duty cycle varies from 0 to 255
2151
+     *
2152
+     *  set the following for your controller (ALL MUST BE SET)
2153
+     */
2154
+    #define SPEED_POWER_SLOPE    118.4
2155
+    #define SPEED_POWER_INTERCEPT  0
2156
+    #define SPEED_POWER_MIN     5000
2157
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2158
+  #else
2159
+    #define SPEED_POWER_SLOPE      0.3922
2160
+    #define SPEED_POWER_INTERCEPT  0
2161
+    #define SPEED_POWER_MIN       10
2162
+    #define SPEED_POWER_MAX      100    // 0-100%
2163
+  #endif
2162 2164
 #endif
2163 2165
 
2164 2166
 /**

+ 27
- 25
config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Cartesio/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/CR-10_5S/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Dagoma/Disco Ultimate/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Einstart-S/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Felix/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/FlashForge/CreatorPro/Configuration_adv.h View File

@@ -2120,36 +2120,38 @@
2120 2120
  *
2121 2121
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2122 2122
  */
2123
-//#define SPINDLE_LASER_ENABLE
2124
-#if ENABLED(SPINDLE_LASER_ENABLE)
2125
-
2126
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2127
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2123
+//#define SPINDLE_FEATURE
2124
+//#define LASER_FEATURE
2125
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2126
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2127
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2128 2128
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2129 2129
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2130 2130
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2131
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2132
-  #define SPINDLE_INVERT_DIR            false
2133
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2134
-
2135
-  /**
2136
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2137
-   *
2138
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2139
-   *    where PWM duty cycle varies from 0 to 255
2140
-   *
2141
-   *  set the following for your controller (ALL MUST BE SET)
2142
-   */
2143 2131
 
2144
-  #define SPEED_POWER_SLOPE    118.4
2145
-  #define SPEED_POWER_INTERCEPT  0
2146
-  #define SPEED_POWER_MIN     5000
2147
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2132
+  #if ENABLED(SPINDLE_FEATURE)
2133
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2134
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2135
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2148 2136
 
2149
-  //#define SPEED_POWER_SLOPE      0.3922
2150
-  //#define SPEED_POWER_INTERCEPT  0
2151
-  //#define SPEED_POWER_MIN       10
2152
-  //#define SPEED_POWER_MAX      100      // 0-100%
2137
+    /**
2138
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2139
+     *
2140
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2141
+     *    where PWM duty cycle varies from 0 to 255
2142
+     *
2143
+     *  set the following for your controller (ALL MUST BE SET)
2144
+     */
2145
+    #define SPEED_POWER_SLOPE    118.4
2146
+    #define SPEED_POWER_INTERCEPT  0
2147
+    #define SPEED_POWER_MIN     5000
2148
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2149
+  #else
2150
+    #define SPEED_POWER_SLOPE      0.3922
2151
+    #define SPEED_POWER_INTERCEPT  0
2152
+    #define SPEED_POWER_MIN       10
2153
+    #define SPEED_POWER_MAX      100    // 0-100%
2154
+  #endif
2153 2155
 #endif
2154 2156
 
2155 2157
 /**

+ 27
- 25
config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Formbot/Raptor/Configuration_adv.h View File

@@ -2123,36 +2123,38 @@
2123 2123
  *
2124 2124
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2125 2125
  */
2126
-//#define SPINDLE_LASER_ENABLE
2127
-#if ENABLED(SPINDLE_LASER_ENABLE)
2128
-
2129
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2130
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2126
+//#define SPINDLE_FEATURE
2127
+//#define LASER_FEATURE
2128
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2129
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2130
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2131 2131
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2132 2132
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2133 2133
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2134
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2135
-  #define SPINDLE_INVERT_DIR            false
2136
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2137
-
2138
-  /**
2139
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
-   *
2141
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
-   *    where PWM duty cycle varies from 0 to 255
2143
-   *
2144
-   *  set the following for your controller (ALL MUST BE SET)
2145
-   */
2146 2134
 
2147
-  #define SPEED_POWER_SLOPE    118.4
2148
-  #define SPEED_POWER_INTERCEPT  0
2149
-  #define SPEED_POWER_MIN     5000
2150
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2135
+  #if ENABLED(SPINDLE_FEATURE)
2136
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2137
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2138
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2151 2139
 
2152
-  //#define SPEED_POWER_SLOPE      0.3922
2153
-  //#define SPEED_POWER_INTERCEPT  0
2154
-  //#define SPEED_POWER_MIN       10
2155
-  //#define SPEED_POWER_MAX      100      // 0-100%
2140
+    /**
2141
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2142
+     *
2143
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2144
+     *    where PWM duty cycle varies from 0 to 255
2145
+     *
2146
+     *  set the following for your controller (ALL MUST BE SET)
2147
+     */
2148
+    #define SPEED_POWER_SLOPE    118.4
2149
+    #define SPEED_POWER_INTERCEPT  0
2150
+    #define SPEED_POWER_MIN     5000
2151
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2152
+  #else
2153
+    #define SPEED_POWER_SLOPE      0.3922
2154
+    #define SPEED_POWER_INTERCEPT  0
2155
+    #define SPEED_POWER_MIN       10
2156
+    #define SPEED_POWER_MAX      100    // 0-100%
2157
+  #endif
2156 2158
 #endif
2157 2159
 
2158 2160
 /**

+ 27
- 25
config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

@@ -2125,36 +2125,38 @@
2125 2125
  *
2126 2126
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2127 2127
  */
2128
-//#define SPINDLE_LASER_ENABLE
2129
-#if ENABLED(SPINDLE_LASER_ENABLE)
2130
-
2131
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2132
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2128
+//#define SPINDLE_FEATURE
2129
+//#define LASER_FEATURE
2130
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2131
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2132
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2133 2133
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2134 2134
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2135 2135
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2136
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2137
-  #define SPINDLE_INVERT_DIR            false
2138
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2139
-
2140
-  /**
2141
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2142
-   *
2143
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2144
-   *    where PWM duty cycle varies from 0 to 255
2145
-   *
2146
-   *  set the following for your controller (ALL MUST BE SET)
2147
-   */
2148 2136
 
2149
-  #define SPEED_POWER_SLOPE    118.4
2150
-  #define SPEED_POWER_INTERCEPT  0
2151
-  #define SPEED_POWER_MIN     5000
2152
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2137
+  #if ENABLED(SPINDLE_FEATURE)
2138
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2139
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2140
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2153 2141
 
2154
-  //#define SPEED_POWER_SLOPE      0.3922
2155
-  //#define SPEED_POWER_INTERCEPT  0
2156
-  //#define SPEED_POWER_MIN       10
2157
-  //#define SPEED_POWER_MAX      100      // 0-100%
2142
+    /**
2143
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2144
+     *
2145
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2146
+     *    where PWM duty cycle varies from 0 to 255
2147
+     *
2148
+     *  set the following for your controller (ALL MUST BE SET)
2149
+     */
2150
+    #define SPEED_POWER_SLOPE    118.4
2151
+    #define SPEED_POWER_INTERCEPT  0
2152
+    #define SPEED_POWER_MIN     5000
2153
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2154
+  #else
2155
+    #define SPEED_POWER_SLOPE      0.3922
2156
+    #define SPEED_POWER_INTERCEPT  0
2157
+    #define SPEED_POWER_MIN       10
2158
+    #define SPEED_POWER_MAX      100    // 0-100%
2159
+  #endif
2158 2160
 #endif
2159 2161
 
2160 2162
 /**

+ 27
- 25
config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

@@ -2125,36 +2125,38 @@
2125 2125
  *
2126 2126
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2127 2127
  */
2128
-//#define SPINDLE_LASER_ENABLE
2129
-#if ENABLED(SPINDLE_LASER_ENABLE)
2130
-
2131
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2132
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2128
+//#define SPINDLE_FEATURE
2129
+//#define LASER_FEATURE
2130
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2131
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2132
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2133 2133
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2134 2134
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2135 2135
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2136
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2137
-  #define SPINDLE_INVERT_DIR            false
2138
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2139
-
2140
-  /**
2141
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2142
-   *
2143
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2144
-   *    where PWM duty cycle varies from 0 to 255
2145
-   *
2146
-   *  set the following for your controller (ALL MUST BE SET)
2147
-   */
2148 2136
 
2149
-  #define SPEED_POWER_SLOPE    118.4
2150
-  #define SPEED_POWER_INTERCEPT  0
2151
-  #define SPEED_POWER_MIN     5000
2152
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2137
+  #if ENABLED(SPINDLE_FEATURE)
2138
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2139
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2140
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2153 2141
 
2154
-  //#define SPEED_POWER_SLOPE      0.3922
2155
-  //#define SPEED_POWER_INTERCEPT  0
2156
-  //#define SPEED_POWER_MIN       10
2157
-  //#define SPEED_POWER_MAX      100      // 0-100%
2142
+    /**
2143
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2144
+     *
2145
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2146
+     *    where PWM duty cycle varies from 0 to 255
2147
+     *
2148
+     *  set the following for your controller (ALL MUST BE SET)
2149
+     */
2150
+    #define SPEED_POWER_SLOPE    118.4
2151
+    #define SPEED_POWER_INTERCEPT  0
2152
+    #define SPEED_POWER_MIN     5000
2153
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2154
+  #else
2155
+    #define SPEED_POWER_SLOPE      0.3922
2156
+    #define SPEED_POWER_INTERCEPT  0
2157
+    #define SPEED_POWER_MIN       10
2158
+    #define SPEED_POWER_MAX      100    // 0-100%
2159
+  #endif
2158 2160
 #endif
2159 2161
 
2160 2162
 /**

+ 27
- 25
config/examples/Fysetc/AIO_II/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Fysetc/CHEETAH/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Fysetc/F6_13/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Geeetech/A10/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Geeetech/A10M/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Geeetech/A20M/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

@@ -2120,36 +2120,38 @@
2120 2120
  *
2121 2121
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2122 2122
  */
2123
-//#define SPINDLE_LASER_ENABLE
2124
-#if ENABLED(SPINDLE_LASER_ENABLE)
2125
-
2126
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2127
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2123
+//#define SPINDLE_FEATURE
2124
+//#define LASER_FEATURE
2125
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2126
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2127
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2128 2128
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2129 2129
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2130 2130
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2131
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2132
-  #define SPINDLE_INVERT_DIR            false
2133
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2134
-
2135
-  /**
2136
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2137
-   *
2138
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2139
-   *    where PWM duty cycle varies from 0 to 255
2140
-   *
2141
-   *  set the following for your controller (ALL MUST BE SET)
2142
-   */
2143 2131
 
2144
-  #define SPEED_POWER_SLOPE    118.4
2145
-  #define SPEED_POWER_INTERCEPT  0
2146
-  #define SPEED_POWER_MIN     5000
2147
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2132
+  #if ENABLED(SPINDLE_FEATURE)
2133
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2134
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2135
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2148 2136
 
2149
-  //#define SPEED_POWER_SLOPE      0.3922
2150
-  //#define SPEED_POWER_INTERCEPT  0
2151
-  //#define SPEED_POWER_MIN       10
2152
-  //#define SPEED_POWER_MAX      100      // 0-100%
2137
+    /**
2138
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2139
+     *
2140
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2141
+     *    where PWM duty cycle varies from 0 to 255
2142
+     *
2143
+     *  set the following for your controller (ALL MUST BE SET)
2144
+     */
2145
+    #define SPEED_POWER_SLOPE    118.4
2146
+    #define SPEED_POWER_INTERCEPT  0
2147
+    #define SPEED_POWER_MIN     5000
2148
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2149
+  #else
2150
+    #define SPEED_POWER_SLOPE      0.3922
2151
+    #define SPEED_POWER_INTERCEPT  0
2152
+    #define SPEED_POWER_MIN       10
2153
+    #define SPEED_POWER_MAX      100    // 0-100%
2154
+  #endif
2153 2155
 #endif
2154 2156
 
2155 2157
 /**

+ 27
- 25
config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/JGAurora/A1/Configuration_adv.h View File

@@ -2126,36 +2126,38 @@
2126 2126
  *
2127 2127
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2128 2128
  */
2129
-//#define SPINDLE_LASER_ENABLE
2130
-#if ENABLED(SPINDLE_LASER_ENABLE)
2131
-
2132
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2133
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2129
+//#define SPINDLE_FEATURE
2130
+//#define LASER_FEATURE
2131
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2132
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2133
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2134 2134
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2135 2135
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2136 2136
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2137
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2138
-  #define SPINDLE_INVERT_DIR            false
2139
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2140
-
2141
-  /**
2142
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2143
-   *
2144
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2145
-   *    where PWM duty cycle varies from 0 to 255
2146
-   *
2147
-   *  set the following for your controller (ALL MUST BE SET)
2148
-   */
2149 2137
 
2150
-  #define SPEED_POWER_SLOPE    118.4
2151
-  #define SPEED_POWER_INTERCEPT  0
2152
-  #define SPEED_POWER_MIN     5000
2153
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2138
+  #if ENABLED(SPINDLE_FEATURE)
2139
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2140
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2141
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2154 2142
 
2155
-  //#define SPEED_POWER_SLOPE      0.3922
2156
-  //#define SPEED_POWER_INTERCEPT  0
2157
-  //#define SPEED_POWER_MIN       10
2158
-  //#define SPEED_POWER_MAX      100      // 0-100%
2143
+    /**
2144
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2145
+     *
2146
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2147
+     *    where PWM duty cycle varies from 0 to 255
2148
+     *
2149
+     *  set the following for your controller (ALL MUST BE SET)
2150
+     */
2151
+    #define SPEED_POWER_SLOPE    118.4
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN     5000
2154
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2155
+  #else
2156
+    #define SPEED_POWER_SLOPE      0.3922
2157
+    #define SPEED_POWER_INTERCEPT  0
2158
+    #define SPEED_POWER_MIN       10
2159
+    #define SPEED_POWER_MAX      100    // 0-100%
2160
+  #endif
2159 2161
 #endif
2160 2162
 
2161 2163
 /**

+ 27
- 25
config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/JGAurora/A5S/Configuration_adv.h View File

@@ -2126,36 +2126,38 @@
2126 2126
  *
2127 2127
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2128 2128
  */
2129
-//#define SPINDLE_LASER_ENABLE
2130
-#if ENABLED(SPINDLE_LASER_ENABLE)
2131
-
2132
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2133
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2129
+//#define SPINDLE_FEATURE
2130
+//#define LASER_FEATURE
2131
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2132
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2133
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2134 2134
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2135 2135
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2136 2136
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2137
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2138
-  #define SPINDLE_INVERT_DIR            false
2139
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2140
-
2141
-  /**
2142
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2143
-   *
2144
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2145
-   *    where PWM duty cycle varies from 0 to 255
2146
-   *
2147
-   *  set the following for your controller (ALL MUST BE SET)
2148
-   */
2149 2137
 
2150
-  #define SPEED_POWER_SLOPE    118.4
2151
-  #define SPEED_POWER_INTERCEPT  0
2152
-  #define SPEED_POWER_MIN     5000
2153
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2138
+  #if ENABLED(SPINDLE_FEATURE)
2139
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2140
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2141
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2154 2142
 
2155
-  //#define SPEED_POWER_SLOPE      0.3922
2156
-  //#define SPEED_POWER_INTERCEPT  0
2157
-  //#define SPEED_POWER_MIN       10
2158
-  //#define SPEED_POWER_MAX      100      // 0-100%
2143
+    /**
2144
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2145
+     *
2146
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2147
+     *    where PWM duty cycle varies from 0 to 255
2148
+     *
2149
+     *  set the following for your controller (ALL MUST BE SET)
2150
+     */
2151
+    #define SPEED_POWER_SLOPE    118.4
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN     5000
2154
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2155
+  #else
2156
+    #define SPEED_POWER_SLOPE      0.3922
2157
+    #define SPEED_POWER_INTERCEPT  0
2158
+    #define SPEED_POWER_MIN       10
2159
+    #define SPEED_POWER_MAX      100    // 0-100%
2160
+  #endif
2159 2161
 #endif
2160 2162
 
2161 2163
 /**

+ 27
- 25
config/examples/MakerParts/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Malyan/M150/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Malyan/M200/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Mks/Robin/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -2122,36 +2122,38 @@
2122 2122
  *
2123 2123
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2124 2124
  */
2125
-//#define SPINDLE_LASER_ENABLE
2126
-#if ENABLED(SPINDLE_LASER_ENABLE)
2127
-
2128
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2129
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2125
+//#define SPINDLE_FEATURE
2126
+//#define LASER_FEATURE
2127
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2128
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2129
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2130 2130
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2131 2131
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2132 2132
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2133
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2134
-  #define SPINDLE_INVERT_DIR            false
2135
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2136
-
2137
-  /**
2138
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2139
-   *
2140
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2141
-   *    where PWM duty cycle varies from 0 to 255
2142
-   *
2143
-   *  set the following for your controller (ALL MUST BE SET)
2144
-   */
2145 2133
 
2146
-  #define SPEED_POWER_SLOPE    118.4
2147
-  #define SPEED_POWER_INTERCEPT  0
2148
-  #define SPEED_POWER_MIN     5000
2149
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2134
+  #if ENABLED(SPINDLE_FEATURE)
2135
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2136
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2137
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2150 2138
 
2151
-  //#define SPEED_POWER_SLOPE      0.3922
2152
-  //#define SPEED_POWER_INTERCEPT  0
2153
-  //#define SPEED_POWER_MIN       10
2154
-  //#define SPEED_POWER_MAX      100      // 0-100%
2139
+    /**
2140
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2141
+     *
2142
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2143
+     *    where PWM duty cycle varies from 0 to 255
2144
+     *
2145
+     *  set the following for your controller (ALL MUST BE SET)
2146
+     */
2147
+    #define SPEED_POWER_SLOPE    118.4
2148
+    #define SPEED_POWER_INTERCEPT  0
2149
+    #define SPEED_POWER_MIN     5000
2150
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2151
+  #else
2152
+    #define SPEED_POWER_SLOPE      0.3922
2153
+    #define SPEED_POWER_INTERCEPT  0
2154
+    #define SPEED_POWER_MIN       10
2155
+    #define SPEED_POWER_MAX      100    // 0-100%
2156
+  #endif
2155 2157
 #endif
2156 2158
 
2157 2159
 /**

+ 27
- 25
config/examples/RapideLite/RL200/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/RigidBot/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 27
- 25
config/examples/SCARA/Configuration_adv.h View File

@@ -2121,36 +2121,38 @@
2121 2121
  *
2122 2122
  * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2123 2123
  */
2124
-//#define SPINDLE_LASER_ENABLE
2125
-#if ENABLED(SPINDLE_LASER_ENABLE)
2126
-
2127
-  #define SPINDLE_LASER_ENABLE_INVERT   false  // Set to "true" if the on/off function is reversed
2128
-  #define SPINDLE_LASER_PWM             true   // Set to true if your controller supports setting the speed/power
2124
+//#define SPINDLE_FEATURE
2125
+//#define LASER_FEATURE
2126
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2127
+  #define SPINDLE_LASER_ACTIVE_HIGH     false  // Set to "true" if the on/off function is active HIGH
2128
+  #define SPINDLE_LASER_PWM             true   // Set to "true" if your controller supports setting the speed/power
2129 2129
   #define SPINDLE_LASER_PWM_INVERT      true   // Set to "true" if the speed/power goes up when you want it to go slower
2130 2130
   #define SPINDLE_LASER_POWERUP_DELAY   5000   // (ms) Delay to allow the spindle/laser to come up to speed/power
2131 2131
   #define SPINDLE_LASER_POWERDOWN_DELAY 5000   // (ms) Delay to allow the spindle to stop
2132
-  #define SPINDLE_DIR_CHANGE            true   // Set to true if your spindle controller supports changing spindle direction
2133
-  #define SPINDLE_INVERT_DIR            false
2134
-  #define SPINDLE_STOP_ON_DIR_CHANGE    true   // Set to true if Marlin should stop the spindle before changing rotation direction
2135
-
2136
-  /**
2137
-   *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2138
-   *
2139
-   *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2140
-   *    where PWM duty cycle varies from 0 to 255
2141
-   *
2142
-   *  set the following for your controller (ALL MUST BE SET)
2143
-   */
2144 2132
 
2145
-  #define SPEED_POWER_SLOPE    118.4
2146
-  #define SPEED_POWER_INTERCEPT  0
2147
-  #define SPEED_POWER_MIN     5000
2148
-  #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2133
+  #if ENABLED(SPINDLE_FEATURE)
2134
+    //#define SPINDLE_CHANGE_DIR               // Enable if your spindle controller can change spindle direction
2135
+    #define SPINDLE_CHANGE_DIR_STOP            // Enable if the spindle should stop before changing spin direction
2136
+    #define SPINDLE_INVERT_DIR          false  // Set to "true" if the spin direction is reversed
2149 2137
 
2150
-  //#define SPEED_POWER_SLOPE      0.3922
2151
-  //#define SPEED_POWER_INTERCEPT  0
2152
-  //#define SPEED_POWER_MIN       10
2153
-  //#define SPEED_POWER_MAX      100      // 0-100%
2138
+    /**
2139
+     *  The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
2140
+     *
2141
+     *  SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
2142
+     *    where PWM duty cycle varies from 0 to 255
2143
+     *
2144
+     *  set the following for your controller (ALL MUST BE SET)
2145
+     */
2146
+    #define SPEED_POWER_SLOPE    118.4
2147
+    #define SPEED_POWER_INTERCEPT  0
2148
+    #define SPEED_POWER_MIN     5000
2149
+    #define SPEED_POWER_MAX    30000    // SuperPID router controller 0 - 30,000 RPM
2150
+  #else
2151
+    #define SPEED_POWER_SLOPE      0.3922
2152
+    #define SPEED_POWER_INTERCEPT  0
2153
+    #define SPEED_POWER_MIN       10
2154
+    #define SPEED_POWER_MAX      100    // 0-100%
2155
+  #endif
2154 2156
 #endif
2155 2157
 
2156 2158
 /**

+ 0
- 0
config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save