浏览代码

🩹 Allow M42 S0/1 analogWrite on PWM pins (STM32) (#22631)

Tanguy Pruvot 3 年前
父节点
当前提交
9a9d55ceb0
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/src/gcode/control/M42.cpp

+ 1
- 1
Marlin/src/gcode/control/M42.cpp 查看文件

@@ -127,7 +127,7 @@ void GcodeSuite::M42() {
127 127
 
128 128
   #ifdef ARDUINO_ARCH_STM32
129 129
     // A simple I/O will be set to 0 by analogWrite()
130
-    if (pin_status <= 1) return;
130
+    if (pin_status <= 1 && !PWM_PIN(pin)) return;
131 131
   #endif
132 132
   analogWrite(pin, pin_status);
133 133
 }

正在加载...
取消
保存