Fix call to uninitialized PWM pin, heater 2 overlap (#13674)
This commit is contained in:
parent
6a71df2925
commit
aa0f7afbe6
|
@ -74,7 +74,9 @@ inline void delay_for_power_down() { safe_delay(SPINDLE_LASER_POWERDOWN_DELAY);
|
|||
|
||||
inline void set_spindle_laser_ocr(const uint8_t ocr) {
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low)
|
||||
analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
#define LED_PIN 13
|
||||
#endif
|
||||
|
||||
#define SPINDLE_LASER_PWM_PIN 7 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_LASER_PWM_PIN -1 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup!
|
||||
|
||||
// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
|
||||
|
|
Loading…
Reference in a new issue