From 043c8c66be1cb269f58ed432f915fe9208421b9f Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 19 Apr 2018 16:55:00 +0200 Subject: [PATCH] waiting for pinda probe cooling --- Firmware/Marlin_main.cpp | 4 ++++ Firmware/language_all.cpp | 7 +++++++ Firmware/language_all.h | 2 ++ Firmware/language_cz.h | 1 + Firmware/language_en.h | 1 + Firmware/ultralcd.cpp | 19 +++++++++++++++++++ Firmware/ultralcd.h | 1 + 7 files changed, 35 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 48182e10..c3e561cb 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3459,6 +3459,10 @@ void process_commands() st_synchronize(); lcd_show_fullscreen_message_and_wait_P(MSG_REMOVE_STEEL_SHEET); } + if ((current_temperature_pinda > 35) && (farm_mode == false)) { + //waiting for PIDNA probe to cool down in case that we are not in farm mode + lcd_wait_for_pinda(35); + } lcd_update_enable(true); KEEPALIVE_STATE(NOT_BUSY); //no need to print busy messages as we print current temperatures periodicaly SERIAL_ECHOLNPGM("PINDA probe calibration start"); diff --git a/Firmware/language_all.cpp b/Firmware/language_all.cpp index 713a81d2..98ee8ec6 100644 --- a/Firmware/language_all.cpp +++ b/Firmware/language_all.cpp @@ -2354,6 +2354,13 @@ const char * const MSG_WAITING_TEMP_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_WAITING_TEMP_CZ }; +const char MSG_WAITING_TEMP_PINDA_EN[] PROGMEM = "Waiting for PINDA probe cooling"; +const char MSG_WAITING_TEMP_PINDA_CZ[] PROGMEM = "Cekani na zchladnuti PINDA"; +const char * const MSG_WAITING_TEMP_PINDA_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_WAITING_TEMP_PINDA_EN, + MSG_WAITING_TEMP_PINDA_CZ +}; + const char MSG_WATCH_EN[] PROGMEM = "Info screen"; const char MSG_WATCH_CZ[] PROGMEM = "Informace"; const char * const MSG_WATCH_LANG_TABLE[LANG_NUM] PROGMEM = { diff --git a/Firmware/language_all.h b/Firmware/language_all.h index 1b82353b..ae827873 100644 --- a/Firmware/language_all.h +++ b/Firmware/language_all.h @@ -770,6 +770,8 @@ extern const char* const MSG_VTRAV_MIN_LANG_TABLE[1]; #define MSG_VTRAV_MIN LANG_TABLE_SELECT_EXPLICIT(MSG_VTRAV_MIN_LANG_TABLE, 0) extern const char* const MSG_WAITING_TEMP_LANG_TABLE[LANG_NUM]; #define MSG_WAITING_TEMP LANG_TABLE_SELECT(MSG_WAITING_TEMP_LANG_TABLE) +extern const char* const MSG_WAITING_TEMP_PINDA_LANG_TABLE[LANG_NUM]; +#define MSG_WAITING_TEMP_PINDA LANG_TABLE_SELECT(MSG_WAITING_TEMP_PINDA_LANG_TABLE) extern const char* const MSG_WATCH_LANG_TABLE[LANG_NUM]; #define MSG_WATCH LANG_TABLE_SELECT(MSG_WATCH_LANG_TABLE) extern const char* const MSG_WATCHDOG_RESET_LANG_TABLE[1]; diff --git a/Firmware/language_cz.h b/Firmware/language_cz.h index 0ce9233d..f7eb4f1b 100644 --- a/Firmware/language_cz.h +++ b/Firmware/language_cz.h @@ -414,3 +414,4 @@ #define MSG_CHANGED_MOTHERBOARD "Varovani: doslo ke zmene typu motherboardu." #define MSG_CHANGED_PRINTER "Varovani: doslo ke zmene typu tiskarny." #define MSG_CHANGED_BOTH "Varovani: doslo ke zmene typu tiskarny a motherboardu." +#define MSG_WAITING_TEMP_PINDA "Cekani na zchladnuti PINDA" diff --git a/Firmware/language_en.h b/Firmware/language_en.h index 88510854..4cb5b20c 100644 --- a/Firmware/language_en.h +++ b/Firmware/language_en.h @@ -422,3 +422,4 @@ #define(length=20, lines=4) MSG_CHANGED_MOTHERBOARD "Warning: motherboard type changed." #define(length=20, lines=4) MSG_CHANGED_PRINTER "Warning: printer type changed." #define(length=20, lines=4) MSG_CHANGED_BOTH "Warning: both printer type and motherboard type changed." +#define(length=20, lines=3) MSG_WAITING_TEMP_PINDA "Waiting for PINDA probe cooling" \ No newline at end of file diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index e5d69227..5996272b 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2600,6 +2600,25 @@ void lcd_adjust_z() { } +void lcd_wait_for_pinda(uint8_t temp) { + lcd_set_custom_characters_degree(); + setTargetHotend(0, 0); + setTargetBed(0); + while (current_temperature_pinda > temp){ + lcd_display_message_fullscreen_P(MSG_WAITING_TEMP_PINDA); + + lcd.setCursor(0, 4); + lcd.print(LCD_STR_THERMOMETER[0]); + lcd.print(ftostr3(current_temperature_pinda)); + lcd.print("/35"); + lcd.print(LCD_STR_DEGREE); + delay_keep_alive(1000); + serialecho_temperatures(); + } + lcd_set_custom_characters_arrows(); + lcd_update_enable(true); +} + void lcd_wait_for_heater() { lcd_display_message_fullscreen_P(MSG_WIZARD_HEATING); diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 6e20dc80..c53ac8b9 100644 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -267,6 +267,7 @@ void lcd_farm_sdcard_menu_w(); void lcd_wait_for_heater(); void lcd_wait_for_cool_down(); +void lcd_wait_for_pinda(uint8_t temp); void adjust_bed_reset(); void lcd_extr_cal_reset();