⚗️ Use pwm_set_duty over analogWrite to set PWM (#23048)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Andrei M
2021-11-02 01:47:16 -04:00
committed by GitHub
parent 767a15d468
commit da830e6ced
26 changed files with 159 additions and 126 deletions

View File

@@ -1342,7 +1342,7 @@ void Endstops::update() {
ES_REPORT_CHANGE(K_MAX);
#endif
SERIAL_ECHOLNPGM("\n");
analogWrite(pin_t(LED_PIN), local_LED_status);
set_pwm_duty(pin_t(LED_PIN), local_LED_status);
local_LED_status ^= 255;
old_live_state_local = live_state_local;
}