From da7255f8f487601539444c005b50ee623062484a Mon Sep 17 00:00:00 2001 From: ansonl Date: Thu, 6 Jan 2022 17:18:15 -0500 Subject: [PATCH] Updated ULTIMAIN_2 board extruder cooling fan pin and clean up temperature.cpp Set extruder cooling fan to fastio pin 77 which maps to atmega2560 pin 69 PJ6. PJ6 has no Arduino mapping but is mapped in fastio_1280.h --- Marlin/src/module/temperature.cpp | 10 ---------- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index f7d53b6da7c3..4078c8a020b2 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -888,16 +888,6 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { HOTEND_LOOP() { if (temp_hotend[e].celsius >= EXTRUDER_AUTO_FAN_TEMPERATURE) { SBI(fanState, pgm_read_byte(&fanBit[e])); - #if MOTHERBOARD == BOARD_ULTIMAIN_2 - // For the UM2 the head fan is connected to PJ6, which does not have an Arduino PIN definition. So use direct register access. - // https://github.com/Ultimaker/Ultimaker2Marlin/blob/master/Marlin/temperature.cpp#L553 - SBI(DDRJ, 6); SBI(PORTJ, 6); - #endif - } - else { - #if MOTHERBOARD == BOARD_ULTIMAIN_2 - SBI(DDRJ, 6); CBI(PORTJ, 6); - #endif } } diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index 9823d4cf4b75..128f1974e0e6 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -98,7 +98,7 @@ #endif #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN 69 + #define E0_AUTO_FAN_PIN 77 #endif //