From 2b55f27ea1038077b19fe2051386a462925a8030 Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Mon, 3 Apr 2023 00:21:01 +0300 Subject: [PATCH 1/2] fix SPINDLE_LASER_ENA_PIN when SPINDLE_LASER_ENA_PIN = 0 fix SPINDLE_LASER_ENA_PIN is ignored when SPINDLE_LASER_ENA_PIN = 0 ( PA0, as example) --- Marlin/src/feature/spindle_laser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index a49e5611a4a9..6e099730bebe 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -210,7 +210,7 @@ class SpindleLaser { enable = false; apply_power(0); } - #if SPINDLE_LASER_ENA_PIN + #if defined(SPINDLE_LASER_ENA_PIN) WRITE(SPINDLE_LASER_ENA_PIN, enable ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE); #endif enable_state = enable; From 3c9bd294dc65140ead77eec2defa2aedd7963ba6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 16 Apr 2023 18:36:56 -0500 Subject: [PATCH 2/2] PIN_EXISTS --- Marlin/src/feature/spindle_laser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 6e099730bebe..e7fafddcfe24 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -210,7 +210,7 @@ class SpindleLaser { enable = false; apply_power(0); } - #if defined(SPINDLE_LASER_ENA_PIN) + #if PIN_EXISTS(SPINDLE_LASER_ENA) WRITE(SPINDLE_LASER_ENA_PIN, enable ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE); #endif enable_state = enable;