diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 90ab4d58afad..1098351d4e97 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -329,8 +329,10 @@ #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN #define AUTO_POWER_CHAMBER_FAN + #define AUTO_POWER_COOLER_FAN //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU if any extruder is over this temperature //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU if the chamber is over this temperature + //#define AUTO_POWER_COOLER_TEMP 26 // (°C) Turn on PSU if the cooler is over this temperature #define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration //#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time. #endif @@ -418,6 +420,7 @@ #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 +#define TEMP_SENSOR_COOLER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -473,6 +476,15 @@ #define BED_MAXTEMP 150 #define CHAMBER_MAXTEMP 60 +/** + * Thermal Overshoot + * During heatup (and printing) the temperature can often "overshoot" the target by many degrees + * (especially before PID tuning). Setting the target temperature too close to MAXTEMP guarantees + * a MAXTEMP shutdown! Use these values to forbid temperatures being set too close to MAXTEMP. + */ +#define HOTEND_OVERSHOOT 15 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT +#define BED_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT + //=========================================================================== //============================= PID Settings ================================ //=========================================================================== @@ -636,6 +648,7 @@ #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders #define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed #define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber +#define THERMAL_PROTECTION_COOLER // Enable thermal protection for the laser cooling //=========================================================================== //============================= Mechanical Settings ========================= diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8bbc50bee45c..3168e9a00104 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -113,6 +113,12 @@ #define CHAMBER_BETA 3950 // Beta value #endif +#if TEMP_SENSOR_COOLER == 1000 + #define COOLER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define COOLER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define COOLER_BETA 3950 // Beta value +#endif + #if TEMP_SENSOR_PROBE == 1000 #define PROBE_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor #define PROBE_RESISTANCE_25C_OHMS 100000 // Resistance at 25C @@ -179,6 +185,25 @@ #endif #endif +// +// Laser Cooler options +// +#if TEMP_SENSOR_COOLER + #define COOLER_MINTEMP 8 // (°C) + #define COOLER_MAXTEMP 26 // (°C) + #define COOLER_DEFAULT_TEMP 16 // (°C) + #define TEMP_COOLER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + #define COOLER_PIN 8 // Laser cooler on/off pin used to control power to the cooling element e.g. TEC, External chiller via relay + #define COOLER_INVERTING false + #define TEMP_COOLER_PIN 15 // Laser/Cooler temperature sensor pin. ADC is required. + #define COOLER_FAN // Enable a fan on the cooler, Fan# 0,1,2,3 etc. + #define COOLER_FAN_INDEX 0 // FAN number 0, 1, 2 etc. e.g. + #if ENABLED(COOLER_FAN) + #define COOLER_FAN_BASE 100 // Base Cooler fan PWM (0-255); turns on when Cooler temperature is above the target + #define COOLER_FAN_FACTOR 25 // PWM increase per °C above target + #endif +#endif + /** * Thermal Protection provides additional protection to your printer from damage * and fire. Marlin always includes safe min and max temperature ranges which @@ -248,6 +273,20 @@ #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius #endif +/** + * Thermal Protection parameters for the laser cooler. + */ +#if ENABLED(THERMAL_PROTECTION_COOLER) + #define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds + #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius + + /** + * Laser cooling watch settings (M143/M193). + */ + #define WATCH_COOLER_TEMP_PERIOD 60 // Seconds + #define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius +#endif + #if ENABLED(PIDTEMP) // Add an experimental additional term to the heater power, proportional to the extrusion speed. // A well-chosen Kc value should add just enough power to melt the increased material volume. @@ -493,11 +532,15 @@ #define E6_AUTO_FAN_PIN -1 #define E7_AUTO_FAN_PIN -1 #define CHAMBER_AUTO_FAN_PIN -1 +#define COOLER_AUTO_FAN_PIN -1 +#define COOLER_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed #define CHAMBER_AUTO_FAN_TEMPERATURE 30 #define CHAMBER_AUTO_FAN_SPEED 255 +#define COOLER_AUTO_FAN_TEMPERATURE 18 +#define COOLER_AUTO_FAN_SPEED 255 /** * Part-Cooling Fan Multiplexer @@ -1495,6 +1538,7 @@ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating //#define STATUS_CUTTER_ANIM // Use a second bitmap to indicate spindle / laser active + //#define STATUS_COOLER_ANIM // Use a second bitmap to indicate laser cooling //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames diff --git a/Marlin/src/HAL/AVR/fastio.h b/Marlin/src/HAL/AVR/fastio.h index dd0163466110..cf704179c896 100644 --- a/Marlin/src/HAL/AVR/fastio.h +++ b/Marlin/src/HAL/AVR/fastio.h @@ -285,7 +285,7 @@ enum ClockSource2 : char { */ // Determine which harware PWMs are already in use -#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN) +#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN) #if PIN_EXISTS(CONTROLLER_FAN) #define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN) #else diff --git a/Marlin/src/HAL/ESP32/HAL.cpp b/Marlin/src/HAL/ESP32/HAL.cpp index fb5f531b22aa..ab28595071b2 100644 --- a/Marlin/src/HAL/ESP32/HAL.cpp +++ b/Marlin/src/HAL/ESP32/HAL.cpp @@ -185,6 +185,7 @@ void HAL_adc_init() { TERN_(HAS_TEMP_ADC_7, adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db)); TERN_(HAS_HEATED_BED, adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db)); TERN_(HAS_TEMP_CHAMBER, adc1_set_attenuation(get_channel(TEMP_CHAMBER_PIN), ADC_ATTEN_11db)); + TERN_(HAS_TEMP_COOLER, adc1_set_attenuation(get_channel(TEMP_COOLER_PIN), ADC_ATTEN_11db)); TERN_(FILAMENT_WIDTH_SENSOR, adc1_set_attenuation(get_channel(FILWIDTH_PIN), ADC_ATTEN_11db)); // Note that adc2 is shared with the WiFi module, which has higher priority, so the conversion may fail. diff --git a/Marlin/src/HAL/SAMD51/HAL.cpp b/Marlin/src/HAL/SAMD51/HAL.cpp index 17e89c723ff1..4a6100b96b94 100644 --- a/Marlin/src/HAL/SAMD51/HAL.cpp +++ b/Marlin/src/HAL/SAMD51/HAL.cpp @@ -57,6 +57,7 @@ #define GET_PROBE_ADC() TERN(HAS_TEMP_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1) #define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1) #define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1) +#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1) #define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1) #define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1) @@ -66,6 +67,7 @@ || GET_PROBE_ADC() == n \ || GET_BED_ADC() == n \ || GET_CHAMBER_ADC() == n \ + || GET_COOLER_ADC() == n \ || GET_FILAMENT_WIDTH_ADC() == n \ || GET_BUTTONS_ADC() == n \ ) @@ -144,6 +146,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 0 TEMP_CHAMBER_PIN, #endif + #if GET_COOLER_ADC() == 0 + TEMP_COOLER_PIN, + #endif #if GET_FILAMENT_WIDTH_ADC() == 0 FILWIDTH_PIN, #endif @@ -184,6 +189,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 1 TEMP_CHAMBER_PIN, #endif + #if GET_COOLER_ADC() == 1 + TEMP_COOLER_PIN, + #endif #if GET_FILAMENT_WIDTH_ADC() == 1 FILWIDTH_PIN, #endif @@ -232,6 +240,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 0 { PIN_TO_INPUTCTRL(TEMP_CHAMBER_PIN) }, #endif + #if GET_COOLER_ADC() == 0 + { PIN_TO_INPUTCTRL(TEMP_COOLER_PIN) }, + #endif #if GET_FILAMENT_WIDTH_ADC() == 0 { PIN_TO_INPUTCTRL(FILWIDTH_PIN) }, #endif @@ -281,6 +292,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 1 { PIN_TO_INPUTCTRL(TEMP_CHAMBER_PIN) }, #endif + #if GET_COOLER_ADC() == 1 + { PIN_TO_INPUTCTRL(TEMP_COOLER_PIN) }, + #endif #if GET_FILAMENT_WIDTH_ADC() == 1 { PIN_TO_INPUTCTRL(FILWIDTH_PIN) }, #endif diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index 020c623b77a9..182d9401c1c1 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -132,6 +132,9 @@ const uint8_t adc_pins[] = { #if HAS_TEMP_CHAMBER TEMP_CHAMBER_PIN, #endif + #if HAS_TEMP_COOLER + TEMP_COOLER_PIN, + #endif #if HAS_TEMP_ADC_1 TEMP_1_PIN, #endif @@ -189,6 +192,9 @@ enum TempPinIndex : char { #if HAS_TEMP_CHAMBER TEMP_CHAMBER, #endif + #if HAS_TEMP_COOLER + TEMP_COOLER_PIN, + #endif #if HAS_TEMP_ADC_1 TEMP_1, #endif @@ -385,6 +391,9 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { #if HAS_TEMP_CHAMBER case TEMP_CHAMBER_PIN: pin_index = TEMP_CHAMBER; break; #endif + #if HAS_TEMP_COOLER + case TEMP_COOLER_PIN: pin_index = TEMP_COOLER; break; + #endif #if HAS_TEMP_ADC_1 case TEMP_1_PIN: pin_index = TEMP_1; break; #endif diff --git a/Marlin/src/HAL/STM32F1/msc_sd.cpp b/Marlin/src/HAL/STM32F1/msc_sd.cpp index a91618499995..1e2fe8817468 100644 --- a/Marlin/src/HAL/STM32F1/msc_sd.cpp +++ b/Marlin/src/HAL/STM32F1/msc_sd.cpp @@ -43,26 +43,27 @@ Serial0Type MarlinCompositeSerial(true); #if ENABLED(EMERGENCY_PARSER) -// The original callback is not called (no way to retrieve address). -// That callback detects a special STM32 reset sequence: this functionality is not essential -// as M997 achieves the same. -void my_rx_callback(unsigned int, void*) { - // max length of 16 is enough to contain all emergency commands - uint8 buf[16]; + // The original callback is not called (no way to retrieve address). + // That callback detects a special STM32 reset sequence: this functionality is not essential + // as M997 achieves the same. + void my_rx_callback(unsigned int, void*) { + // max length of 16 is enough to contain all emergency commands + uint8 buf[16]; - //rx is usbSerialPart.endpoints[2] - uint16 len = usb_get_ep_rx_count(usbSerialPart.endpoints[2].address); - uint32 total = composite_cdcacm_data_available(); + //rx is usbSerialPart.endpoints[2] + uint16 len = usb_get_ep_rx_count(usbSerialPart.endpoints[2].address); + uint32 total = composite_cdcacm_data_available(); - if (len == 0 || total == 0 || !WITHIN(total, len, COUNT(buf))) - return; + if (len == 0 || total == 0 || !WITHIN(total, len, COUNT(buf))) + return; - // cannot get character by character due to bug in composite_cdcacm_peek_ex - len = composite_cdcacm_peek(buf, total); + // cannot get character by character due to bug in composite_cdcacm_peek_ex + len = composite_cdcacm_peek(buf, total); + + for (uint32 i = 0; i < len; i++) + emergency_parser.update(MarlinCompositeSerial.emergency_state, buf[i+total-len]); + } - for (uint32 i = 0; i < len; i++) - emergency_parser.update(MarlinCompositeSerial.emergency_state, buf[i+total-len]); -} #endif void MSC_SD_init() { @@ -87,7 +88,7 @@ void MSC_SD_init() { MarlinCompositeSerial.registerComponent(); USBComposite.begin(); #if ENABLED(EMERGENCY_PARSER) - composite_cdcacm_set_hooks(USBHID_CDCACM_HOOK_RX, my_rx_callback); + composite_cdcacm_set_hooks(USBHID_CDCACM_HOOK_RX, my_rx_callback); #endif } diff --git a/Marlin/src/core/debug_out.h b/Marlin/src/core/debug_out.h index d93decf7acc2..a7dc32622d1e 100644 --- a/Marlin/src/core/debug_out.h +++ b/Marlin/src/core/debug_out.h @@ -27,7 +27,7 @@ // #undef DEBUG_SECTION -#undef DEBUG_PRINT_P +#undef DEBUG_ECHOPGM_P #undef DEBUG_ECHO_START #undef DEBUG_ERROR_START #undef DEBUG_CHAR diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index c9c3fd015341..71e8ea524c7c 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -247,6 +247,8 @@ #define STR_HEATER_BED "bed" #define STR_HEATER_CHAMBER "chamber" +#define STR_COOLER "cooler" +#define STR_LASER_TEMP "laser temperature" #define STR_STOPPED_HEATER ", system stopped! Heater_ID: " #define STR_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !" diff --git a/Marlin/src/feature/cooler.cpp b/Marlin/src/feature/cooler.cpp new file mode 100644 index 000000000000..03640df487e8 --- /dev/null +++ b/Marlin/src/feature/cooler.cpp @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../inc/MarlinConfig.h" + +#if HAS_COOLER + +#include "cooler.h" +Cooler cooler; + +uint16_t Cooler::flowrate; // Flow meter reading in liters, 0 will result in shutdown if equiped +uint8_t Cooler::mode = 0; // 0 = CO2 Liquid cooling, 1 = Laser Diode TEC Heatsink Cooling +uint16_t Cooler::capacity; // Cooling capacity in watts +uint16_t Cooler::load; // Cooling load in watts +bool Cooler::flowmeter = false; +bool Cooler::state = false; // on = true, off = false + +#endif diff --git a/Marlin/src/feature/cooler.h b/Marlin/src/feature/cooler.h new file mode 100644 index 000000000000..42a95ccb63de --- /dev/null +++ b/Marlin/src/feature/cooler.h @@ -0,0 +1,50 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +#define _MSG_COOLER(M) MSG_COOLER_##M +#define MSG_COOLER(M) _MSG_COOLER(M) + +// Cooling device + +class Cooler { +public: + static uint16_t flowrate; // Flow meter reading in liters, 0 will result in shutdown if equiped + static uint8_t mode; // 0 = CO2 Liquid cooling, 1 = Laser Diode TEC Heatsink Cooling + static uint16_t capacity; // Cooling capacity in watts + static uint16_t load; // Cooling load in watts + static bool flowmeter; + static bool state; // on = true, off = false + + static bool is_enabled() { return state; } + static void enable() { state = true; } + static void disable() { state = false; } + static void set_mode(const uint8_t m) { mode = m; } + static void set_flowmeter(const bool sflag) { flowmeter = sflag; } + static uint16_t get_flowrate() { return flowrate; } + static void update_flowrate(uint16_t flow) { flowrate = flow; } + //static void init() { set_state(false); } +}; + +extern Cooler cooler; diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index d22247b46df4..8ab49de2bddc 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -61,6 +61,9 @@ bool Power::is_power_needed() { if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed)) return true; + if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed)) + return true; + // If any of the drivers or the bed are enabled... if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON #if HAS_X2_ENABLE @@ -89,6 +92,10 @@ bool Power::is_power_needed() { if (thermalManager.degChamber() >= AUTO_POWER_CHAMBER_TEMP) return true; #endif + #if HAS_COOLER && AUTO_POWER_COOLER_TEMP + if (thermalManager.degCooler() >= AUTO_POWER_COOLER_TEMP) return true; + #endif + return false; } diff --git a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp index 5d0bb0dc1e0d..8cfe6fee7b33 100644 --- a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp @@ -36,17 +36,7 @@ #include "../../module/temperature.h" #include "../../module/probe.h" #include "../../feature/probe_temp_comp.h" - #include "../../lcd/marlinui.h" -#include "../../MarlinCore.h" // for wait_for_heatup, idle() - -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENTS_LEDS) - #include "../../feature/leds/leds.h" -#endif /** * G76: calibrate probe and/or bed temperature offsets @@ -173,7 +163,6 @@ void GcodeSuite::G76() { remember_feedrate_scaling_off(); - /****************************************** * Calibrate bed temperature offsets ******************************************/ diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index e9a6d4aa2a52..34b8d767d159 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -539,6 +539,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 191: M191(); break; // M191: Wait for chamber temperature to reach target #endif + #if HAS_COOLER + case 143: M143(); break; // M143: Set cooler temperature + case 193: M193(); break; // M193: Wait for cooler temperature to reach target + #endif + #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) case 155: M155(); break; // M155: Set temperature auto-report interval #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 123b648f9031..52570ff83fa5 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -153,6 +153,7 @@ * M129 - EtoP Closed. (Requires BARICUDA) * M140 - Set bed target temp. S * M141 - Set heated chamber target temp. S (Requires a chamber heater) + * M143 - Set cooler target temp. S (Requires a laser cooling device) * M145 - Set heatup values for materials on the LCD. H B F for S (0=PLA, 1=ABS) * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT) * M150 - Set Status LED Color as R U B W P. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632). @@ -163,6 +164,7 @@ * M166 - Set the Gradient Mix for the mixing extruder. (Requires GRADIENT_MIX) * M190 - S Wait for bed current temp to reach target temp. ** Wait only when heating! ** * R Wait for bed current temp to reach target temp. ** Wait for heating or cooling. ** + * M193 - R Wait for cooler temp to reach target temp. ** Wait for cooling. ** * M200 - Set filament diameter, D, setting E axis units to cubic. (Use S0 to revert to linear units.) * M201 - Set max acceleration in units/s^2 for print moves: "M201 X Y Z E" * M202 - Set max acceleration in units/s^2 for travel moves: "M202 X Y Z E" ** UNUSED IN MARLIN! ** @@ -632,6 +634,11 @@ class GcodeSuite { static void M191(); #endif + #if HAS_COOLER + static void M143(); + static void M193(); + #endif + #if PREHEAT_COUNT static void M145(); #endif diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index ac712aea07e0..316abc30480e 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -141,6 +141,9 @@ void GcodeSuite::M115() { // CHAMBER_TEMPERATURE (M141, M191) cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER)); + // COOLER_TEMPERATURE (M143, M193) + cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER)); + // MEATPACK Compresson cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK)); diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 93deac0566de..136293fd34c0 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -610,6 +610,14 @@ void GCodeQueue::get_available_commands() { TERN_(SDSUPPORT, get_sdcard_commands()); } +/** + * Run the entire queue in-place. Blocks SD completion/abort until complete. + */ +void GCodeQueue::exhaust() { + while (ring_buffer.occupied()) advance(); + planner.synchronize(); +} + /** * Get the next command in the queue, optionally log it to SD, then dispatch it */ diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 7bc3bfdbe5ae..4757b8c37ee1 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -93,7 +93,9 @@ class GCodeQueue { inline bool full(uint8_t cmdCount=1) const { return length > (BUFSIZE - cmdCount); } - inline bool empty() const { return length == 0; } + inline bool occupied() const { return length != 0; } + + inline bool empty() const { return !occupied(); } inline CommandLine& peek_next_command() { return commands[index_r]; } @@ -162,6 +164,11 @@ class GCodeQueue { */ static void advance(); + /** + * Run the entire queue in-place + */ + static void exhaust(); + /** * Add to the circular command queue the next command from: * - The command-injection queue (injected_commands_P) diff --git a/Marlin/src/gcode/temp/M140_M190.cpp b/Marlin/src/gcode/temp/M140_M190.cpp index d684127fe151..9a1a0287d9f9 100644 --- a/Marlin/src/gcode/temp/M140_M190.cpp +++ b/Marlin/src/gcode/temp/M140_M190.cpp @@ -32,19 +32,8 @@ #include "../gcode.h" #include "../../module/temperature.h" -#include "../../module/motion.h" #include "../../lcd/marlinui.h" -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENT_LEDS) - #include "../../feature/leds/leds.h" -#endif - -#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob - /** * M140: Set bed temperature * diff --git a/Marlin/src/gcode/temp/M141_M191.cpp b/Marlin/src/gcode/temp/M141_M191.cpp index 17eb71eadaec..ed7637c92aa6 100644 --- a/Marlin/src/gcode/temp/M141_M191.cpp +++ b/Marlin/src/gcode/temp/M141_M191.cpp @@ -32,20 +32,8 @@ #include "../gcode.h" #include "../../module/temperature.h" - -#include "../../module/motion.h" #include "../../lcd/marlinui.h" -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENT_LEDS) - #include "../../feature/leds/leds.h" -#endif - -#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob - /** * M141: Set chamber temperature */ diff --git a/Marlin/src/gcode/temp/M143_M193.cpp b/Marlin/src/gcode/temp/M143_M193.cpp new file mode 100644 index 000000000000..aef4350e6048 --- /dev/null +++ b/Marlin/src/gcode/temp/M143_M193.cpp @@ -0,0 +1,67 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * gcode/temp/M143_M193.cpp + * + * Laser Cooler target temperature control + */ + +#include "../../inc/MarlinConfig.h" + +#if HAS_COOLER + +#include "../../feature/cooler.h" +extern Cooler cooler; + +#include "../gcode.h" +#include "../../module/temperature.h" +#include "../../lcd/marlinui.h" + +/** + * M143: Set cooler temperature + */ +void GcodeSuite::M143() { + if (DEBUGGING(DRYRUN)) return; + if (parser.seenval('S')) { + thermalManager.setTargetCooler(parser.value_celsius()); + parser.value_celsius() ? cooler.enable() : cooler.disable(); + } +} + +/** + * M193: Sxxx Wait for laser current temp to reach target temp. Waits only when cooling. + */ +void GcodeSuite::M193() { + if (DEBUGGING(DRYRUN)) return; + + if (parser.seenval('S')) { + cooler.enable(); + thermalManager.setTargetCooler(parser.value_celsius()); + if (thermalManager.isLaserCooling()) { + ui.set_status_P(GET_TEXT(MSG_LASER_COOLING)); + thermalManager.wait_for_cooler(true); + } + } +} + +#endif // HAS_COOLER diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index 159a52bf2626..0934e04e7524 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -51,7 +51,7 @@ void GcodeSuite::M303() { thermalManager.pid_debug_flag ^= true; SERIAL_ECHO_START(); SERIAL_ECHOPGM("PID Debug "); - serialprintln_onoff(pid_debug_flag); + serialprintln_onoff(thermalManager.pid_debug_flag); return; } #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 43f20b6dfda7..00b9b1faef35 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -114,6 +114,10 @@ #undef THERMAL_PROTECTION_CHAMBER #endif +#if TEMP_SENSOR_COOLER == 0 + #undef THERMAL_PROTECTION_COOLER +#endif + #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) #define HAS_MIXER_SYNC_CHANNEL 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index be04341200e3..e8ed0d5a91df 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -399,7 +399,7 @@ * Temp Sensor defines */ -#define ANY_TEMP_SENSOR_IS(n) (TEMP_SENSOR_0 == (n) || TEMP_SENSOR_1 == (n) || TEMP_SENSOR_2 == (n) || TEMP_SENSOR_3 == (n) || TEMP_SENSOR_4 == (n) || TEMP_SENSOR_5 == (n) || TEMP_SENSOR_6 == (n) || TEMP_SENSOR_7 == (n) || TEMP_SENSOR_BED == (n) || TEMP_SENSOR_PROBE == (n) || TEMP_SENSOR_CHAMBER == (n)) +#define ANY_TEMP_SENSOR_IS(n) (TEMP_SENSOR_0 == (n) || TEMP_SENSOR_1 == (n) || TEMP_SENSOR_2 == (n) || TEMP_SENSOR_3 == (n) || TEMP_SENSOR_4 == (n) || TEMP_SENSOR_5 == (n) || TEMP_SENSOR_6 == (n) || TEMP_SENSOR_7 == (n) || TEMP_SENSOR_BED == (n) || TEMP_SENSOR_PROBE == (n) || TEMP_SENSOR_CHAMBER == (n) || TEMP_SENSOR_COOLER == (n)) #if ANY_TEMP_SENSOR_IS(1000) #define HAS_USER_THERMISTORS 1 @@ -744,6 +744,27 @@ #undef CHAMBER_MAXTEMP #endif +#if TEMP_SENSOR_COOLER == -4 + #define COOLER_USES_AD8495 1 +#elif TEMP_SENSOR_COOLER == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -1 + #define COOLER_USES_AD595 1 +#elif TEMP_SENSOR_COOLER > 0 + #define TEMP_SENSOR_COOLER_THERMISTOR_ID TEMP_SENSOR_COOLER + #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1 + #if TEMP_SENSOR_COOLER == 1000 + #define COOLER_USER_THERMISTOR 1 + #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 + #define COOLER_DUMMY_THERMISTOR 1 + #endif +#else + #undef COOLER_MINTEMP + #undef COOLER_MAXTEMP +#endif + #if TEMP_SENSOR_PROBE == -4 #define TEMP_SENSOR_PROBE_IS_AD8495 1 #elif TEMP_SENSOR_PROBE == -3 @@ -1928,6 +1949,9 @@ #if HAS_ADC_TEST(CHAMBER) #define HAS_TEMP_ADC_CHAMBER 1 #endif +#if HAS_ADC_TEST(COOLER) + #define HAS_TEMP_ADC_COOLER 1 +#endif #define HAS_TEMP(N) ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_MAX_TC, TEMP_SENSOR_##N##_IS_DUMMY) #if HAS_HOTEND && HAS_TEMP(0) @@ -1942,6 +1966,9 @@ #if HAS_TEMP(CHAMBER) #define HAS_TEMP_CHAMBER 1 #endif +#if HAS_TEMP(COOLER) + #define HAS_TEMP_COOLER 1 +#endif #if ENABLED(JOYSTICK) #if PIN_EXISTS(JOY_X) @@ -2001,7 +2028,10 @@ #if HAS_HEATED_BED || HAS_TEMP_CHAMBER #define BED_OR_CHAMBER 1 #endif -#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE +#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER) + #define HAS_COOLER 1 +#endif +#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER #define HAS_TEMP_SENSOR 1 #endif @@ -2033,9 +2063,13 @@ #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0 #define WATCH_CHAMBER 1 #endif +#if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0 + #define WATCH_COOLER 1 +#endif #if (ENABLED(THERMAL_PROTECTION_HOTENDS) || !EXTRUDERS) \ && (ENABLED(THERMAL_PROTECTION_BED) || !HAS_HEATED_BED) \ - && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER) + && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER) \ + && (ENABLED(THERMAL_PROTECTION_COOLER) || !HAS_COOLER) #define THERMALLY_SAFE 1 #endif @@ -2067,8 +2101,11 @@ #if HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN) #define HAS_AUTO_CHAMBER_FAN 1 #endif +#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER_AUTO_FAN) + #define HAS_AUTO_COOLER_FAN 1 +#endif -#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN) +#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN) #define HAS_AUTO_FAN 1 #endif #define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN) @@ -2364,7 +2401,20 @@ #define WRITE_HEATER_CHAMBER(v) WRITE(HEATER_CHAMBER_PIN, (v) ^ HEATER_CHAMBER_INVERTING) #endif -#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER +/** + * Laser Cooling requires settings + */ +#if HAS_COOLER + #ifndef MAX_COOLER_POWER + #define MAX_COOLER_POWER 255 + #endif + #ifndef COOLER_INVERTING + #define COOLER_INVERTING true + #endif + #define WRITE_HEATER_COOLER(v) WRITE(COOLER_PIN, (v) ^ COOLER_INVERTING) +#endif + +#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER || HAS_COOLER #define HAS_TEMPERATURE 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 4da25d091686..cd9ca84385d5 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1876,6 +1876,10 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_CHAMBER requires TEMP_CHAMBER_PIN." #endif +#if TEMP_SENSOR_COOLER && !(PIN_EXISTS(TEMP_COOLER) && ENABLED(LASER_FEATURE)) + #error "TEMP_SENSOR_COOLER requires LASER_FEATURE and TEMP_COOLER_PIN." +#endif + #if ENABLED(CHAMBER_FAN) && !(defined(CHAMBER_FAN_MODE) && WITHIN(CHAMBER_FAN_MODE, 0, 2)) #error "CHAMBER_FAN_MODE must be between 0 and 2." #endif diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index be2dd72ec44c..ec24ed058cec 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-03-06" + #define STRING_DISTRIBUTION_DATE "2021-03-08" #endif /** diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 61fee3e048ff..d0dc28861333 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -78,6 +78,16 @@ #define STATUS_CUTTER_WIDTH 0 #endif +// +// Laser Cooler +// +#if !STATUS_COOLER_WIDTH && HAS_COOLER + #include "status/cooler.h" +#endif +#ifndef STATUS_COOLER_WIDTH + #define STATUS_COOLER_WIDTH 0 +#endif + // // Bed // @@ -498,6 +508,47 @@ #endif +// +// Cooler Bitmap Properties +// +#ifndef STATUS_COOLER_BYTEWIDTH + #define STATUS_COOLER_BYTEWIDTH BW(STATUS_COOLER_WIDTH) +#endif +#if STATUS_COOLER_WIDTH + + #ifndef STATUS_COOLER_X + #define STATUS_COOLER_X (LCD_PIXEL_WIDTH - (STATUS_COOLER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8) + #endif + + #ifndef STATUS_COOLER_HEIGHT + #ifdef STATUS_COOLER_ANIM + #define STATUS_COOLER_HEIGHT(S) ((S) ? sizeof(status_cooler_on_bmp) / (STATUS_COOLER_BYTEWIDTH) : sizeof(status_cooler_bmp) / (STATUS_COOLER_BYTEWIDTH)) + #else + #define STATUS_COOLER_HEIGHT(S) (sizeof(status_cooler_bmp) / (STATUS_COOLER_BYTEWIDTH)) + #endif + #endif + + #ifndef STATUS_COOLER_Y + #define STATUS_COOLER_Y(S) (18 - STATUS_COOLER_HEIGHT(S)) + #endif + + #ifndef STATUS_COOLER_TEXT_X + #define STATUS_COOLER_TEXT_X (STATUS_COOLER_X + 8) + #endif + + static_assert( + sizeof(status_cooler_bmp) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(0)), + "Status cooler bitmap (status_cooler_bmp) dimensions don't match data." + ); + #ifdef STATUS_COOLER_ANIM + static_assert( + sizeof(status_cooler_on_bmp) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(1)), + "Status cooler bitmap (status_cooler_on_bmp) dimensions don't match data." + ); + #endif + +#endif + // // Bed Bitmap Properties // @@ -585,6 +636,10 @@ #if HAS_CUTTER && !DO_DRAW_BED #define DO_DRAW_CUTTER 1 #endif +#if HAS_COOLER + #define DO_DRAW_COOLER 1 +#endif + #if HAS_TEMP_CHAMBER && STATUS_CHAMBER_WIDTH && HOTENDS <= 4 #define DO_DRAW_CHAMBER 1 #endif @@ -603,6 +658,9 @@ #if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM) #define ANIM_CUTTER 1 #endif +#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM) + #define ANIM_COOLER 1 +#endif #if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER #define ANIM_HBCC 1 #endif diff --git a/Marlin/src/lcd/dogm/status/cooler.h b/Marlin/src/lcd/dogm/status/cooler.h new file mode 100644 index 000000000000..4e59e237a2d8 --- /dev/null +++ b/Marlin/src/lcd/dogm/status/cooler.h @@ -0,0 +1,70 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// +// lcd/dogm/status/cooler.h - Status Screen Laser Cooler bitmaps +// + +#define STATUS_COOLER_WIDTH 16 + +#ifdef STATUS_COOLER_ANIM + + const unsigned char status_cooler_on_bmp[] PROGMEM = { + B00010000,B00001000, + B00010010,B01001001, + B01010100,B00101010, + B00111000,B00011100, + B11111110,B11111111, + B00111000,B00011100, + B01010100,B00101010, + B10010000,B10001001, + B00010000,B10000000, + B00000100,B10010000, + B00000010,B10100000, + B00000001,B11000000, + B00011111,B11111100, + B00000001,B11000000, + B00000010,B10100000, + B00000100,B10010000 + }; + +#endif + +const unsigned char status_cooler_bmp[] PROGMEM = { + B00010000,B00001000, + B00010010,B01001001, + B01010100,B00101010, + B00101000,B00010100, + B11000111,B01100011, + B00101000,B00010100, + B01010100,B00101010, + B10010000,B10001001, + B00010000,B10000000, + B00000100,B10010000, + B00000010,B10100000, + B00000001,B01000000, + B00011110,B00111100, + B00000001,B01000000, + B00000010,B10100000, + B00000100,B10010000 +}; diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 8ae6ab662793..892ab5218b83 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -86,6 +86,7 @@ HEATBIT_HOTEND, HEATBIT_BED = HOTENDS, HEATBIT_CHAMBER, + HEATBIT_COOLER, HEATBIT_CUTTER }; IF<(HEATBIT_CUTTER > 7), uint16_t, uint8_t>::type heat_bits; @@ -111,6 +112,11 @@ #else #define CUTTER_ALT() false #endif +#if ANIM_COOLER + #define COOLER_ALT(N) TEST(heat_bits, HEATBIT_COOLER) +#else + #define COOLER_ALT() false +#endif #if DO_DRAW_HOTENDS #define MAX_HOTEND_DRAW _MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE))) @@ -361,18 +367,22 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #endif // DO_DRAW_BED #if DO_DRAW_CHAMBER - FORCE_INLINE void _draw_chamber_status() { #if HAS_HEATED_CHAMBER if (PAGE_UNDER(7)) _draw_centered_temp(thermalManager.degTargetChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 7); #endif - if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) _draw_centered_temp(thermalManager.degChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 28); } +#endif -#endif // DO_DRAW_CHAMBER +#if DO_DRAW_COOLER + FORCE_INLINE void _draw_cooler_status() { + if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) + _draw_centered_temp(thermalManager.degCooler(), STATUS_COOLER_TEXT_X, 28); + } +#endif // // Before homing, blink '123' <-> '???'. @@ -447,6 +457,9 @@ void MarlinUI::draw_status_screen() { #if DO_DRAW_CHAMBER && HAS_HEATED_CHAMBER if (thermalManager.isHeatingChamber()) SBI(new_bits, HEATBIT_CHAMBER); #endif + #if DO_DRAW_COOLER && HAS_COOLER + if (thermalManager.isLaserCooling()) SBI(new_bits, HEATBIT_COOLER); + #endif if (TERN0(ANIM_CUTTER, cutter.enabled())) SBI(new_bits, HEATBIT_CUTTER); heat_bits = new_bits; #endif @@ -631,12 +644,28 @@ void MarlinUI::draw_status_screen() { } #endif + // Laser Cooler + #if DO_DRAW_COOLER + #if ANIM_COOLER + #define COOLER_BITMAP(S) ((S) ? status_cooler_bmp : status_cooler_on_bmp) + #else + #define COOLER_BITMAP(S) status_cooler_bmp + #endif + const uint8_t coolery = STATUS_COOLER_Y(COOLER_ALT()), + coolerh = STATUS_COOLER_HEIGHT(COOLER_ALT()); + if (PAGE_CONTAINS(coolery, coolery + coolerh - 1)) + u8g.drawBitmapP(STATUS_COOLER_X, coolery, STATUS_COOLER_BYTEWIDTH, coolerh, COOLER_BITMAP(COOLER_ALT())); + #endif + // Heated Bed TERN_(DO_DRAW_BED, _draw_bed_status(blink)); // Heated Chamber TERN_(DO_DRAW_CHAMBER, _draw_chamber_status()); + // Cooler + TERN_(DO_DRAW_COOLER, _draw_cooler_status()); + // Fan, if a bitmap was provided #if DO_DRAW_FAN if (PAGE_CONTAINS(STATUS_FAN_TEXT_Y - INFO_FONT_ASCENT, STATUS_FAN_TEXT_Y - 1)) { diff --git a/Marlin/src/lcd/dwin/dwin_lcd.cpp b/Marlin/src/lcd/dwin/dwin_lcd.cpp index 1978c6a4f801..59bc46925ad4 100644 --- a/Marlin/src/lcd/dwin/dwin_lcd.cpp +++ b/Marlin/src/lcd/dwin/dwin_lcd.cpp @@ -95,7 +95,7 @@ bool DWIN_Handshake(void) { #endif LCD_SERIAL.begin(LCD_BAUDRATE); const millis_t serial_connect_timeout = millis() + 1000UL; - while (!LCD_SERIAL && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } size_t i = 0; DWIN_Byte(i, 0x00); diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp index 9b0c329de2b5..180c8958094e 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp @@ -395,20 +395,23 @@ void DGUSScreenHandler::HandleTemperatureChanged(DGUS_VP_Variable &var, void *va default: return; #if HOTENDS >= 1 case VP_T_E0_Set: + NOMORE(newvalue, HEATER_0_MAXTEMP); thermalManager.setTargetHotend(newvalue, 0); - acceptedvalue = thermalManager.temp_hotend[0].target; + acceptedvalue = thermalManager.degTargetHotend(0); break; #endif #if HOTENDS >= 2 case VP_T_E1_Set: + NOMORE(newvalue, HEATER_1_MAXTEMP); thermalManager.setTargetHotend(newvalue, 1); - acceptedvalue = thermalManager.temp_hotend[1].target; + acceptedvalue = thermalManager.degTargetHotend(1); break; #endif #if HAS_HEATED_BED case VP_T_Bed_Set: + NOMORE(newvalue, BED_MAXTEMP); thermalManager.setTargetBed(newvalue); - acceptedvalue = thermalManager.temp_bed.target; + acceptedvalue = thermalManager.degTargetBed(); break; #endif } diff --git a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.cpp index c43243b39d3e..5497dd53cc82 100644 --- a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.cpp @@ -37,7 +37,7 @@ #include "../../../../../sd/cardreader.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../../../feature/powerloss.h" #endif #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.cpp index 90cfae7f0997..c170c288aa10 100644 --- a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.cpp @@ -37,7 +37,7 @@ #include "../../../../../sd/cardreader.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../../../feature/powerloss.h" #endif #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp index 14b7394aaa1a..bfa518446d59 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp @@ -75,7 +75,7 @@ uint16_t z_park_pos = 10; xyz_pos_t position_before_pause; void MKS_pause_print_move() { - planner.synchronize(); + queue.exhaust(); position_before_pause = current_position; do_blocking_move_to(X_MIN_POS + x_park_pos, Y_MIN_POS + y_park_pos, current_position.z + z_park_pos); } diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.h b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.h index 47695edf0fbd..c8915a3d251d 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.h @@ -23,10 +23,10 @@ #include "../DGUSDisplayDef.h" -//#define USE_MKS_GREEN_UI +#define USE_MKS_GREEN_UI //#define DGUS_MKS_RUNOUT_SENSOR -#define LOGO_TIME_DELAY TERN(USE_MKS_GREEN_UI, 5000, 1500) +#define LOGO_TIME_DELAY TERN(USE_MKS_GREEN_UI, 8000, 1500) #if ENABLED(DGUS_MKS_RUNOUT_SENSOR) #define MT_DET_1_PIN 1 @@ -178,7 +178,7 @@ enum DGUSLCD_Screens : uint8_t { MKSLCD_SCREEN_PRINT_CONFIG = 72, MKSLCD_SCREEN_LEVEL_DATA = 106, MKSLCD_PrintPause_SET = 107, - //MKSLCD_FILAMENT_DATA = 50, + MKSLCD_FILAMENT_DATA = 50, MKSLCD_ABOUT = 83, MKSLCD_PID = 108, MKSLCD_PAUSE_SETTING_MOVE = 98, diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp index 9fc56acf100a..577171a13581 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp @@ -39,6 +39,7 @@ #include "../../../../../gcode/gcode.h" #include "../../../../../pins/pins.h" #include "../../../../../libs/nozzle.h" + #if ENABLED(HAS_STEALTHCHOP) #include "../../../../../module/stepper/trinamic.h" #include "../../../../../module/stepper/indirection.h" @@ -60,7 +61,6 @@ uint8_t DGUSLanguageSwitch = 0; // Switch language for MKS DGUS uint32_t swap32(const uint32_t value) { return (value & 0x000000FFU) << 24U | (value & 0x0000FF00U) << 8U | (value & 0x00FF0000U) >> 8U | (value & 0xFF000000U) >> 24U; } #if 0 - void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4) { dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true); dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true); @@ -264,7 +264,7 @@ void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) { void DGUSScreenHandler::SDPrintingFinished() { if (DGUSAutoTurnOff) { - while (!queue.ring_buffer.empty()) queue.advance(); + queue.exhaust(); gcode.process_subcommands_now_P(PSTR("M81")); } GotoScreen(MKSLCD_SCREEN_PrintDone); @@ -465,7 +465,6 @@ void DGUSScreenHandler::Level_Ctrl_MKS(DGUS_VP_Variable &var, void *val_ptr) { cs = getCurrentScreen(); if (cs != MKSLCD_AUTO_LEVEL) GotoScreen(MKSLCD_AUTO_LEVEL); - #else GotoScreen(MKSLCD_SCREEN_LEVEL); @@ -499,14 +498,15 @@ void DGUSScreenHandler::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) { char cmd_buf[30]; float offset = mesh_adj_distance; int16_t integer, Deci, Deci2; - // float f3 = current_position.z; - // float f4 = current_position.z; + + if (!queue.ring_buffer.empty()) return; + switch (mesh_value) { case 0: offset = mesh_adj_distance; integer = offset; // get int - Deci = (offset * 100); - Deci = Deci % 100; + Deci = (offset * 10); + Deci = Deci % 10; Deci2 = offset * 100; Deci2 = Deci2 % 10; soft_endstop._enabled = false; @@ -520,8 +520,8 @@ void DGUSScreenHandler::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) { case 1: offset = mesh_adj_distance; integer = offset; // get int - Deci = (offset * 100); - Deci = Deci % 100; + Deci = (offset * 10); + Deci = Deci % 10; Deci2 = offset * 100; Deci2 = Deci2 % 10; soft_endstop._enabled = false; @@ -589,8 +589,8 @@ void DGUSScreenHandler::LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr) { uint16_t lcd_value = swap16(*(uint16_t *)val_ptr); - if(lcd_value > 100) lcd_value = 100; - else if(lcd_value < 10) lcd_value = 10; + if (lcd_value > 100) lcd_value = 100; + else if (lcd_value < 10) lcd_value = 10; lcd_default_light = lcd_value; @@ -794,7 +794,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { DEBUG_ECHOLNPAIR("QUEUE LEN:", queue.length); - if (!print_job_timer.isPaused() && queue.ring_buffer.full(1)) + if (!print_job_timer.isPaused() && !queue.ring_buffer.empty()) return; char axiscode; @@ -1249,8 +1249,8 @@ void DGUSScreenHandler::MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) { switch (val_t) { case 0: #if HOTENDS >= 1 - if (thermalManager.temp_hotend[0].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(0) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(0) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 0); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); @@ -1268,8 +1268,8 @@ void DGUSScreenHandler::MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) { case 1: #if HOTENDS >= 2 - if (thermalManager.temp_hotend[1].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[1].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(1) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(1) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 1); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); @@ -1284,8 +1284,8 @@ void DGUSScreenHandler::MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) { } #endif #if ENABLED(SINGLENOZZLE) - if (thermalManager.temp_hotend[0].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(0) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(0) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 0); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); @@ -1313,8 +1313,8 @@ void DGUSScreenHandler::MKS_FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) switch (val_t) { case 0: #if HOTENDS >= 1 - if (thermalManager.temp_hotend[0].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(0) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(0) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 0); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); @@ -1331,8 +1331,8 @@ void DGUSScreenHandler::MKS_FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) break; case 1: #if HOTENDS >= 2 - if (thermalManager.temp_hotend[1].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[1].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(1) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(1) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 1); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); @@ -1348,8 +1348,8 @@ void DGUSScreenHandler::MKS_FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) #endif #if ENABLED(SINGLENOZZLE) - if (thermalManager.temp_hotend[0].celsius < thermalManager.extrude_min_temp) { - if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + if (thermalManager.degHotend(0) < thermalManager.extrude_min_temp) { + if (thermalManager.degTargetHotend(0) < thermalManager.extrude_min_temp) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, 0); sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); SetupConfirmAction(nullptr); diff --git a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp index f1d91371c238..ff924f4061f3 100644 --- a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp @@ -37,7 +37,7 @@ #include "../../../../../sd/cardreader.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../../../feature/powerloss.h" #endif #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp index 6130e92224af..5d02f79fd1fb 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp @@ -191,7 +191,7 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) { TERN_(ADVANCED_PAUSE_FEATURE, pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT); } else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT, TYPE_FILAMENT_HEAT_LOAD_COMPLETED, TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED)) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target= uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); } @@ -204,7 +204,7 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) { uiCfg.filament_loading_time_cnt = 0; uiCfg.filament_unloading_time_flg = false; uiCfg.filament_unloading_time_cnt = 0; - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); } @@ -479,9 +479,9 @@ void lv_draw_dialog(uint8_t type) { void filament_sprayer_temp() { char buf[20] = {0}; - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + sprintf(buf, preheat_menu.value_state, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex)); - strcpy(public_buf_l, uiCfg.curSprayerChoose < 1 ? extrude_menu.ext1 : extrude_menu.ext2); + strcpy(public_buf_l, uiCfg.extruderIndex < 1 ? extrude_menu.ext1 : extrude_menu.ext2); strcat_P(public_buf_l, PSTR(": ")); strcat(public_buf_l, buf); lv_label_set_text(tempText1, public_buf_l); @@ -500,7 +500,7 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_loading_time_flg = true; uiCfg.filament_loading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.curSprayerChoose, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); queue.inject(public_buf_m); } if (uiCfg.filament_heat_completed_unload) { @@ -510,13 +510,13 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_unloading_time_flg = true; uiCfg.filament_unloading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.curSprayerChoose, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); queue.inject(public_buf_m); } - if (((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius - gCfgItems.filament_limit_temper)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius > gCfgItems.filament_limit_temper)) - && (uiCfg.filament_load_heat_flg) + if ( ((abs((int)((int)thermalManager.degHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temper)) <= 1) + || ((int)thermalManager.degHotend(uiCfg.extruderIndex) > gCfgItems.filament_limit_temper)) + && uiCfg.filament_load_heat_flg ) { uiCfg.filament_load_heat_flg = false; lv_clear_dialog(); @@ -529,8 +529,8 @@ void filament_dialog_handle() { lv_clear_dialog(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_LOAD_COMPLETED); } - if (((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius - gCfgItems.filament_limit_temper)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius > gCfgItems.filament_limit_temper)) + if (((abs((int)((int)thermalManager.degHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temper)) <= 1) + || ((int)thermalManager.degHotend(uiCfg.extruderIndex) > gCfgItems.filament_limit_temper)) && uiCfg.filament_unload_heat_flg ) { uiCfg.filament_unload_heat_flg = false; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp index b9af6d33a814..43ed21419957 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp @@ -54,7 +54,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { case ID_E_ADD: - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) { + if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) { sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), uiCfg.extruStep, 60 * uiCfg.extruSpeed); queue.inject(public_buf_l); extrudeAmount += uiCfg.extruStep; @@ -62,7 +62,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { } break; case ID_E_DEC: - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) { + if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) { sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), 0 - uiCfg.extruStep, 60 * uiCfg.extruSpeed); queue.enqueue_one_now(public_buf_l); extrudeAmount -= uiCfg.extruStep; @@ -71,17 +71,17 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_E_TYPE: if (ENABLED(HAS_MULTI_EXTRUDER)) { - if (uiCfg.curSprayerChoose == 0) { - uiCfg.curSprayerChoose = 1; + if (uiCfg.extruderIndex == 0) { + uiCfg.extruderIndex = 1; queue.inject_P(PSTR("T1")); } else { - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; queue.inject_P(PSTR("T0")); } } else - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; extrudeAmount = 0; disp_hotend_temp(); @@ -153,7 +153,7 @@ void lv_draw_extrusion() { } void disp_ext_type() { - if (uiCfg.curSprayerChoose == 1) { + if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, extrude_menu.ext2); @@ -195,7 +195,7 @@ void disp_ext_speed() { void disp_hotend_temp() { char buf[20] = {0}; - sprintf(buf, extrude_menu.temp_value, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + sprintf(buf, extrude_menu.temp_value, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex)); strcpy(public_buf_l, extrude_menu.temper_text); strcat(public_buf_l, buf); lv_label_set_text(tempText, public_buf_l); @@ -213,7 +213,7 @@ void disp_extru_amount() { sprintf(buf1, extrude_menu.count_value_cm, extrudeAmount / 10); else sprintf(buf1, extrude_menu.count_value_m, extrudeAmount / 1000); - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? extrude_menu.ext1 : extrude_menu.ext2); + strcat(public_buf_l, uiCfg.extruderIndex == 0 ? extrude_menu.ext1 : extrude_menu.ext2); strcat(public_buf_l, buf1); lv_label_set_text(ExtruText, public_buf_l); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp index cff99119e8e8..e12a4b82cf28 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp @@ -50,25 +50,25 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_FILAMNT_IN: uiCfg.filament_load_heat_flg = true; - if ((abs(thermalManager.temp_hotend[uiCfg.curSprayerChoose].target - thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius) <= 1) - || (gCfgItems.filament_limit_temper <= thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius)) { + if ((abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.degHotend(uiCfg.extruderIndex)) <= 1) + || (gCfgItems.filament_limit_temper <= thermalManager.degHotend(uiCfg.extruderIndex))) { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); } else { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_LOAD_HEAT); - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].target < gCfgItems.filament_limit_temper) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = gCfgItems.filament_limit_temper; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) < gCfgItems.filament_limit_temper) { + thermalManager.setTargetHotend(gCfgItems.filament_limit_temper, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } } break; case ID_FILAMNT_OUT: uiCfg.filament_unload_heat_flg = true; - if ((thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > 0) - && ((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target - thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= gCfgItems.filament_limit_temper)) + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) + && ((abs((int)((int)thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.degHotend(uiCfg.extruderIndex))) <= 1) + || ((int)thermalManager.degHotend(uiCfg.extruderIndex) >= gCfgItems.filament_limit_temper)) ) { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED); @@ -76,28 +76,28 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { else { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_UNLOAD_HEAT); - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].target < gCfgItems.filament_limit_temper) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = gCfgItems.filament_limit_temper; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) < gCfgItems.filament_limit_temper) { + thermalManager.setTargetHotend(gCfgItems.filament_limit_temper, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } filament_sprayer_temp(); } break; case ID_FILAMNT_TYPE: #if HAS_MULTI_EXTRUDER - uiCfg.curSprayerChoose = !uiCfg.curSprayerChoose; + uiCfg.extruderIndex = !uiCfg.extruderIndex; #endif disp_filament_type(); break; case ID_FILAMNT_RETURN: #if HAS_MULTI_EXTRUDER if (uiCfg.print_state != IDLE && uiCfg.print_state != REPRINTED) - gcode.process_subcommands_now_P(uiCfg.curSprayerChoose_bak == 1 ? PSTR("T1") : PSTR("T0")); + gcode.process_subcommands_now_P(uiCfg.extruderIndexBak == 1 ? PSTR("T1") : PSTR("T0")); #endif feedrate_mm_s = (float)uiCfg.moveSpeed_bak; if (uiCfg.print_state == PAUSED) planner.set_e_position_mm((destination.e = current_position.e = uiCfg.current_e_position_bak)); - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); @@ -132,7 +132,7 @@ void lv_draw_filament_change() { } void disp_filament_type() { - if (uiCfg.curSprayerChoose == 1) { + if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext2); @@ -153,8 +153,8 @@ void disp_filament_temp() { public_buf_l[0] = '\0'; - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? preheat_menu.ext1 : preheat_menu.ext2); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2); + sprintf(buf, preheat_menu.value_state, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex)); strcat_P(public_buf_l, PSTR(": ")); strcat(public_buf_l, buf); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp index eb4b3708387d..cd77db8ae186 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp @@ -66,7 +66,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_O_FILAMENT: #if HAS_MULTI_EXTRUDER - uiCfg.curSprayerChoose_bak = active_extruder; + uiCfg.extruderIndexBak = active_extruder; #endif if (uiCfg.print_state == WORKING) { #if ENABLED(SDSUPPORT) @@ -76,7 +76,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { #endif } uiCfg.moveSpeed_bak = (uint16_t)feedrate_mm_s; - uiCfg.desireSprayerTempBak = thermalManager.temp_hotend[active_extruder].target; + uiCfg.hotendTargetTempBak = thermalManager.degTargetHotend(active_extruder); lv_clear_operation(); lv_draw_filament_change(); break; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp index f2fda3a286f0..73a0808e9c7f 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp @@ -48,47 +48,46 @@ enum { static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { - case ID_P_ADD: + case ID_P_ADD: { if (uiCfg.curTempType == 0) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target += uiCfg.stepHeat; - if (uiCfg.curSprayerChoose == 0) { - if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); - } - } + int16_t max_target; + thermalManager.temp_hotend[uiCfg.extruderIndex].target += uiCfg.stepHeat; + if (uiCfg.extruderIndex == 0) + max_target = HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); #if HAS_MULTI_HOTEND - else if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); - } + else + max_target = HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); #endif - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) > max_target) + thermalManager.setTargetHotend(max_target, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } #if HAS_HEATED_BED else { + constexpr int16_t max_target = BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1); thermalManager.temp_bed.target += uiCfg.stepHeat; - if ((int)thermalManager.temp_bed.target > BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) { - thermalManager.temp_bed.target = (float)BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1); - } + if (thermalManager.degTargetBed() > max_target) + thermalManager.setTargetBed(max_target); thermalManager.start_watching_bed(); } #endif disp_desire_temp(); - break; + } break; + case ID_P_DEC: if (uiCfg.curTempType == 0) { - if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > uiCfg.stepHeat) - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target -= uiCfg.stepHeat; + if ((int)thermalManager.degTargetHotend(uiCfg.extruderIndex) > uiCfg.stepHeat) + thermalManager.temp_hotend[uiCfg.extruderIndex].target -= uiCfg.stepHeat; else - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = 0; - - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + thermalManager.setTargetHotend(0, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } #if HAS_HEATED_BED else { if ((int)thermalManager.temp_bed.target > uiCfg.stepHeat) thermalManager.temp_bed.target -= uiCfg.stepHeat; else - thermalManager.temp_bed.target = 0; + thermalManager.setTargetBed(0); thermalManager.start_watching_bed(); } @@ -98,20 +97,20 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_P_TYPE: if (uiCfg.curTempType == 0) { if (ENABLED(HAS_MULTI_EXTRUDER)) { - if (uiCfg.curSprayerChoose == 0) { - uiCfg.curSprayerChoose = 1; + if (uiCfg.extruderIndex == 0) { + uiCfg.extruderIndex = 1; } - else if (uiCfg.curSprayerChoose == 1) { + else if (uiCfg.extruderIndex == 1) { if (TEMP_SENSOR_BED != 0) { uiCfg.curTempType = 1; } else { uiCfg.curTempType = 0; - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; } } } - else if (uiCfg.curSprayerChoose == 0) { + else if (uiCfg.extruderIndex == 0) { if (TEMP_SENSOR_BED != 0) uiCfg.curTempType = 1; else @@ -119,7 +118,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { } } else if (uiCfg.curTempType == 1) { - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; uiCfg.curTempType = 0; } disp_temp_type(); @@ -135,8 +134,8 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_P_OFF: if (uiCfg.curTempType == 0) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = 0; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + thermalManager.setTargetHotend(0, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } #if HAS_HEATED_BED else { @@ -186,7 +185,7 @@ void lv_draw_preHeat() { void disp_temp_type() { if (uiCfg.curTempType == 0) { - if (uiCfg.curSprayerChoose == 1) { + if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext2); @@ -217,13 +216,13 @@ void disp_desire_temp() { public_buf_l[0] = '\0'; if (uiCfg.curTempType == 0) { - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? preheat_menu.ext1 : preheat_menu.ext2); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2); + sprintf(buf, preheat_menu.value_state, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex)); } #if HAS_HEATED_BED else { strcat(public_buf_l, preheat_menu.hotbed); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target); + sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target); } #endif strcat_P(public_buf_l, PSTR(": ")); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp index 782ce2199295..2cc6d19cc5d0 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp @@ -203,11 +203,11 @@ void lv_draw_printing() { } void disp_ext_temp() { - sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target); + sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0)); lv_label_set_text(labelExt1, public_buf_l); #if HAS_MULTI_EXTRUDER - sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target); + sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(1), (int)thermalManager.degTargetHotend(1)); lv_label_set_text(labelExt2, public_buf_l); #endif } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp index 047a6cdb70d1..7554f746cacb 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp @@ -98,10 +98,10 @@ void disp_det_error() { lv_obj_t *e1, *e2, *e3, *bed; void mks_disp_test() { char buf[30] = {0}; - sprintf_P(buf, PSTR("e1:%d"), (int)thermalManager.temp_hotend[0].celsius); + sprintf_P(buf, PSTR("e1:%d"), (int)thermalManager.degHotend(0)); lv_label_set_text(e1, buf); #if HAS_MULTI_HOTEND - sprintf_P(buf, PSTR("e2:%d"), (int)thermalManager.temp_hotend[1].celsius); + sprintf_P(buf, PSTR("e2:%d"), (int)thermalManager.degHotend(1)); lv_label_set_text(e2, buf); #endif #if HAS_HEATED_BED @@ -133,12 +133,12 @@ void lv_draw_ready_print() { #if 1 e1 = lv_label_create_empty(scr); lv_obj_set_pos(e1, 20, 20); - sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.temp_hotend[0].celsius); + sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.degHotend(0)); lv_label_set_text(e1, buf); #if HAS_MULTI_HOTEND e2 = lv_label_create_empty(scr); lv_obj_set_pos(e2, 20, 45); - sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.temp_hotend[1].celsius); + sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.degHotend(1)); lv_label_set_text(e2, buf); #endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp index aa6d3869a6dc..8e9e5d59fa1a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp @@ -68,7 +68,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { #endif break; case ID_T_FILAMENT: - uiCfg.desireSprayerTempBak = thermalManager.temp_hotend[uiCfg.curSprayerChoose].target; + uiCfg.hotendTargetTempBak = thermalManager.degTargetHotend(uiCfg.extruderIndex); lv_draw_filament_change(); break; case ID_T_MORE: diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp index 9d13ca31209e..9b7fea0a45e1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp @@ -179,7 +179,7 @@ void gCfgItems_init() { void ui_cfg_init() { uiCfg.curTempType = 0; - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; uiCfg.stepHeat = 10; uiCfg.leveling_first_time = false; uiCfg.para_ui_page = false; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h b/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h index 34c6b1f254ac..4b0ce2b4d810 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h @@ -211,9 +211,9 @@ typedef struct { typedef struct { uint8_t curTempType:1, - curSprayerChoose:3, + extruderIndex:3, stepHeat:4, - curSprayerChoose_bak:4; + extruderIndexBak:4; bool leveling_first_time:1, para_ui_page:1, configWifi:1, @@ -246,7 +246,7 @@ typedef struct { filament_loading_time_cnt, filament_unloading_time_cnt; float move_dist; - float desireSprayerTempBak; + float hotendTargetTempBak; float current_x_position_bak, current_y_position_bak, current_z_position_bak, diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp index 02ca16e00797..ddf717329731 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp @@ -885,9 +885,9 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { char *outBuf = (char *)tempBuf; char str_1[16], tbuf[34]; - dtostrf(thermalManager.temp_hotend[0].celsius, 1, 1, tbuf); + dtostrf(thermalManager.degHotend(0), 1, 1, tbuf); strcat_P(tbuf, PSTR(" /")); - strcat(tbuf, dtostrf(thermalManager.temp_hotend[0].target, 1, 1, str_1)); + strcat(tbuf, dtostrf(thermalManager.degTargetHotend(0), 1, 1, str_1)); const int tlen = strlen(tbuf); @@ -912,9 +912,9 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P(outBuf, PSTR(" T1:")); outBuf += 4; #if HAS_MULTI_HOTEND - strcat(outBuf, dtostrf(thermalManager.temp_hotend[1].celsius, 1, 1, str_1)); + strcat(outBuf, dtostrf(thermalManager.degHotend(1), 1, 1, str_1)); strcat_P(outBuf, PSTR(" /")); - strcat(outBuf, dtostrf(thermalManager.temp_hotend[1].target, 1, 1, str_1)); + strcat(outBuf, dtostrf(thermalManager.degTargetHotend(1), 1, 1, str_1)); #else strcat_P(outBuf, PSTR("0 /0")); #endif @@ -924,15 +924,15 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { } else { sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), - (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target, + (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0), #if HAS_HEATED_BED (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target, #else 0, 0, #endif - (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target, + (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0), #if HAS_MULTI_HOTEND - (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target + (int)thermalManager.degHotend(1), (int)thermalManager.degTargetHotend(1) #else 0, 0 #endif diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 7c178a0339bd..c5c35321ca7d 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -176,6 +176,7 @@ namespace ExtUI { case BED: thermalManager.reset_bed_idle_timer(); return; #endif TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return); // Chamber has no idle timer + TERN_(HAS_COOLER, case COOLER: return); // Cooler has no idle timer default: TERN_(HAS_HOTEND, thermalManager.reset_hotend_idle_timer(heater - H0)); break; @@ -904,22 +905,23 @@ namespace ExtUI { value *= TOUCH_UI_LCD_TEMP_SCALING; #endif enableHeater(heater); - #if HAS_HEATED_CHAMBER - if (heater == CHAMBER) - thermalManager.setTargetChamber(LROUND(constrain(value, 0, CHAMBER_MAXTEMP - 10))); - else - #endif - #if HAS_HEATED_BED - if (heater == BED) - thermalManager.setTargetBed(LROUND(constrain(value, 0, BED_MAX_TARGET))); - else - #endif - { + switch (heater) { + #if HAS_HEATED_CHAMBER + case CHAMBER: thermalManager.setTargetChamber(LROUND(constrain(value, 0, CHAMBER_MAXTEMP - 10))); break; + #endif + #if HAS_COOLER + case COOLER: thermalManager.setTargetCooler(LROUND(constrain(value, 0, COOLER_MAXTEMP))); break; + #endif + #if HAS_HEATED_BED + case BED: thermalManager.setTargetBed(LROUND(constrain(value, 0, BED_MAX_TARGET))); break; + #endif + default: { #if HAS_HOTEND const int16_t e = heater - H0; thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e); #endif - } + } break; + } } void setTargetTemp_celsius(float value, const extruder_t extruder) { diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 4214ba5821dc..a6cfb82b88cf 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -55,7 +55,7 @@ namespace ExtUI { enum axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4 }; enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 }; - enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER }; + enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; enum result_t : uint8_t { PID_BAD_EXTRUDER_NUM, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index b17e81d831db..72f262c687c4 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -276,6 +276,9 @@ namespace Language_en { PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby"); PROGMEM Language_Str MSG_BED = _UxGT("Bed"); PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); + PROGMEM Language_Str MSG_COOLER = _UxGT("Laser Coolant"); + PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Toggle Cooler"); + PROGMEM Language_Str MSG_LASER = _UxGT("Laser"); PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan Speed"); PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan Speed ~"); PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ~"); @@ -482,6 +485,8 @@ namespace Language_en { PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); + PROGMEM Language_Str MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Cooler Runaway"); + PROGMEM Language_Str MSG_COOLING_FAILED = _UxGT("Cooling Failed"); PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); PROGMEM Language_Str MSG_HALTED = _UxGT("PRINTER HALTED"); @@ -497,6 +502,7 @@ namespace Language_en { PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Probe Cooling..."); PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Chamber Heating..."); PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); + PROGMEM Language_Str MSG_LASER_COOLING = _UxGT("Laser Cooling..."); PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index c5cd845c27ca..e29b75fb3534 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -27,14 +27,12 @@ * LCD Menü Üzenetek. Lásd még https://marlinfw.org/docs/development/lcd_language.html * Marlin 2.0.x bugfix Magyar fordítása. A fordítást folyamatosan javítom és frissítem. * A Magyar fordítást készítette: AntoszHUN - * - * + * A Fordítás utolsó frissítése: 2021.03.06. - 08:00 */ namespace Language_hu { using namespace Language_en; // A fordítás az örökölt Amerikai Angol (English) karakterláncokat használja. - constexpr uint8_t CHARSIZE = 2; PROGMEM Language_Str LANGUAGE = _UxGT("Magyar"); @@ -44,8 +42,8 @@ namespace Language_hu { PROGMEM Language_Str MSG_NO = _UxGT("NEM"); PROGMEM Language_Str MSG_BACK = _UxGT("Vissza"); PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Megszakítás..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Tároló Behelyezve"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Tároló Eltávolítva"); + PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Tároló behelyezve"); + PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Tároló eltávolítva"); PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Várakozás a tárolóra"); PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("SD-Kártya hiba"); PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Tároló olvasási hiba"); @@ -53,31 +51,34 @@ namespace Language_hu { PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB eszköz hiba"); PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Túlfolyás"); PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Végállás"); // Maximum 8 karakter - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. Végállás"); + PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. végállás"); PROGMEM Language_Str MSG_MAIN = _UxGT(""); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("További Beállítások"); + PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("További beállítások"); PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfiguráció"); - PROGMEM Language_Str MSG_AUTOSTART = _UxGT("Autoinditás"); + PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Fájl auto. futtatás"); PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Motorok kikapcsolása"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Hiba Menü"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Haladás sáv teszt"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("XYZ Auto kezdöpont"); + PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("X-Y-Z Auto kezdöpont"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X Kezdöpont"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y Kezdöpont"); PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z Kezdöpont"); PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Igazítás"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Elektromos segéd"); PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Ismétlés: %i"); PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Pontosság csökken!"); PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Pontosság elérve"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ Kezdöpont"); + PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("X-Y-Z Kezdöpont"); PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Kattints a kezdéshez."); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Következö Pont"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Szintezés Kész!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Szint Csökkentés"); + PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Következö pont"); + PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Szintezés kész!"); + PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Szint csökkentés"); PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Kezdöpont eltolás"); PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Eltolás beállítva."); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Eredeti Be"); + PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Elektromos segéd"); + PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Elektromos varázsló"); + PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Eredeti választása"); + PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Utolsó érték "); #if PREHEAT_COUNT PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Fütés ") PREHEAT_1_LABEL; PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Fütés ") PREHEAT_1_LABEL " ~"; @@ -95,36 +96,43 @@ namespace Language_hu { PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Fütés $ Ágy"); PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Fütés $ Beáll"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Egyedi Elömelegítés"); + PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Egyedi elömelegítés"); PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Visszahütés"); + PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frekvencia"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Lézer Vezérlés"); - PROGMEM Language_Str MSG_LASER_OFF = _UxGT("Lézer Ki"); - PROGMEM Language_Str MSG_LASER_ON = _UxGT("Lézer Be"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Lézer Teljesítmény"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Orsó Vezérlés"); - PROGMEM Language_Str MSG_SPINDLE_OFF = _UxGT("Orsó Ki"); - PROGMEM Language_Str MSG_SPINDLE_ON = _UxGT("Orsó Be"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Orsó Teljesítmény"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Orsó Hátra"); + PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Lézer vezérlés"); + PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Orsó vezérlés"); + PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Lézer telj."); + PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Orsó telj."); + PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Lézer váltás"); + PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Impulzus teszt ms"); + PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Tűz impulzus"); + PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Orsóváltás"); + PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Orsó előre"); + PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Orsó hátra"); + PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Bekapcsolás"); PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Kikapcsolás"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudál"); + PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Adagol"); PROGMEM Language_Str MSG_RETRACT = _UxGT("Visszahúz"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Tengelyek Mozgatása"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ágy Szintezés"); + PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Tengelyek mozgatása"); + PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ágy szintezés"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ágy szintezése"); PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Sarok szint"); + PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Ágy emelése a szonda váltásig"); + PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Minden sarok tolerancián belül. Szint jó"); + PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Jó pontok: "); + PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Utolsó Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Következö sarok"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Háló Szerkesztö"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Háló Szerkesztése"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Háló Szerk. Állj"); + PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Háló szerkesztö"); + PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Háló szerkesztése"); + PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Háló szerk. állj"); PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Próbapont"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Érték"); PROGMEM Language_Str MSG_USER_MENU = _UxGT("Egyéni parancs"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Teszt"); + PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe teszt"); PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Pont"); PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Szonda határon kívül"); PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Eltérés"); @@ -134,6 +142,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikálás"); PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Tükrözött másolás"); PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Teljes felügyelet"); + PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("X-Hézag másolása"); PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. fúvóka X"); PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. fúvóka Y"); PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. fúvóka Z"); @@ -146,75 +155,75 @@ namespace Language_hu { PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Mérés"); PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Üres ágyat mérj"); PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Továbblépés"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL Aktivál"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL Deaktivál"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Ágy Höfok"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ágy Höfok"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Fúvóka Höfok"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Fúvóka Höfok"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Háló Szerkesztés"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Egyéni Háló Szerkesztés"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Finomított Háló"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Háló Kész"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Egyéni Háló Építés"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Háló Építés"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Háló Építés ($)"); + PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL Aktívál"); + PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL Deaktívál"); + PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Ágy höfok"); + PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ágy höfok"); + PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Fúvóka höfok"); + PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Fúvóka höfok"); + PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Háló szerkesztés"); + PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Egyéni háló szerkesztés"); + PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Finomított háló"); + PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Háló kész"); + PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Egyéni háló építés"); + PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Háló építés"); + PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Háló építés ($)"); PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Hideg háló építés"); PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Háló magasság állítás"); PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Magasság összege"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Háló Elfogadás"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Háló Elfogadás ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valódi Háló Elfogadása"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Ágy Fűtés"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Fúvóka Fűtés"); + PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Háló elfogadás"); + PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Háló elfogadás ($)"); + PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valódi háló elfogadása"); + PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Ágy fűtés"); + PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Fúvóka fűtés"); PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Kézi alapozás..."); PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Fix hosszúságú alap"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Alapozás Kész"); + PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Alapozás kész"); PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Törölve"); PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Kilépö G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Ágy Háló Folyt."); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Háló Szintezés"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Pontos Szintezés"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rács Szintezés"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Háló Szint"); + PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Ágy háló folyt."); + PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Háló szintezés"); + PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Pontos szintezés"); + PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rács szintezés"); + PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Háló szint"); PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Oldal pontok"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Térkép Típus"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Háló Térkép Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Nyomtató Backup Ki"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("UBL Infó Kimenet"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Kitöltési Költség"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Kézi Kitöltés"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Okos Kitöltés"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Háló Kitöltés"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Minden Érvénytelen"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Közelebbi Érvénytelen"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Mindet Finomhangolja"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Közelebbi Finomhangolása"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Háló Tárolás"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Memória Foglalat"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Ágy háló Betöltés"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Ágy háló Mentés"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("M117 Háló %i Betöltve"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("M117 Háló %i Mentve"); + PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Térkép típus"); + PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Háló térkép kimenet"); + PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host kimenet"); + PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV kimenet"); + PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Nyomtató bizt.mentés"); + PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("UBL Infó kimenet"); + PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Kitöltési költség"); + PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Kézi kitöltés"); + PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Okos kitöltés"); + PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Háló kitöltés"); + PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Minden érvénytelen"); + PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Közelebbi érvénytelen"); + PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Mindet finomhangolja"); + PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Közelebbi finomhangolása"); + PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Háló tárolás"); + PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Memória foglalat"); + PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Ágy háló betöltés"); + PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Ágy háló mentés"); + PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("M117 Háló %i betöltve"); + PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("M117 Háló %i mentve"); PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Nincs tároló"); PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Hiba: UBL Mentés"); PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Hiba: UBL Visszaáll"); PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Eltolás: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Eltolás Leállítva"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Lépésröl Lépésre UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Hideg Háló Készítés"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligens Kitöltés"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Háló Érvényesítés"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Minden Finomítása"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Háló Érvényesítés"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Minden Finomítása"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy Háló Mentése"); + PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Eltolás leállítva"); + PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Lépésröl lépésre UBL"); + PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Hideg háló készítés"); + PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligens kitöltés"); + PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Háló érvényesítés"); + PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Minden finomítása"); + PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Háló érvényesítés"); + PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Minden finomítása"); + PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy háló mentése"); PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Vezérlés"); PROGMEM Language_Str MSG_LEDS = _UxGT("Világítás"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Beállított Színek"); + PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Beállított színek"); PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Piros"); PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Narancs"); PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Sárga"); @@ -225,14 +234,14 @@ namespace Language_hu { PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Fehér"); PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Csatorna ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("LEDek #2"); + PROGMEM Language_Str MSG_LEDS2 = _UxGT("LED-ek #2"); PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Fény #2 Megadott"); PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Fényerő"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Egyéni Szín"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Piros Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Zöld Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Kék Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Fehér Intenzitás"); + PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Egyéni szín"); + PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Piros intenzitás"); + PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Zöld intenzitás"); + PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Kék intenzitás"); + PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Fehér intenzitás"); PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Fényerö"); PROGMEM Language_Str MSG_MOVING = _UxGT("Mozgás..."); @@ -243,27 +252,30 @@ namespace Language_hu { PROGMEM Language_Str MSG_MOVE_E = _UxGT("Adagoló"); PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Adagoló *"); PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("A fúvóka túl hideg"); - PROGMEM Language_Str MSG_MOVE_Z_DIST = _UxGT("Mozgás %smm"); + PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mozgás %smm"); PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mozgás 0.1mm"); PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mozgás 1mm"); PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mozgás 10mm"); + PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Mozgás 0.001mm"); + PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Mozgás 0.01mm"); + PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Mozgás 0.1mm"); PROGMEM Language_Str MSG_SPEED = _UxGT("Sebesség"); PROGMEM Language_Str MSG_BED_Z = _UxGT("Z ágy"); PROGMEM Language_Str MSG_NOZZLE = _UxGT("Fúvóka"); PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Fúvóka ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Fej Parkolva"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Fej Készenlétbe"); + PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Fej parkolva"); + PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Fej készenlétbe"); PROGMEM Language_Str MSG_BED = _UxGT("Ágy"); PROGMEM Language_Str MSG_CHAMBER = _UxGT("Burkolat"); PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Hütés sebesség"); PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Hütés sebesség ="); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Tárolt Hütés ="); + PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Tárolt hütés ="); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra hütés sebesség"); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség ="); PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Hűtésvezérlés"); PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Alapjárat"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus Mód"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív Sebesség"); + PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus mód"); + PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív sebesség"); PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Készenlét"); PROGMEM Language_Str MSG_FLOW = _UxGT("Folyás"); PROGMEM Language_Str MSG_FLOW_N = _UxGT("Folyás ~"); @@ -271,13 +283,13 @@ namespace Language_hu { PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Minimum"); PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Maximum"); PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Tényezö"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Automata Höfok"); + PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Automata höfok"); PROGMEM Language_Str MSG_LCD_ON = _UxGT("Be"); PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Ki"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Hangolás"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Hangolás *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz Adagoló."); + PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID Hangolás kész"); + PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz adagoló."); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet."); PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés."); PROGMEM Language_Str MSG_SELECT = _UxGT("Kiválaszt"); @@ -288,25 +300,25 @@ namespace Language_hu { PROGMEM Language_Str MSG_VB_JERK = LCD_STR_B _UxGT(" Ránt. Seb."); PROGMEM Language_Str MSG_VC_JERK = LCD_STR_C _UxGT(" Ránt. Seb."); PROGMEM Language_Str MSG_VE_JERK = _UxGT("E Ránt. Seb."); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Csomopont Eltérés"); + PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Csomopont eltérés"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Sebesség"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max Sebesség ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max Sebesség ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max Sebesség ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max Sebesség ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max Sebesség *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Min Sebesség"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Min Utazó.seb."); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max sebesség ") LCD_STR_A; + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max sebesség ") LCD_STR_B; + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max sebesség ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max sebesség ") LCD_STR_E; + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max sebesség *"); + PROGMEM Language_Str MSG_VMIN = _UxGT("Min sebesség"); + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Min utazó.seb."); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Gyorsulás"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max Gyors. ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max Gyors. ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max Gyors. ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max Gyors. ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max Gyorsulás *"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max gyors. ") LCD_STR_A; + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max gyors. ") LCD_STR_B; + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max gyors. ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max gyors. ") LCD_STR_E; + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max gyorsulás *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Visszahúzás"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Utazás"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max Frekvencia"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min Elötolás"); + PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max frekvencia"); + PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min elötolás"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Lépés/mm"); PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" lépés/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" lépés/mm"); @@ -325,7 +337,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Betöltés mm"); PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Haladó K"); PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Haladó K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD kontraszt"); + PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD Kontraszt"); PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Mentés EEPROM"); PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Betöltés EEPROM"); PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Alapértelmezett"); @@ -333,9 +345,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Hiba: EEPROM CRC"); PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Hiba: EEPROM Index"); PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Hiba: EEPROM Verzió"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Beállítások Mentve"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Tároló Frissítés"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Nyomtató Újraindítása"); + PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Beállítások mentve"); + PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Tároló frissítés"); + PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Nyomtató újraindítása"); PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Frissítés"); PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT(""); PROGMEM Language_Str MSG_PREPARE = _UxGT("Vezérlés"); @@ -344,7 +356,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_CURRENT = _UxGT("Jelenlegi"); PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Feszültség"); PROGMEM Language_Str MSG_POWER = _UxGT("Energia"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Nyomtatás Indítása"); + PROGMEM Language_Str MSG_START_PRINT = _UxGT("Nyomtatás indítása"); PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Tovább"); PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Kezdet"); PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Állj"); @@ -355,23 +367,25 @@ namespace Language_hu { PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Kész"); PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Vissza"); PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Folytatás"); + PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Kihagy"); PROGMEM Language_Str MSG_PAUSING = _UxGT("Szüneteltetve..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Nyomtatás Szünetelés"); + PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Nyomtatás szünetelés"); PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Nyomtatás folytatása"); PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Hoszt indítás"); PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Nyomtatás leállítása"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Objektum Nyomtatása"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Objektum Törlése"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Objektum Törlése ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Kiesés Helyreáll."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Nyomtatás Tárolóról"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Nincs Tároló"); + PROGMEM Language_Str MSG_END_LOOPS = _UxGT("Hurok ismétlés vége"); + PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Objektum nyomtatása"); + PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Objektum törlése"); + PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése ="); + PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Kiesés helyreáll."); + PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Nyomtatás tárolóról"); + PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Nincs tároló"); PROGMEM Language_Str MSG_DWELL = _UxGT("Alvás..."); PROGMEM Language_Str MSG_USERWAIT = _UxGT("Katt a folytatáshoz..."); PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Nyomtatás szünetelve"); PROGMEM Language_Str MSG_PRINTING = _UxGT("Nyomtatás..."); PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Nyomtatás leállítva"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Nyomtatás Kész"); + PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Nyomtatás kész"); PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Nincs mozgás."); PROGMEM Language_Str MSG_KILLED = _UxGT("HALOTT! "); PROGMEM Language_Str MSG_STOPPED = _UxGT("MEGÁLLT! "); @@ -381,25 +395,25 @@ namespace Language_hu { PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Ugrás mm"); PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Visszah.helyre mm"); PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Csere.Visszah.helyre mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("AutoVisszah."); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Visszahúzás Távolság"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra Csere"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tisztítási Távolság"); + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Visszahúzás V"); + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S Vissza.h V"); + PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto Visszah."); + PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Visszahúzás távolság"); + PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra csere"); + PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tisztítási távolság"); PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Szerszámcsere"); PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Emelés"); PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Fösebesség"); PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Visszah. Sebesség"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Fej Parkolás"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Visszahúzás Sebesség"); + PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Fej parkolás"); + PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Visszav.visszah. sebesség"); PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("FAN Sebesség"); PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("FAN idö"); PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto BE"); PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto KI"); PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Szerszámcsere"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Automata Csere"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Utolsó Adagoló"); + PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Automata csere"); + PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Utolsó adagoló"); PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Csere *"); PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Szál csere"); PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Szál csere *"); @@ -407,12 +421,12 @@ namespace Language_hu { PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Szál betöltés *"); PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Szál eltávolítás"); PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Szál eltávolítás *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Mindet Eltávolít"); + PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Mindet eltávolít"); PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Tároló"); PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Tároló csere"); PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Tároló Kiadása"); PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z szonda tálcán kivül"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Ferdeség Faktor"); + PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Ferdeség faktor"); PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Önteszt"); PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Visszaállítás"); @@ -428,16 +442,16 @@ namespace Language_hu { PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("VESZÉLY: A rossz beállítások kárt okozhatnak! Biztos továbblép?"); PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Kezd TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Teszt"); + PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Eltolás teszt"); PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Mentés"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Használ"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Probe Használ"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Probe Elhelyezés"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Elsö %s%s%s Kell"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Szonda Eltolások"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Szonda X Eltolás"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Szonda Y Eltolás"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Szonda Z Eltolás"); + PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI használ"); + PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Probe használ"); + PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Probe elhelyezés"); + PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Elsö %s%s%s kell"); + PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Szonda eltolások"); + PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("X Szonda eltolás"); + PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Y Szonda eltolás"); + PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z Szonda eltolás"); PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Fúvóka az ágyhoz"); PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Mikrolépés X"); PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Mikrolépés Y"); @@ -464,31 +478,31 @@ namespace Language_hu { PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Szonda hütése..."); PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Kamra fütés..."); PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Kamra hütés..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibráció"); + PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta kalibráció"); PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("X Kalibrálás"); PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Y Kalibrálás"); PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Z Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Központ Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Beállítások"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibráció"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Magasság Kalib."); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z Szonda Eltolás"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rúd"); + PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Központ kalibrálás"); + PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta beállítások"); + PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto kalibráció"); + PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta magasság kalib."); + PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z Eltolás"); + PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag rúd"); PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Magasság"); PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Sugár"); PROGMEM Language_Str MSG_INFO_MENU = _UxGT("A Nyomtatóról"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Nyomtató Infó"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Pontos Szintezés"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineáris Szintezés"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineáris Szintezés"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Egységes Ágy Szintezés"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Háló Szintezés"); + PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Nyomtató infó"); + PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Pontos szintezés"); + PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineáris szintezés"); + PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineáris szintezés"); + PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Egységes ágy szintezés"); + PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Háló szintezés"); PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statisztikák"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Alaplap Infó"); + PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Alaplap infó"); PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termisztorok"); PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Adagolók"); PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Átviteli sebesség"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokoll"); + PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokol"); PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Futáselemzés: KI"); PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Futáselemzés: BE"); PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend üresjárati idök."); @@ -498,7 +512,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("HELYTELEN NYOMTATÓ"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatás Számláló"); + PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatás számláló"); PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Összes nyomtatási idö"); PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Leghosszabb munkaidö"); @@ -511,16 +525,16 @@ namespace Language_hu { PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Kiadott"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Höfok"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Höfok"); + PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min höfok"); + PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max höfok"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Meghajtási Erö"); + PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Meghajtási erö"); PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Meghajtó %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CSATLAKOZÁSI HIBA"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Írása"); + PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM írása"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("NYOMTATÓSZÁL CSERE"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("NYOMTATÁS SZÜNETEL"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("SZÁL BETÖLTÉS"); @@ -529,22 +543,22 @@ namespace Language_hu { PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Tisztítsd meg"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Folytatás"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Fúvóka: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Túlfutás Szenzor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Túlfutás Táv. mm"); + PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Túlfutás szenzor"); + PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Túlfutás táv. mm"); PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Tájolási hiba"); PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Szondázás hiba"); PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SZÁLVÁLASZTÁS"); PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU Szoftver Feltöltése!"); + PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU Szoftver feltöltése!"); PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Figyelmeztetés."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Nyomtatás Folytatása"); + PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Nyomtatás folytatása"); PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Folytatás..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Szál Betöltése"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Összes Betöltése"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Fúvóka Betöltése"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Szál Kiadása"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Szál Kiadása ~"); + PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Szál betöltése"); + PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Összes betöltése"); + PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Fúvóka betöltése"); + PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Szál kiadása"); + PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Szál kiadása ~"); PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Kiadja a szálat"); PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Szál betölt. %i..."); PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Szál kiadás...."); @@ -559,11 +573,11 @@ namespace Language_hu { PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Összetevö ="); PROGMEM Language_Str MSG_MIXER = _UxGT("Keverö"); PROGMEM Language_Str MSG_GRADIENT = _UxGT("Színátm."); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Teljes Színátm."); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Váltás Keverésre"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Ciklikus Keverés"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Színátm. Keverés"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Fordított Színátm."); + PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Teljes színátm."); + PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Váltás keverésre"); + PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Ciklikus keverés"); + PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Színátm. keverés"); + PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Fordított színátm."); PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktív V-szerszám"); PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Kezdés V-szerszám"); PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Vége V-szerszám"); @@ -591,7 +605,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Jelszó törlése"); PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("A jelszó "); PROGMEM Language_Str MSG_START_OVER = _UxGT("Újrakezdés"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Mentse el!"); + PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Mentsd el!"); PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Jelszó törölve"); // @@ -613,7 +627,7 @@ namespace Language_hu { #else PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Katt a folytatáshoz")); PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkolás...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Kérlek Várj...")); + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Kérlek várj...")); PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Behelyez majd katt")); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Katt a fűtéshez")); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Fűtés...")); @@ -625,10 +639,10 @@ namespace Language_hu { #endif PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Meghajtók"); PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Meghajtó áram"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hibrid Küszöbérték"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Motoros Kezdöpont"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Léptetö Mód"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Mód"); + PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hibrid küszöbérték"); + PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Motoros kezdöpont"); + PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Léptetö mód"); + PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop mód"); PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Újraindítás"); PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" be:"); PROGMEM Language_Str MSG_BACKLASH = _UxGT("Holtjáték"); @@ -649,6 +663,17 @@ namespace Language_hu { PROGMEM Language_Str MSG_REHEATING = _UxGT("Újrafűtés..."); PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Z Szonda varázsló"); + PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Z Referencia mérés"); + PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Menjen a próba pontra"); + + PROGMEM Language_Str MSG_SOUND = _UxGT("Hang"); + + PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Bal felsö"); + PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Bal alsó"); + PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Jobb felsö"); + PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Jobb alsó"); + PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrálás befejezve"); + PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Kalibrálási hiba"); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index a4cbc31d8b6b..d00909c7b326 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -195,6 +195,16 @@ void menu_info_thermistors() { STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif + #if HAS_COOLER + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_COOLER + #include "../thermistornames.h" + STATIC_ITEM_P(PSTR("COOL: " THERMISTOR_NAME), SS_INVERT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + #endif + END_SCREEN(); } diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index f347efe6db80..3a9906ddeb5b 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -35,6 +35,10 @@ #include "../../module/motion.h" #endif +#if HAS_COOLER + #include "../../feature/cooler.h" +#endif + #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) #include "../../module/tool_change.h" #endif @@ -68,6 +72,10 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i #if HAS_HEATED_BED inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(-1, -1, m); } #endif + #if HAS_COOLER + inline void _precool_laser(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); } + void do_precool_laser_m() { _precool_laser(editable.int8, thermalManager.temp_cooler.target); } + #endif #if HAS_TEMP_HOTEND && HAS_HEATED_BED inline void _preheat_both(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, m); } @@ -143,6 +151,10 @@ void menu_temperature() { #endif #endif + #if HAS_COOLER + if (thermalManager.temp_cooler.target == 0) thermalManager.temp_cooler.target = COOLER_DEFAULT_TEMP; + #endif + START_MENU(); BACK_ITEM(MSG_MAIN); @@ -176,6 +188,15 @@ void menu_temperature() { EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber); #endif + // + // Cooler: + // + #if HAS_COOLER + editable.state = cooler.is_enabled(); + EDIT_ITEM(bool, MSG_COOLER(TOGGLE), &cooler.state, []{ if (editable.state) cooler.disable(); else cooler.enable(); }); + EDIT_ITEM_FAST(int3, MSG_COOLER, &thermalManager.temp_cooler.target, COOLER_MINTEMP + 2, COOLER_MAXTEMP - 2, thermalManager.start_watching_cooler); + #endif + // // Fan Speed: // @@ -232,7 +253,7 @@ void menu_temperature() { editable.int8 = m; #if HOTENDS > 1 || HAS_HEATED_BED SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m); - #else + #elif HAS_HOTEND ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m); #endif } diff --git a/Marlin/src/lcd/tft/tft_color.h b/Marlin/src/lcd/tft/tft_color.h index a72a079f6ee4..d060d3209d77 100644 --- a/Marlin/src/lcd/tft/tft_color.h +++ b/Marlin/src/lcd/tft/tft_color.h @@ -94,6 +94,9 @@ #ifndef COLOR_CHAMBER #define COLOR_CHAMBER COLOR_DARK_ORANGE #endif +#ifndef COLOR_COOLER + #define COLOR_COOLER COLOR_DARK_ORANGE +#endif #ifndef COLOR_FAN #define COLOR_FAN COLOR_AQUA #endif diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 7a45851a5da8..29dd088c99bb 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -202,6 +202,12 @@ void Touch::touch(touch_control_t *control) { MenuItem_int3::action((const char *)GET_TEXT_F(MSG_CHAMBER), &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber); } #endif + #if HAS_COOLER + else if (heater == H_COOLER) { + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_COOLER), &thermalManager.temp_cooler.target, 0, COOLER_MAXTEMP - 8, thermalManager.start_watching_cooler); + } + #endif + break; case FAN: ui.clear_lcd(); diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index eadd09ef27ec..fb821886451e 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -136,6 +136,12 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { #endif } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + currentTemperature = thermalManager.degCooler(); + targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO); + } + #endif else return; TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 64, 100, Heater)); @@ -159,6 +165,13 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { image = targetTemperature > 0 ? imgChamberHeated : imgChamber; } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + if (currentTemperature <= 26) Color = COLOR_COLD; + if (currentTemperature > 26) Color = COLOR_RED; + image = targetTemperature > 26 ? imgCoolerHot : imgCooler; + } + #endif tft.add_image(0, 18, image, Color); diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 5000aedc39a5..164785a22964 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -136,6 +136,12 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { #endif } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + currentTemperature = thermalManager.degCooler(); + targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO); + } + #endif else return; TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 80, 120, Heater)); diff --git a/Marlin/src/lcd/tft/ui_common.h b/Marlin/src/lcd/tft/ui_common.h index d40e471171b3..d43de1d43b1c 100644 --- a/Marlin/src/lcd/tft/ui_common.h +++ b/Marlin/src/lcd/tft/ui_common.h @@ -62,6 +62,10 @@ void menu_item(const uint8_t row, bool sel = false); #define ITEM_CHAMBER 2 #define ITEM_FAN 3 #define ITEMS_COUNT 4 +#elif HAS_TEMP_COOLER + #define ITEM_COOLER 0 + #define ITEM_FAN 1 + #define ITEMS_COUNT 2 #elif HOTENDS > 1 #define ITEM_E0 0 #define ITEM_E1 1 diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index be98972b7712..a1d5745de4f6 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -35,6 +35,11 @@ #include "endstops.h" #include "planner.h" +#if HAS_COOLER + #include "../feature/cooler.h" + #include "../feature/spindle_laser.h" +#endif + #if ENABLED(EMERGENCY_PARSER) #include "motion.h" #endif @@ -232,8 +237,13 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #else #define _CHAMBER_PSTR(h) #endif +#if HAS_COOLER + #define _COOLER_PSTR(h) (h) == H_COOLER ? GET_TEXT(MSG_COOLER) : +#else + #define _COOLER_PSTR(h) +#endif #define _E_PSTR(h,N) ((HOTENDS) > N && (h) == N) ? PSTR(LCD_STR_E##N) : -#define HEATER_PSTR(h) _BED_PSTR(h) _CHAMBER_PSTR(h) _E_PSTR(h,1) _E_PSTR(h,2) _E_PSTR(h,3) _E_PSTR(h,4) _E_PSTR(h,5) PSTR(LCD_STR_E0) +#define HEATER_PSTR(h) _BED_PSTR(h) _CHAMBER_PSTR(h) _COOLER_PSTR(h) _E_PSTR(h,1) _E_PSTR(h,2) _E_PSTR(h,3) _E_PSTR(h,4) _E_PSTR(h,5) PSTR(LCD_STR_E0) // public: @@ -254,6 +264,9 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, uint8_t Temperature::chamberfan_speed; // = 0 #endif +#if ENABLED(AUTO_POWER_COOLER_FAN) + uint8_t Temperature::coolerfan_speed; // = 0 +#endif #if HAS_FAN uint8_t Temperature::fan_speed[FAN_COUNT]; // = { 0 } @@ -355,14 +368,11 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #endif TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 } IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms); -#endif // HAS_HEATED_BED +#endif #if HAS_TEMP_CHAMBER chamber_info_t Temperature::temp_chamber; // = { 0 } #if HAS_HEATED_CHAMBER - int16_t fan_chamber_pwm; - bool flag_chamber_off; - bool flag_chamber_excess_heat = false; millis_t next_cool_check_ms_2 = 0; float old_temp = 9999; #ifdef CHAMBER_MINTEMP @@ -373,8 +383,27 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #endif TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0}); IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms); - #endif // HAS_HEATED_CHAMBER -#endif // HAS_TEMP_CHAMBER + #endif +#endif + +#if HAS_TEMP_COOLER + cooler_info_t Temperature::temp_cooler; // = { 0 } + #if HAS_COOLER + bool flag_cooler_state; + //bool flag_cooler_excess = false; + float previous_temp = 9999; + #ifdef COOLER_MINTEMP + int16_t Temperature::mintemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_LO_TEMP; + #endif + #ifdef COOLER_MAXTEMP + int16_t Temperature::maxtemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_HI_TEMP; + #endif + #if WATCH_COOLER + cooler_watch_t Temperature::watch_cooler{0}; + #endif + millis_t Temperature::next_cooler_check_ms, Temperature::cooler_fan_flush_ms; + #endif +#endif #if HAS_TEMP_PROBE probe_info_t Temperature::temp_probe; // = { 0 } @@ -744,6 +773,9 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #if HAS_HEATED_CHAMBER case H_CHAMBER: return temp_chamber.soft_pwm_amount; #endif + #if HAS_COOLER + case H_COOLER: return temp_cooler.soft_pwm_amount; + #endif default: return TERN0(HAS_HOTEND, temp_hotend[heater_id].soft_pwm_amount); } @@ -779,6 +811,11 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { SBI(fanState, pgm_read_byte(&fanBit[CHAMBER_FAN_INDEX])); #endif + #if HAS_AUTO_COOLER_FAN + if (temp_cooler.celsius >= COOLER_AUTO_FAN_TEMPERATURE) + SBI(fanState, pgm_read_byte(&fanBit[COOLER_FAN_INDEX])); + #endif + #define _UPDATE_AUTO_FAN(P,D,A) do{ \ if (PWM_PIN(P##_AUTO_FAN_PIN) && A < 255) \ analogWrite(pin_t(P##_AUTO_FAN_PIN), D ? A : 0); \ @@ -874,6 +911,8 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms SERIAL_ECHO(heater_id); else if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) SERIAL_ECHOPGM(STR_HEATER_CHAMBER); + else if (TERN0(HAS_COOLER, heater_id == H_COOLER)) + SERIAL_ECHOPGM(STR_COOLER); else SERIAL_ECHOPGM(STR_HEATER_BED); SERIAL_EOL(); @@ -1347,11 +1386,18 @@ void Temperature::manage_heater() { } #endif + #if EITHER(CHAMBER_FAN, CHAMBER_VENT) || DISABLED(PIDTEMPCHAMBER) + static bool flag_chamber_excess_heat; // = false; + #endif + #if EITHER(CHAMBER_FAN, CHAMBER_VENT) + static bool flag_chamber_off; // = false + if (temp_chamber.target > CHAMBER_MINTEMP) { flag_chamber_off = false; #if ENABLED(CHAMBER_FAN) + int16_t fan_chamber_pwm; #if CHAMBER_FAN_MODE == 0 fan_chamber_pwm = CHAMBER_FAN_BASE; #elif CHAMBER_FAN_MODE == 1 @@ -1376,7 +1422,8 @@ void Temperature::manage_heater() { // Open vent after MIN_COOLING_SLOPE_TIME_CHAMBER_VENT seconds if the // temperature didn't drop at least MIN_COOLING_SLOPE_DEG_CHAMBER_VENT if (next_cool_check_ms_2 == 0 || ELAPSED(ms, next_cool_check_ms_2)) { - if (old_temp - temp_chamber.celsius < float(MIN_COOLING_SLOPE_DEG_CHAMBER_VENT)) flag_chamber_excess_heat = true; //the bed is heating the chamber too much + if (temp_chamber.celsius - old_temp > MIN_COOLING_SLOPE_DEG_CHAMBER_VENT) + flag_chamber_excess_heat = true; // the bed is heating the chamber too much next_cool_check_ms_2 = ms + SEC_TO_MS(MIN_COOLING_SLOPE_TIME_CHAMBER_VENT); old_temp = temp_chamber.celsius; } @@ -1385,9 +1432,8 @@ void Temperature::manage_heater() { next_cool_check_ms_2 = 0; old_temp = 9999; } - if (flag_chamber_excess_heat && (temp_chamber.celsius - temp_chamber.target <= -LOW_EXCESS_HEAT_LIMIT) ) { + if (flag_chamber_excess_heat && (temp_chamber.target - temp_chamber.celsius >= LOW_EXCESS_HEAT_LIMIT)) flag_chamber_excess_heat = false; - } #endif } else if (!flag_chamber_off) { @@ -1402,17 +1448,14 @@ void Temperature::manage_heater() { } #endif - - - #if ENABLED(PIDTEMPCHAMBER) // PIDTEMPCHAMBER doens't support a CHAMBER_VENT yet. temp_chamber.soft_pwm_amount = WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; #else - if (ELAPSED(ms, next_chamber_check_ms)) { - next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL; + if (ELAPSED(ms, next_chamber_check_ms)) { + next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL; - if (WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) { + if (WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) { if (flag_chamber_excess_heat) { temp_chamber.soft_pwm_amount = 0; #if ENABLED(CHAMBER_VENT) @@ -1437,7 +1480,6 @@ void Temperature::manage_heater() { temp_chamber.soft_pwm_amount = 0; WRITE_HEATER_CHAMBER(LOW); } - } #if ENABLED(THERMAL_PROTECTION_CHAMBER) tr_state_machine[RUNAWAY_IND_CHAMBER].run(temp_chamber.celsius, temp_chamber.target, H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS); @@ -1446,6 +1488,66 @@ void Temperature::manage_heater() { #endif // HAS_HEATED_CHAMBER + #if HAS_COOLER + + #ifndef COOLER_CHECK_INTERVAL + #define COOLER_CHECK_INTERVAL 2000UL + #endif + + #if ENABLED(THERMAL_PROTECTION_COOLER) + if (degCooler() > COOLER_MAXTEMP) max_temp_error(H_COOLER); + #endif + + #if WATCH_COOLER + // Make sure temperature is decreasing + if (watch_cooler.elapsed(ms)) { // Time to check the cooler? + if (degCooler() > watch_cooler.target) // Failed to decrease enough? + _temp_error(H_COOLER, GET_TEXT(MSG_COOLING_FAILED), GET_TEXT(MSG_COOLING_FAILED)); + else + start_watching_cooler(); // Start again if the target is still far off + } + #endif + + static bool flag_cooler_state; // = false + + if (cooler.is_enabled()) { + flag_cooler_state = true; // used to allow M106 fan control when cooler is disabled + if (temp_cooler.target == 0) temp_cooler.target = COOLER_MINTEMP; + if (ELAPSED(ms, next_cooler_check_ms)) { + next_cooler_check_ms = ms + COOLER_CHECK_INTERVAL; + if (temp_cooler.celsius > temp_cooler.target) { + temp_cooler.soft_pwm_amount = temp_cooler.celsius > temp_cooler.target ? MAX_COOLER_POWER : 0; + flag_cooler_state = temp_cooler.soft_pwm_amount > 0 ? true : false; // used to allow M106 fan control when cooler is disabled + #if ENABLED(COOLER_FAN) + int16_t fan_cooler_pwm = (COOLER_FAN_BASE) + (COOLER_FAN_FACTOR) * ABS(temp_cooler.celsius - temp_cooler.target); + NOMORE(fan_cooler_pwm, 255); + set_fan_speed(COOLER_FAN_INDEX, fan_cooler_pwm); // Set cooler fan pwm + cooler_fan_flush_ms = ms + 5000; + #endif + } + else { + temp_cooler.soft_pwm_amount = 0; + #if ENABLED(COOLER_FAN) + set_fan_speed(COOLER_FAN_INDEX, temp_cooler.celsius > temp_cooler.target - 2 ? COOLER_FAN_BASE : 0); + #endif + WRITE_HEATER_COOLER(LOW); + } + } + } + else { + temp_cooler.soft_pwm_amount = 0; + if (flag_cooler_state) { + flag_cooler_state = false; + thermalManager.set_fan_speed(COOLER_FAN_INDEX, 0); + } + WRITE_HEATER_COOLER(LOW); + } + + #if ENABLED(THERMAL_PROTECTION_COOLER) + tr_state_machine[RUNAWAY_IND_COOLER].run(temp_cooler.celsius, temp_cooler.target, H_COOLER, THERMAL_PROTECTION_COOLER_PERIOD, THERMAL_PROTECTION_COOLER_HYSTERESIS); + #endif + #endif // HAS_COOLER + UNUSED(ms); } @@ -1510,6 +1612,9 @@ void Temperature::manage_heater() { #if TEMP_SENSOR_CHAMBER_IS_CUSTOM { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 } #endif + #if TEMP_SENSOR_COOLER_IS_CUSTOM + { true, 0, 0, COOLER_PULLUP_RESISTOR_OHMS, COOLER_RESISTANCE_25C_OHMS, 0, 0, COOLER_BETA, 0 } + #endif #if TEMP_SENSOR_PROBE_IS_CUSTOM { true, 0, 0, PROBE_PULLUP_RESISTOR_OHMS, PROBE_RESISTANCE_25C_OHMS, 0, 0, PROBE_BETA, 0 } #endif @@ -1543,6 +1648,7 @@ void Temperature::manage_heater() { TERN_(TEMP_SENSOR_7_IS_CUSTOM, t_index == CTI_HOTEND_7 ? PSTR("HOTEND 7") :) TERN_(TEMP_SENSOR_BED_IS_CUSTOM, t_index == CTI_BED ? PSTR("BED") :) TERN_(TEMP_SENSOR_CHAMBER_IS_CUSTOM, t_index == CTI_CHAMBER ? PSTR("CHAMBER") :) + TERN_(TEMP_SENSOR_COOLER_IS_CUSTOM, t_index == CTI_COOLER ? PSTR("COOLER") :) TERN_(TEMP_SENSOR_PROBE_IS_CUSTOM, t_index == CTI_PROBE ? PSTR("PROBE") :) nullptr ); @@ -1706,7 +1812,6 @@ void Temperature::manage_heater() { #endif // HAS_HOTEND #if HAS_HEATED_BED - // Derived from RepRap FiveD extruder::getTemperature() // For bed temperature measurement. float Temperature::analog_to_celsius_bed(const int raw) { #if TEMP_SENSOR_BED_IS_CUSTOM @@ -1725,7 +1830,6 @@ void Temperature::manage_heater() { #endif // HAS_HEATED_BED #if HAS_TEMP_CHAMBER - // Derived from RepRap FiveD extruder::getTemperature() // For chamber temperature measurement. float Temperature::analog_to_celsius_chamber(const int raw) { #if TEMP_SENSOR_CHAMBER_IS_CUSTOM @@ -1743,8 +1847,25 @@ void Temperature::manage_heater() { } #endif // HAS_TEMP_CHAMBER +#if HAS_TEMP_COOLER + // For cooler temperature measurement. + float Temperature::analog_to_celsius_cooler(const int raw) { + #if TEMP_SENSOR_COOLER_IS_CUSTOM + return user_thermistor_to_deg_c(CTI_COOLER, raw); + #elif TEMP_SENSOR_COOLER_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_COOLER, TEMPTABLE_COOLER_LEN); + #elif TEMP_SENSOR_COOLER_IS_AD595 + return TEMP_AD595(raw); + #elif TEMP_SENSOR_COOLER_IS_AD8495 + return TEMP_AD8495(raw); + #else + UNUSED(raw); + return 0; + #endif + } +#endif // HAS_TEMP_COOLER + #if HAS_TEMP_PROBE - // Derived from RepRap FiveD extruder::getTemperature() // For probe temperature measurement. float Temperature::analog_to_celsius_probe(const int raw) { #if TEMP_SENSOR_PROBE_IS_CUSTOM @@ -1776,6 +1897,7 @@ void Temperature::updateTemperaturesFromRawValues() { #endif TERN_(HAS_HEATED_BED, temp_bed.celsius = analog_to_celsius_bed(temp_bed.raw)); TERN_(HAS_TEMP_CHAMBER, temp_chamber.celsius = analog_to_celsius_chamber(temp_chamber.raw)); + TERN_(HAS_TEMP_COOLER, temp_cooler.celsius = analog_to_celsius_cooler(temp_cooler.raw)); TERN_(HAS_TEMP_PROBE, temp_probe.celsius = analog_to_celsius_probe(temp_probe.raw)); TERN_(TEMP_SENSOR_1_AS_REDUNDANT, redundant_temperature = analog_to_celsius_hotend(redundant_temperature_raw, 1)); TERN_(FILAMENT_WIDTH_SENSOR, filwidth.update_measured_mm()); @@ -1927,6 +2049,10 @@ void Temperature::init() { OUT_WRITE(HEATER_CHAMBER_PIN, HEATER_CHAMBER_INVERTING); #endif + #if HAS_COOLER + OUT_WRITE(COOLER_PIN, COOLER_INVERTING); + #endif + #if HAS_FAN0 INIT_FAN_PIN(FAN_PIN); #endif @@ -2001,6 +2127,9 @@ void Temperature::init() { #if HAS_TEMP_ADC_CHAMBER HAL_ANALOG_SELECT(TEMP_CHAMBER_PIN); #endif + #if HAS_TEMP_ADC_COOLER + HAL_ANALOG_SELECT(TEMP_COOLER_PIN); + #endif #if HAS_TEMP_ADC_PROBE HAL_ANALOG_SELECT(TEMP_PROBE_PIN); #endif @@ -2137,6 +2266,15 @@ void Temperature::init() { #endif #endif + #if HAS_COOLER + #ifdef COOLER_MINTEMP + while (analog_to_celsius_cooler(mintemp_raw_COOLER) > COOLER_MINTEMP) mintemp_raw_COOLER += TEMPDIR(COOLER) * (OVERSAMPLENR); + #endif + #ifdef COOLER_MAXTEMP + while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); + #endif + #endif + TERN_(PROBING_HEATERS_OFF, paused = false); } @@ -2174,6 +2312,17 @@ void Temperature::init() { } #endif +#if WATCH_COOLER + /** + * Start Cooling Sanity Check for cooler that is above + * its target temperature by a configurable margin. + * This is called when the temperature is set. (M143, M193) + */ + void Temperature::start_watching_cooler() { + watch_cooler.restart(degCooler(), degTargetCooler()); + } +#endif + #if HAS_THERMAL_PROTECTION Temperature::tr_state_machine_t Temperature::tr_state_machine[NR_HEATER_RUNAWAY]; // = { { TRInactive, 0 } }; @@ -2301,10 +2450,18 @@ void Temperature::disable_all_heaters() { temp_chamber.soft_pwm_amount = 0; WRITE_HEATER_CHAMBER(LOW); #endif + + #if HAS_COOLER + setTargetCooler(0); + temp_cooler.soft_pwm_amount = 0; + WRITE_HEATER_COOLER(LOW); + #endif } #if ENABLED(PRINTJOB_TIMER_AUTOSTART) + #include "printcounter.h" + bool Temperature::auto_job_over_threshold() { #if HAS_HOTEND HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true; @@ -2564,6 +2721,7 @@ void Temperature::update_raw_temperatures() { TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); TERN_(HAS_TEMP_ADC_CHAMBER, temp_chamber.update()); TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); + TERN_(HAS_TEMP_ADC_COOLER, temp_cooler.update()); TERN_(HAS_JOY_ADC_X, joystick.x.update()); TERN_(HAS_JOY_ADC_Y, joystick.y.update()); @@ -2588,6 +2746,7 @@ void Temperature::readings_ready() { TERN_(HAS_HEATED_BED, temp_bed.reset()); TERN_(HAS_TEMP_CHAMBER, temp_chamber.reset()); TERN_(HAS_TEMP_PROBE, temp_probe.reset()); + TERN_(HAS_TEMP_COOLER, temp_cooler.reset()); TERN_(HAS_JOY_ADC_X, joystick.x.reset()); TERN_(HAS_JOY_ADC_Y, joystick.y.reset()); @@ -2650,6 +2809,18 @@ void Temperature::readings_ready() { if (CHAMBERCMP(temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(H_CHAMBER); if (chamber_on && CHAMBERCMP(mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(H_CHAMBER); #endif + + #if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) + #if TEMPDIR(COOLER) < 0 + #define COOLERCMP(A,B) ((A)<(B)) + #else + #define COOLERCMP(A,B) ((A)>(B)) + #endif + if (cutter.unitPower > 0) { + if (COOLERCMP(temp_cooler.raw, maxtemp_raw_COOLER)) max_temp_error(H_COOLER); + } + if (COOLERCMP(mintemp_raw_COOLER, temp_cooler.raw)) min_temp_error(H_COOLER); + #endif } /** @@ -2735,11 +2906,15 @@ void Temperature::tick() { static SoftPWM soft_pwm_chamber; #endif + #if HAS_COOLER + static SoftPWM soft_pwm_cooler; + #endif + #define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ FAN_INVERTING) #if DISABLED(SLOW_PWM_HEATERS) - #if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_HEATED_CHAMBER, FAN_SOFT_PWM) + #if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_HEATED_CHAMBER, HAS_COOLER, FAN_SOFT_PWM) constexpr uint8_t pwm_mask = TERN0(SOFT_PWM_DITHER, _BV(SOFT_PWM_SCALE) - 1); #define _PWM_MOD(N,S,T) do{ \ const bool on = S.add(pwm_mask, T.soft_pwm_amount); \ @@ -2766,6 +2941,10 @@ void Temperature::tick() { _PWM_MOD(CHAMBER,soft_pwm_chamber,temp_chamber); #endif + #if HAS_COOLER + _PWM_MOD(COOLER,soft_pwm_cooler,temp_cooler); + #endif + #if ENABLED(FAN_SOFT_PWM) #define _FAN_PWM(N) do{ \ uint8_t &spcf = soft_pwm_count_fan[N]; \ @@ -2813,6 +2992,10 @@ void Temperature::tick() { _PWM_LOW(CHAMBER, soft_pwm_chamber); #endif + #if HAS_COOLER + _PWM_LOW(COOLER, soft_pwm_cooler); + #endif + #if ENABLED(FAN_SOFT_PWM) #if HAS_FAN0 if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0, LOW); @@ -2879,6 +3062,10 @@ void Temperature::tick() { _SLOW_PWM(CHAMBER, soft_pwm_chamber, temp_chamber); #endif + #if HAS_COOLER + _SLOW_PWM(COOLER, soft_pwm_cooler, temp_cooler); + #endif + } // slow_pwm_count == 0 #if HAS_HOTEND @@ -2894,6 +3081,10 @@ void Temperature::tick() { _PWM_OFF(CHAMBER, soft_pwm_chamber); #endif + #if HAS_COOLER + _PWM_OFF(COOLER, soft_pwm_cooler, temp_cooler); + #endif + #if ENABLED(FAN_SOFT_PWM) if (pwm_count_tmp >= 127) { pwm_count_tmp = 0; @@ -2973,6 +3164,7 @@ void Temperature::tick() { #endif TERN_(HAS_HEATED_BED, soft_pwm_bed.dec()); TERN_(HAS_HEATED_CHAMBER, soft_pwm_chamber.dec()); + TERN_(HAS_COOLER, soft_pwm_cooler.dec()); } #endif // SLOW_PWM_HEATERS @@ -3040,6 +3232,11 @@ void Temperature::tick() { case MeasureTemp_CHAMBER: ACCUMULATE_ADC(temp_chamber); break; #endif + #if HAS_TEMP_ADC_COOLER + case PrepareTemp_COOLER: HAL_START_ADC(TEMP_COOLER_PIN); break; + case MeasureTemp_COOLER: ACCUMULATE_ADC(temp_cooler); break; + #endif + #if HAS_TEMP_ADC_PROBE case PrepareTemp_PROBE: HAL_START_ADC(TEMP_PROBE_PIN); break; case MeasureTemp_PROBE: ACCUMULATE_ADC(temp_probe); break; @@ -3183,22 +3380,24 @@ void Temperature::tick() { ) { char k; switch (e) { + default: + #if HAS_TEMP_HOTEND + k = 'T'; break; + #endif + #if HAS_TEMP_BED + case H_BED: k = 'B'; break; + #endif #if HAS_TEMP_CHAMBER case H_CHAMBER: k = 'C'; break; #endif #if HAS_TEMP_PROBE case H_PROBE: k = 'P'; break; #endif - #if HAS_TEMP_HOTEND - default: k = 'T'; break; - #if HAS_HEATED_BED - case H_BED: k = 'B'; break; - #endif - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - case H_REDUNDANT: k = 'R'; break; - #endif - #elif HAS_HEATED_BED - default: k = 'B'; break; + #if HAS_TEMP_COOLER + case H_COOLER: k = 'L'; break; + #endif + #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) + case H_REDUNDANT: k = 'R'; break; #endif } SERIAL_CHAR(' ', k); @@ -3251,18 +3450,21 @@ void Temperature::tick() { ); #endif #if HAS_TEMP_CHAMBER - print_heater_state(degChamber() - #if HAS_HEATED_CHAMBER - , degTargetChamber() - #else - , 0 - #endif + print_heater_state(degChamber(), TERN0(HAS_HEATED_CHAMBER, degTargetChamber()) #if ENABLED(SHOW_TEMP_ADC_VALUES) , rawChamberTemp() #endif , H_CHAMBER ); - #endif + #endif // HAS_TEMP_CHAMBER + #if HAS_TEMP_COOLER + print_heater_state(degCooler(), TERN0(HAS_COOLER, degTargetCooler()) + #if ENABLED(SHOW_TEMP_ADC_VALUES) + , rawCoolerTemp() + #endif + , H_COOLER + ); + #endif // HAS_TEMP_COOLER #if HAS_TEMP_PROBE print_heater_state(degProbe(), 0 #if ENABLED(SHOW_TEMP_ADC_VALUES) @@ -3286,6 +3488,9 @@ void Temperature::tick() { #if HAS_HEATED_CHAMBER SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER)); #endif + #if HAS_COOLER + SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_COOLER)); + #endif #if HAS_MULTI_HOTEND HOTEND_LOOP() { SERIAL_ECHOPAIR(" @", e); @@ -3759,4 +3964,103 @@ void Temperature::tick() { #endif // HAS_HEATED_CHAMBER + #if HAS_COOLER + + #ifndef MIN_COOLING_SLOPE_DEG_COOLER + #define MIN_COOLING_SLOPE_DEG_COOLER 1.50 + #endif + #ifndef MIN_COOLING_SLOPE_TIME_COOLER + #define MIN_COOLING_SLOPE_TIME_COOLER 120 + #endif + + bool Temperature::wait_for_cooler(const bool no_wait_for_cooling/*=true*/) { + + #if TEMP_COOLER_RESIDENCY_TIME > 0 + millis_t residency_start_ms = 0; + bool first_loop = true; + // Loop until the temperature has stabilized + #define TEMP_COOLER_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME))) + #else + // Loop until the temperature is very close target + #define TEMP_COOLER_CONDITIONS (wants_to_cool ? isLaserHeating() : isLaserCooling()) + #endif + + #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) + KEEPALIVE_STATE(NOT_BUSY); + #endif + + bool wants_to_cool = false; + float target_temp = -1, previous_temp = 9999; + millis_t now, next_temp_ms = 0, next_cooling_check_ms = 0; + wait_for_heatup = true; + do { + // Target temperature might be changed during the loop + if (target_temp != degTargetCooler()) { + wants_to_cool = isLaserHeating(); + target_temp = degTargetCooler(); + + // Exit if S, continue if S, R, or R + if (no_wait_for_cooling && wants_to_cool) break; + } + + now = millis(); + if (ELAPSED(now, next_temp_ms)) { // Print Temp Reading every 1 second while heating up. + next_temp_ms = now + 1000UL; + print_heater_states(active_extruder); + #if TEMP_COOLER_RESIDENCY_TIME > 0 + SERIAL_ECHOPGM(" W:"); + if (residency_start_ms) + SERIAL_ECHO(long((SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME) - (now - residency_start_ms)) / 1000UL)); + else + SERIAL_CHAR('?'); + #endif + SERIAL_EOL(); + } + + idle(); + gcode.reset_stepper_timeout(); // Keep steppers powered + + const float current_temp = degCooler(); + + #if TEMP_COOLER_RESIDENCY_TIME > 0 + + const float temp_diff = ABS(target_temp - temp); + + if (!residency_start_ms) { + // Start the TEMP_COOLER_RESIDENCY_TIME timer when we reach target temp for the first time. + if (temp_diff < TEMP_COOLER_WINDOW) + residency_start_ms = now + (first_loop ? SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME) / 3 : 0); + } + else if (temp_diff > TEMP_COOLER_HYSTERESIS) { + // Restart the timer whenever the temperature falls outside the hysteresis. + residency_start_ms = now; + } + + first_loop = false; + #endif // TEMP_COOLER_RESIDENCY_TIME > 0 + + if (wants_to_cool) { + // Break after MIN_COOLING_SLOPE_TIME_CHAMBER seconds + // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_CHAMBER + if (!next_cooling_check_ms || ELAPSED(now, next_cooling_check_ms)) { + if (previous_temp - current_temp < float(MIN_COOLING_SLOPE_DEG_COOLER)) break; + next_cooling_check_ms = now + SEC_TO_MS(MIN_COOLING_SLOPE_TIME_COOLER); + previous_temp = current_temp; + } + } + + } while (wait_for_heatup && TEMP_COOLER_CONDITIONS); + + // Prevent a wait-forever situation if R is misused i.e. M191 R0 + if (wait_for_heatup) { + wait_for_heatup = false; + ui.reset_status(); + return true; + } + + return false; + } + + #endif // HAS_COOLER + #endif // HAS_TEMP_SENSOR diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 5f5a076911fa..e69183f6f5e4 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -44,10 +44,10 @@ #define HOTEND_INDEX TERN(HAS_MULTI_HOTEND, e, 0) #define E_NAME TERN_(HAS_MULTI_HOTEND, e) -// Heater identifiers. Positive values are hotends. Negative values are other heaters. +// Element identifiers. Positive values are hotends. Negative values are other heaters or coolers. typedef enum : int8_t { - INDEX_NONE = -5, - H_PROBE, H_REDUNDANT, H_CHAMBER, H_BED, + INDEX_NONE = -6, + H_COOLER, H_PROBE, H_REDUNDANT, H_CHAMBER, H_BED, H_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7 } heater_id_t; @@ -99,6 +99,9 @@ enum ADCSensorState : char { #if HAS_TEMP_ADC_CHAMBER PrepareTemp_CHAMBER, MeasureTemp_CHAMBER, #endif + #if HAS_TEMP_ADC_COOLER + PrepareTemp_COOLER, MeasureTemp_COOLER, + #endif #if HAS_TEMP_ADC_PROBE PrepareTemp_PROBE, MeasureTemp_PROBE, #endif @@ -218,6 +221,9 @@ struct PIDHeaterInfo : public HeaterInfo { #elif HAS_TEMP_CHAMBER typedef temp_info_t chamber_info_t; #endif +#if EITHER(HAS_COOLER, HAS_TEMP_COOLER) + typedef heater_info_t cooler_info_t; +#endif // Heater watch handling template @@ -249,6 +255,9 @@ struct HeaterWatch { #if WATCH_CHAMBER typedef struct HeaterWatch chamber_watch_t; #endif +#if WATCH_COOLER + typedef struct HeaterWatch cooler_watch_t; +#endif // Temperature sensor read value ranges typedef struct { int16_t raw_min, raw_max; } raw_range_t; @@ -288,6 +297,9 @@ typedef struct { int16_t raw_min, raw_max, mintemp, maxtemp; } temp_range_t; #if TEMP_SENSOR_CHAMBER_IS_CUSTOM CTI_CHAMBER, #endif + #if COOLER_USER_THERMISTOR + CTI_COOLER, + #endif USER_THERMISTORS }; @@ -316,9 +328,11 @@ class Temperature { TERN_(HAS_HEATED_BED, static bed_info_t temp_bed); TERN_(HAS_TEMP_PROBE, static probe_info_t temp_probe); TERN_(HAS_TEMP_CHAMBER, static chamber_info_t temp_chamber); + TERN_(HAS_TEMP_COOLER, static cooler_info_t temp_cooler); TERN_(AUTO_POWER_E_FANS, static uint8_t autofan_speed[HOTENDS]); TERN_(AUTO_POWER_CHAMBER_FAN, static uint8_t chamberfan_speed); + TERN_(AUTO_POWER_COOLER_FAN, static uint8_t coolerfan_speed); #if ENABLED(FAN_SOFT_PWM) static uint8_t soft_pwm_amount_fan[FAN_COUNT], @@ -428,6 +442,17 @@ class Temperature { #endif #endif + #if HAS_COOLER + TERN_(WATCH_COOLER, static cooler_watch_t watch_cooler); + static millis_t next_cooler_check_ms, cooler_fan_flush_ms; + #ifdef COOLER_MINTEMP + static int16_t mintemp_raw_COOLER; + #endif + #ifdef COOLER_MAXTEMP + static int16_t maxtemp_raw_COOLER; + #endif + #endif + #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED static uint8_t consecutive_low_temperature_error[HOTENDS]; #endif @@ -492,7 +517,6 @@ class Temperature { #if HAS_HOTEND static float analog_to_celsius_hotend(const int raw, const uint8_t e); #endif - #if HAS_HEATED_BED static float analog_to_celsius_bed(const int raw); #endif @@ -502,6 +526,9 @@ class Temperature { #if HAS_TEMP_CHAMBER static float analog_to_celsius_chamber(const int raw); #endif + #if HAS_TEMP_COOLER + static float analog_to_celsius_cooler(const int raw); + #endif #if HAS_FAN @@ -737,6 +764,38 @@ class Temperature { } #endif + #if HAS_TEMP_COOLER + #if ENABLED(SHOW_TEMP_ADC_VALUES) + FORCE_INLINE static int16_t rawCoolerTemp() { return temp_cooler.raw; } + #endif + FORCE_INLINE static float degCooler() { return temp_cooler.celsius; } + #if HAS_COOLER + FORCE_INLINE static int16_t degTargetCooler() { return temp_cooler.target; } + FORCE_INLINE static bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; } + FORCE_INLINE static bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; } + static bool wait_for_cooler(const bool no_wait_for_cooling=true); + #endif + #endif + + #if WATCH_COOLER + static void start_watching_cooler(); + #else + static inline void start_watching_cooler() {} + #endif + + #if HAS_COOLER + static void setTargetCooler(const int16_t celsius) { + temp_cooler.target = + #ifdef COOLER_MAXTEMP + _MIN(celsius, COOLER_MAXTEMP - 10) + #else + celsius + #endif + ; + start_watching_cooler(); + } + #endif + /** * The software PWM power for a heater */ @@ -847,7 +906,7 @@ class Temperature { static void min_temp_error(const heater_id_t e); static void max_temp_error(const heater_id_t e); - #define HAS_THERMAL_PROTECTION ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, HAS_THERMALLY_PROTECTED_BED) + #define HAS_THERMAL_PROTECTION ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, HAS_THERMALLY_PROTECTED_BED, THERMAL_PROTECTION_COOLER) #if HAS_THERMAL_PROTECTION @@ -863,6 +922,9 @@ class Temperature { #if ENABLED(THERMAL_PROTECTION_CHAMBER) RUNAWAY_IND_CHAMBER, #endif + #if ENABLED(THERMAL_PROTECTION_COOLER) + RUNAWAY_IND_COOLER, + #endif NR_HEATER_RUNAWAY }; #undef _ENUM_FOR_E @@ -872,6 +934,9 @@ class Temperature { #if HAS_THERMALLY_PROTECTED_CHAMBER if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER; #endif + #if HAS_THERMALLY_PROTECTED_CHAMBER + if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER; + #endif #if HAS_THERMALLY_PROTECTED_BED if (heater_id == H_BED) return RUNAWAY_IND_BED; #endif diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index 77fc50c8d3f4..f0ec289dfefd 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -42,7 +42,7 @@ #define OV_SCALE(N) (N) #define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE)) -#define ANY_THERMISTOR_IS(n) (TEMP_SENSOR_0_THERMISTOR_ID == n || TEMP_SENSOR_1_THERMISTOR_ID == n || TEMP_SENSOR_2_THERMISTOR_ID == n || TEMP_SENSOR_3_THERMISTOR_ID == n || TEMP_SENSOR_4_THERMISTOR_ID == n || TEMP_SENSOR_5_THERMISTOR_ID == n || TEMP_SENSOR_6_THERMISTOR_ID == n || TEMP_SENSOR_7_THERMISTOR_ID == n || TEMP_SENSOR_BED_THERMISTOR_ID == n || TEMP_SENSOR_CHAMBER_THERMISTOR_ID == n || TEMP_SENSOR_PROBE_THERMISTOR_ID == n) +#define ANY_THERMISTOR_IS(n) (TEMP_SENSOR_0_THERMISTOR_ID == n || TEMP_SENSOR_1_THERMISTOR_ID == n || TEMP_SENSOR_2_THERMISTOR_ID == n || TEMP_SENSOR_3_THERMISTOR_ID == n || TEMP_SENSOR_4_THERMISTOR_ID == n || TEMP_SENSOR_5_THERMISTOR_ID == n || TEMP_SENSOR_6_THERMISTOR_ID == n || TEMP_SENSOR_7_THERMISTOR_ID == n || TEMP_SENSOR_BED_THERMISTOR_ID == n || TEMP_SENSOR_CHAMBER_THERMISTOR_ID == n || TEMP_SENSOR_COOLER_THERMISTOR_ID == n || TEMP_SENSOR_PROBE_THERMISTOR_ID == n) typedef struct { int16_t value, celsius; } temp_entry_t; @@ -303,6 +303,14 @@ typedef struct { int16_t value, celsius; } temp_entry_t; #define TEMPTABLE_CHAMBER_LEN 0 #endif +#ifdef TEMP_SENSOR_COOLER_THERMISTOR_ID + #define TEMPTABLE_COOLER TT_NAME(TEMP_SENSOR_COOLER_THERMISTOR_ID) + #define TEMPTABLE_COOLER_LEN COUNT(TEMPTABLE_COOLER) +#elif TEMP_SENSOR_COOLER_IS_THERMISTOR + #error "No cooler thermistor table specified" +#else + #define TEMPTABLE_COOLER_LEN 0 +#endif #ifdef TEMP_SENSOR_PROBE_THERMISTOR_ID #define TEMPTABLE_PROBE TT_NAME(TEMP_SENSOR_PROBE_THERMISTOR_ID) #define TEMPTABLE_PROBE_LEN COUNT(TEMPTABLE_PROBE) @@ -319,7 +327,7 @@ static_assert( && TEMPTABLE_4_LEN < 256 && TEMPTABLE_5_LEN < 256 && TEMPTABLE_6_LEN < 256 && TEMPTABLE_7_LEN < 256 && TEMPTABLE_BED_LEN < 256 && TEMPTABLE_CHAMBER_LEN < 256 - && TEMPTABLE_PROBE_LEN < 256, + && TEMPTABLE_COOLER_LEN < 256 && TEMPTABLE_PROBE_LEN < 256, "Temperature conversion tables over 255 entries need special consideration." ); @@ -495,6 +503,15 @@ static_assert( #define TEMP_SENSOR_CHAMBER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif +#ifndef TEMP_SENSOR_COOLER_RAW_HI_TEMP + #if TT_REVRAW(COOLER) + #define TEMP_SENSOR_COOLER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_COOLER_RAW_LO_TEMP 0 + #else + #define TEMP_SENSOR_COOLER_RAW_HI_TEMP 0 + #define TEMP_SENSOR_COOLER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #endif +#endif #ifndef TEMP_SENSOR_PROBE_RAW_HI_TEMP #if TT_REVRAW(PROBE) #define TEMP_SENSOR_PROBE_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index c555ef7863ee..94165d39482c 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -27,6 +27,10 @@ #define BOARD_INFO_NAME "BTT SKR V1.4" #endif +#ifndef BOARD_CUSTOM_BUILD_FLAGS + #define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28 +#endif + // // SD Connection // diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 55240021fae0..b8cf695fb59e 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -378,7 +378,7 @@ #elif MB(BTT_SKR_V1_3) #include "lpc1768/pins_BTT_SKR_V1_3.h" // LPC1768 env:LPC1768 #elif MB(BTT_SKR_V1_4) - #include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768_btt_skr_v1_4 + #include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768 // // LPC1769 ARM Cortex M3 diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 42095fa926b4..51a00630a4cb 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -91,6 +91,9 @@ #if PIN_EXISTS(TEMP_CHAMBER) && ANALOG_OK(TEMP_CHAMBER_PIN) REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) #endif +#if PIN_EXISTS(TEMP_COOLER) && ANALOG_OK(TEMP_COOLER_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN) +#endif #if PIN_EXISTS(ADC_KEYPAD) && ANALOG_OK(ADC_KEYPAD_PIN) REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) #endif @@ -706,6 +709,9 @@ #if PIN_EXISTS(HEATER_CHAMBER) REPORT_NAME_DIGITAL(__LINE__, HEATER_CHAMBER_PIN) #endif +#if PIN_EXISTS(COOLER) + REPORT_NAME_DIGITAL(__LINE__, COOLER_PIN) +#endif #if PIN_EXISTS(HOME) REPORT_NAME_DIGITAL(__LINE__, HOME_PIN) #endif diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index 2fd599e61981..5ff3b366be1a 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -43,6 +43,9 @@ #warning "Serial 3 is originally reserved to Y limit switches. Hardware changes are required to use it." #endif +// Custom flags and defines for the build +//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ + #define BOARD_INFO_NAME "LGT KIT V1.0" // diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index f56a9ec38ed7..805c92d71a90 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -47,6 +47,9 @@ #include "env_validate.h" +// Custom flags and defines for the build +//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "RAMPS 1.4" #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index 62b6e3ff940b..e1ba91cde8f0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -36,6 +36,9 @@ #include "env_validate.h" +// Custom flags and defines for the build +//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "RAMPS S 1.2" #endif diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index d7eb1872458f..b8be00bddd08 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -676,6 +676,24 @@ #define _CHAMBER_FAN #endif +#if TEMP_SENSOR_COOLER && PIN_EXISTS(TEMP_COOLER) + #define _COOLER_TEMP analogInputToDigitalPin(TEMP_COOLER_PIN), +#else + #define _COOLER_TEMP +#endif + +#if TEMP_SENSOR_COOLER && PIN_EXISTS(COOLER) + #define _COOLER COOLER_PIN, +#else + #define _COOLER +#endif + +#if TEMP_SENSOR_COOLER && PINS_EXIST(TEMP_COOLER, COOLER_AUTO_FAN) + #define _COOLER_FAN COOLER_AUTO_FAN_PIN, +#else + #define _COOLER_FAN +#endif + #ifndef HAL_SENSITIVE_PINS #define HAL_SENSITIVE_PINS #endif @@ -685,5 +703,5 @@ _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS _E5_PINS _E6_PINS _E7_PINS \ _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS _H5_PINS _H6_PINS _H7_PINS \ _PS_ON _FAN0 _FAN1 _FAN2 _FAN3 _FAN4 _FAN5 _FAN6 _FAN7 _FANC \ - _BED_PINS _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN HAL_SENSITIVE_PINS \ + _BED_PINS _COOLER _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN HAL_SENSITIVE_PINS \ } diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies-post.py b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py new file mode 100644 index 000000000000..2b1b948119f0 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py @@ -0,0 +1,16 @@ +# +# common-dependencies-post.py +# Convenience script to add build flags for Marlin Enabled Features +# + +Import("env") +Import("projenv") + +def apply_board_build_flags(): + if not 'BOARD_CUSTOM_BUILD_FLAGS' in env['MARLIN_FEATURES']: + return + projenv.Append(CCFLAGS=env['MARLIN_FEATURES']['BOARD_CUSTOM_BUILD_FLAGS'].split()) + +# We need to add the board build flags in a post script +# so the platform build script doesn't overwrite the custom CCFLAGS +apply_board_build_flags() diff --git a/buildroot/tests/BIGTREE_SKR_PRO b/buildroot/tests/BIGTREE_SKR_PRO index 74020c1b271b..025d8cbce8f6 100755 --- a/buildroot/tests/BIGTREE_SKR_PRO +++ b/buildroot/tests/BIGTREE_SKR_PRO @@ -11,7 +11,7 @@ set -e # restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT 1 -exec_test $1 $2 "BigTreeTech SKR Pro Default Configuration" "$3" +exec_test $1 $2 "BigTreeTech SKR Pro | Default Configuration" "$3" restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ @@ -19,14 +19,15 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 opt_enable BLTOUCH EEPROM_SETTINGS AUTO_BED_LEVELING_3POINT Z_SAFE_HOMING PINS_DEBUGGING -exec_test $1 $2 "BigTreeTech SKR Pro 3 Extruders, Auto-Fan, BLTOUCH, mixed TMC drivers" "$3" +exec_test $1 $2 "BigTreeTech SKR Pro | 3 Extruders | Auto-Fan | BLTOUCH | Mixed TMC" "$3" restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ CUTTER_POWER_UNIT PERCENT \ - SPINDLE_LASER_PWM_PIN HEATER_1_PIN SPINDLE_LASER_ENA_PIN HEATER_2_PIN -opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER -exec_test $1 $2 "Laser, LCD, PERCENT power unit" "$3" + SPINDLE_LASER_PWM_PIN HEATER_1_PIN SPINDLE_LASER_ENA_PIN HEATER_2_PIN \ + TEMP_SENSOR_COOLER 1000 TEMP_COOLER_PIN PD13 +opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER +exec_test $1 $2 "BigTreeTech SKR Pro | Laser (Percent) | Cooling | LCD" "$3" # clean up restore_configs diff --git a/config/README.md b/config/README.md index b5013627eace..4bd6ab851e52 100644 --- a/config/README.md +++ b/config/README.md @@ -2,7 +2,7 @@ Marlin configurations for specific machines are now maintained in their own repository at: -## https://github.com/MarlinFirmware/Configurations +## https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x Configuration files for use with the nightly `bugfix-2.0.x` branch can be downloaded from: diff --git a/platformio.ini b/platformio.ini index 74452754ad36..d26b2a37eaab 100644 --- a/platformio.ini +++ b/platformio.ini @@ -196,6 +196,7 @@ default_src_filter = + - - + - - - + - - - - @@ -215,6 +216,7 @@ extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py pre:buildroot/share/PlatformIO/scripts/preflight-checks.py + post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py build_flags = -fmax-errors=5 -g3 -D__MARLIN_FIRMWARE__ -fmerge-constants lib_deps = @@ -405,6 +407,7 @@ SDSUPPORT = src_filter=+ + GCODE_REPEAT_MARKERS = src_filter=+ + HAS_EXTRUDERS = src_filter=+ + +HAS_COOLER = src_filter=- AUTO_REPORT_TEMPERATURES = src_filter=+ INCH_MODE_SUPPORT = src_filter=+ TEMPERATURE_UNITS_SUPPORT = src_filter=+ @@ -727,12 +730,6 @@ platform = ${common_LPC.platform} extends = common_LPC board = nxp_lpc1769 -# BTT SKR 1.4 needs a UART3 tweak -[env:LPC1768_btt_skr_v1_4] -platform = ${LPC1768.platform} -extends = env:LPC1768 -build_flags = ${env:LPC1768.build_flags} -DLPC_PINCFG_UART3_P4_28 - ################################# # # # STM32 Architecture #