From 11dac765e733fb5b5c5f66d9aa832cc03a76b81e Mon Sep 17 00:00:00 2001 From: michalprusa Date: Wed, 17 Aug 2016 11:56:31 +0200 Subject: [PATCH] Language selection menu moved to marlin_main before printer calibration test. --- Firmware/Marlin_main.cpp | 6 +++++- Firmware/ultralcd.cpp | 4 ++-- Firmware/ultralcd.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index e449d15a..00659efd 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1034,7 +1034,11 @@ void setup() // In the future, somewhere here would one compare the current firmware version against the firmware version stored in the EEPROM. // If they differ, an update procedure may need to be performed. At the end of this block, the current firmware version // is being written into the EEPROM, so the update procedure will be triggered only once. - + lang_selected = eeprom_read_byte((uint8_t*)EEPROM_LANG); + if (lang_selected >= LANG_NUM){ + lcd_mylang(); + } + if (eeprom_read_byte((uint8_t*)EEPROM_BABYSTEP_Z_SET) == 0x0ff) { // Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled. // eeprom_update_byte((uint8_t*)EEPROM_BABYSTEP_X, 0x0ff); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 4326b2a4..2da15dda 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -347,7 +347,7 @@ static void lcd_status_screen() if (langsel) { //strncpy_P(lcd_status_message, PSTR(">>>>>>>>>>>> PRESS v"), LCD_WIDTH); // Entering the language selection screen in a modal mode. - lcd_mylang(); + } } @@ -2266,7 +2266,7 @@ void lcd_mylang() { enc_dif = encoderDiff; - while ( (lang_selected == 255) && (MYSERIAL.available() < 2) ) { + while ( (lang_selected == 255) ) { manage_heater(); manage_inactivity(true); diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index c24d9f3e..19563849 100644 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -28,7 +28,7 @@ void lcd_sdcard_stop(); void prusa_statistics(int _message); void lcd_confirm_print(); - +void lcd_mylang(); bool lcd_detected(void); static void lcd_selftest();