Use uint8_t for all fan speeds (#12032)

This commit is contained in:
Scott Lahteine
2018-10-07 15:34:41 -05:00
committed by GitHub
parent cb7844c8d4
commit d6b0fbd771
25 changed files with 88 additions and 91 deletions

View File

@@ -27,7 +27,7 @@
#include "../module/stepper_indirection.h"
#include "../module/temperature.h"
uint8_t controllerFanSpeed;
uint8_t controllerfan_speed;
void controllerfan_update() {
static millis_t lastMotorOn = 0, // Last time a motor was turned on
@@ -75,7 +75,7 @@ void controllerfan_update() {
// Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds
uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
controllerFanSpeed = speed;
controllerfan_speed = speed;
// allows digital or PWM fan output to be used (see M42 handling)
WRITE(CONTROLLER_FAN_PIN, speed);