|
@@ -515,7 +515,7 @@ int Temperature::getHeaterPower(int heater) {
|
515
|
515
|
#if HAS_AUTO_FAN
|
516
|
516
|
|
517
|
517
|
void Temperature::checkExtruderAutoFans() {
|
518
|
|
- static const int8_t fanPin[] PROGMEM = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN };
|
|
518
|
+ static const pin_t fanPin[] PROGMEM = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN };
|
519
|
519
|
static const uint8_t fanBit[] PROGMEM = {
|
520
|
520
|
0,
|
521
|
521
|
AUTO_1_IS_0 ? 0 : 1,
|
|
@@ -531,7 +531,11 @@ int Temperature::getHeaterPower(int heater) {
|
531
|
531
|
|
532
|
532
|
uint8_t fanDone = 0;
|
533
|
533
|
for (uint8_t f = 0; f < COUNT(fanPin); f++) {
|
534
|
|
- int8_t pin = pgm_read_byte(&fanPin[f]);
|
|
534
|
+ #ifdef ARDUINO
|
|
535
|
+ pin_t pin = pgm_read_byte(&fanPin[f]);
|
|
536
|
+ #else
|
|
537
|
+ pin_t pin = fanPin[f];
|
|
538
|
+ #endif
|
535
|
539
|
const uint8_t bit = pgm_read_byte(&fanBit[f]);
|
536
|
540
|
if (pin >= 0 && !TEST(fanDone, bit)) {
|
537
|
541
|
uint8_t newFanSpeed = TEST(fanState, bit) ? EXTRUDER_AUTO_FAN_SPEED : 0;
|