Single language support (See langtool.pl)
This commit is contained in:
parent
92e5885b34
commit
2dfb5666b9
|
|
@ -2355,9 +2355,9 @@ bool gcode_M45(bool onlyZ) {
|
|||
bool final_result = false;
|
||||
if (!onlyZ) {
|
||||
setTargetBed(0);
|
||||
setTargetHotend(0, 0);
|
||||
setTargetHotend(0, 1);
|
||||
setTargetHotend(0, 2);
|
||||
setTargetHotend0(0);
|
||||
setTargetHotend1(0);
|
||||
setTargetHotend2(0);
|
||||
adjust_bed_reset(); //reset bed level correction
|
||||
}
|
||||
|
||||
|
|
@ -7198,9 +7198,9 @@ void long_pause() //long pause print
|
|||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 15, active_extruder);
|
||||
|
||||
//set nozzle target temperature to 0
|
||||
setTargetHotend(0, 0);
|
||||
setTargetHotend(0, 1);
|
||||
setTargetHotend(0, 2);
|
||||
setTargetHotend0(0);
|
||||
setTargetHotend1(0);
|
||||
setTargetHotend2(0);
|
||||
|
||||
//Move XY to side
|
||||
current_position[X_AXIS] = X_PAUSE_POS;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
my @langs = ("en","cz","it","es","pl","de");
|
||||
# New option - single language support
|
||||
#my @langs = ("en");
|
||||
|
||||
sub parselang
|
||||
{
|
||||
|
|
@ -200,7 +202,7 @@ print $fh <<END
|
|||
#define LANG_ID_UNDEFINED 255
|
||||
|
||||
// Default language ID, if no language is selected.
|
||||
#define LANG_ID_DEFAULT LANG_ID_CZ
|
||||
#define LANG_ID_DEFAULT LANG_ID_EN
|
||||
|
||||
// Number of languages available in the language table.
|
||||
#define LANG_NUM ${num_languages}
|
||||
|
|
@ -218,10 +220,12 @@ foreach my $key (sort(keys %texts)) {
|
|||
my $strings = $texts{$key};
|
||||
if (@{$strings} == grep { $_ eq ${$strings}[0] } @{$strings}) {
|
||||
# All strings are English.
|
||||
print $fh "extern const char* const ${key}_LANG_TABLE[1];\n";
|
||||
print $fh "extern const char* const ${key}_LANG_TABLE[1];\n";
|
||||
print $fh "#define $key LANG_TABLE_SELECT_EXPLICIT(${key}_LANG_TABLE, 0)\n";
|
||||
print $fh "#define ${key}_EXPLICIT(LANG) LANG_TABLE_SELECT_EXPLICIT(${key}_LANG_TABLE, 0)\n"
|
||||
if ($key eq "MSG_LANGUAGE_NAME" || $key eq "MSG_LANGUAGE_SELECT");
|
||||
} else {
|
||||
print $fh "extern const char* const ${key}_LANG_TABLE[LANG_NUM];\n";
|
||||
print $fh "extern const char* const ${key}_LANG_TABLE[LANG_NUM];\n";
|
||||
print $fh "#define $key LANG_TABLE_SELECT(${key}_LANG_TABLE)\n";
|
||||
print $fh "#define ${key}_EXPLICIT(LANG) LANG_TABLE_SELECT_EXPLICIT(${key}_LANG_TABLE, LANG)\n"
|
||||
if ($key eq "MSG_LANGUAGE_NAME" || $key eq "MSG_LANGUAGE_SELECT");
|
||||
|
|
|
|||
|
|
@ -68,14 +68,13 @@ const char MSG_AUTO_MODE_ON_CZ[] PROGMEM = "Mod [automaticky]";
|
|||
const char MSG_AUTO_MODE_ON_IT[] PROGMEM = "Mode [auto]";
|
||||
const char MSG_AUTO_MODE_ON_ES[] PROGMEM = "Modo [auto]";
|
||||
const char MSG_AUTO_MODE_ON_PL[] PROGMEM = "Mod [auto]";
|
||||
const char MSG_AUTO_MODE_ON_DE[] PROGMEM = "Mode [Auto]";
|
||||
const char * const MSG_AUTO_MODE_ON_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_AUTO_MODE_ON_EN,
|
||||
MSG_AUTO_MODE_ON_CZ,
|
||||
MSG_AUTO_MODE_ON_IT,
|
||||
MSG_AUTO_MODE_ON_ES,
|
||||
MSG_AUTO_MODE_ON_PL,
|
||||
MSG_AUTO_MODE_ON_DE
|
||||
MSG_AUTO_MODE_ON_EN
|
||||
};
|
||||
|
||||
const char MSG_A_RETRACT_EN[] PROGMEM = "A-retract";
|
||||
|
|
@ -3668,8 +3667,18 @@ const char * const MSG_WATCHDOG_RESET_LANG_TABLE[1] PROGMEM = {
|
|||
};
|
||||
|
||||
const char MSG_WIZARD_EN[] PROGMEM = "Setup Wizard";
|
||||
const char * const MSG_WIZARD_LANG_TABLE[1] PROGMEM = {
|
||||
MSG_WIZARD_EN
|
||||
const char MSG_WIZARD_CZ[] PROGMEM = "Wizard";
|
||||
const char MSG_WIZARD_IT[] PROGMEM = "Wizard";
|
||||
const char MSG_WIZARD_ES[] PROGMEM = "Wizard";
|
||||
const char MSG_WIZARD_PL[] PROGMEM = "Wizard";
|
||||
const char MSG_WIZARD_DE[] PROGMEM = "Wizard";
|
||||
const char * const MSG_WIZARD_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||
MSG_WIZARD_EN,
|
||||
MSG_WIZARD_CZ,
|
||||
MSG_WIZARD_IT,
|
||||
MSG_WIZARD_ES,
|
||||
MSG_WIZARD_PL,
|
||||
MSG_WIZARD_DE
|
||||
};
|
||||
|
||||
const char MSG_WIZARD_CALIBRATION_FAILED_EN[] PROGMEM = "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer.";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#define LANG_ID_UNDEFINED 255
|
||||
|
||||
// Default language ID, if no language is selected.
|
||||
#define LANG_ID_DEFAULT LANG_ID_CZ
|
||||
#define LANG_ID_DEFAULT LANG_ID_EN
|
||||
|
||||
// Number of languages available in the language table.
|
||||
#define LANG_NUM 6
|
||||
|
|
@ -656,8 +656,8 @@ 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];
|
||||
#define MSG_WATCHDOG_RESET LANG_TABLE_SELECT_EXPLICIT(MSG_WATCHDOG_RESET_LANG_TABLE, 0)
|
||||
extern const char* const MSG_WIZARD_LANG_TABLE[1];
|
||||
#define MSG_WIZARD LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_LANG_TABLE, 0)
|
||||
extern const char* const MSG_WIZARD_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_WIZARD LANG_TABLE_SELECT(MSG_WIZARD_LANG_TABLE)
|
||||
extern const char* const MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE[LANG_NUM];
|
||||
#define MSG_WIZARD_CALIBRATION_FAILED LANG_TABLE_SELECT(MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE)
|
||||
extern const char* const MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE[LANG_NUM];
|
||||
|
|
|
|||
|
|
@ -1,36 +1,36 @@
|
|||
// These are the system messages, which shall always be in English.
|
||||
|
||||
+define MSG_Enqueing "enqueing \""
|
||||
+define MSG_POWERUP "PowerUp"
|
||||
define MSG_Enqueing "enqueing \""
|
||||
define MSG_POWERUP "PowerUp"
|
||||
define MSG_EXTERNAL_RESET " External Reset"
|
||||
define MSG_BROWNOUT_RESET " Brown out Reset"
|
||||
define MSG_WATCHDOG_RESET " Watchdog Reset"
|
||||
define MSG_SOFTWARE_RESET " Software Reset"
|
||||
define MSG_AUTHOR " | Author: "
|
||||
+define MSG_CONFIGURATION_VER " Last Updated: "
|
||||
+define MSG_FREE_MEMORY " Free Memory: "
|
||||
+define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
+define MSG_OK "ok"
|
||||
define MSG_CONFIGURATION_VER " Last Updated: "
|
||||
define MSG_FREE_MEMORY " Free Memory: "
|
||||
define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
define MSG_OK "ok"
|
||||
define MSG_FILE_SAVED "Done saving file."
|
||||
define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
|
||||
+define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
|
||||
+define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
|
||||
define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
|
||||
define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
|
||||
define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
|
||||
define MSG_FILE_PRINTED "Done printing file"
|
||||
+define MSG_BEGIN_FILE_LIST "Begin file list"
|
||||
+define MSG_END_FILE_LIST "End file list"
|
||||
+define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
|
||||
+define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
|
||||
+define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
|
||||
+define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
|
||||
+define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
|
||||
+define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
+define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
|
||||
+define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1.0.2; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" CUSTOM_MENDEL_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
|
||||
define MSG_BEGIN_FILE_LIST "Begin file list"
|
||||
define MSG_END_FILE_LIST "End file list"
|
||||
define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
|
||||
define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
|
||||
define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
|
||||
define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
|
||||
define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
|
||||
define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
|
||||
define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1.0.2; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" CUSTOM_MENDEL_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
|
||||
define MSG_COUNT_X " Count X: "
|
||||
+define MSG_ERR_KILLED "Printer halted. kill() called!"
|
||||
+define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
|
||||
+define MSG_RESEND "Resend: "
|
||||
define MSG_ERR_KILLED "Printer halted. kill() called!"
|
||||
define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
|
||||
define MSG_RESEND "Resend: "
|
||||
define MSG_UNKNOWN_COMMAND "Unknown command: \""
|
||||
define MSG_ACTIVE_EXTRUDER "Active Extruder: "
|
||||
define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
|
|
@ -42,69 +42,69 @@ define MSG_Y_MAX "y_max: "
|
|||
define MSG_Z_MIN "z_min: "
|
||||
define MSG_Z_MAX "z_max: "
|
||||
|
||||
+define MSG_M119_REPORT "Reporting endstop status"
|
||||
+define MSG_ENDSTOP_HIT "TRIGGERED"
|
||||
+define MSG_ENDSTOP_OPEN "open"
|
||||
+define MSG_HOTEND_OFFSET "Hotend offsets:"
|
||||
+define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
|
||||
+define MSG_SD_INIT_FAIL "SD init fail"
|
||||
+define MSG_SD_VOL_INIT_FAIL "volume.init failed"
|
||||
+define MSG_SD_OPENROOT_FAIL "openRoot failed"
|
||||
+define MSG_SD_CARD_OK "SD card ok"
|
||||
+define MSG_SD_WORKDIR_FAIL "workDir open failed"
|
||||
+define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
|
||||
+define MSG_SD_FILE_OPENED "File opened: "
|
||||
define MSG_M119_REPORT "Reporting endstop status"
|
||||
define MSG_ENDSTOP_HIT "TRIGGERED"
|
||||
define MSG_ENDSTOP_OPEN "open"
|
||||
define MSG_HOTEND_OFFSET "Hotend offsets:"
|
||||
define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
|
||||
define MSG_SD_INIT_FAIL "SD init fail"
|
||||
define MSG_SD_VOL_INIT_FAIL "volume.init failed"
|
||||
define MSG_SD_OPENROOT_FAIL "openRoot failed"
|
||||
define MSG_SD_CARD_OK "SD card ok"
|
||||
define MSG_SD_WORKDIR_FAIL "workDir open failed"
|
||||
define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
|
||||
define MSG_SD_FILE_OPENED "File opened: "
|
||||
define MSG_SD_SIZE " Size: "
|
||||
+define MSG_SD_FILE_SELECTED "File selected"
|
||||
+define MSG_SD_WRITE_TO_FILE "Writing to file: "
|
||||
+define MSG_SD_PRINTING_BYTE "SD printing byte "
|
||||
+define MSG_SD_NOT_PRINTING "Not SD printing"
|
||||
+define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
|
||||
+define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
|
||||
+define MSG_STEPPER_TOO_HIGH "Steprate too high: "
|
||||
+define MSG_ENDSTOPS_HIT "endstops hit: "
|
||||
+define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
|
||||
define MSG_SD_FILE_SELECTED "File selected"
|
||||
define MSG_SD_WRITE_TO_FILE "Writing to file: "
|
||||
define MSG_SD_PRINTING_BYTE "SD printing byte "
|
||||
define MSG_SD_NOT_PRINTING "Not SD printing"
|
||||
define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
|
||||
define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
|
||||
define MSG_STEPPER_TOO_HIGH "Steprate too high: "
|
||||
define MSG_ENDSTOPS_HIT "endstops hit: "
|
||||
define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
|
||||
define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
|
||||
+define MSG_BABYSTEPPING_X "Babystepping X"
|
||||
+define MSG_BABYSTEPPING_Y "Babystepping Y"
|
||||
+define MSG_BABYSTEPPING_Z "Adjusting Z"
|
||||
+define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure"
|
||||
+define MSG_SET_HOME_OFFSETS "Set home offsets"
|
||||
+define MSG_SET_ORIGIN "Set origin"
|
||||
define MSG_BABYSTEPPING_X "Babystepping X"
|
||||
define MSG_BABYSTEPPING_Y "Babystepping Y"
|
||||
define MSG_BABYSTEPPING_Z "Adjusting Z"
|
||||
define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure"
|
||||
define MSG_SET_HOME_OFFSETS "Set home offsets"
|
||||
define MSG_SET_ORIGIN "Set origin"
|
||||
define MSG_ON "On "
|
||||
define MSG_OFF "Off"
|
||||
|
||||
+define MSG_VMIN "Vmin"
|
||||
+define MSG_VTRAV_MIN "VTrav min"
|
||||
+define MSG_AMAX "Amax "
|
||||
+define MSG_A_RETRACT "A-retract"
|
||||
+define MSG_MOVE_01MM "Move 0.1mm"
|
||||
+define MSG_MOVE_1MM "Move 1mm"
|
||||
+define MSG_MOVE_10MM "Move 10mm"
|
||||
define MSG_VMIN "Vmin"
|
||||
define MSG_VTRAV_MIN "VTrav min"
|
||||
define MSG_AMAX "Amax "
|
||||
define MSG_A_RETRACT "A-retract"
|
||||
define MSG_MOVE_01MM "Move 0.1mm"
|
||||
define MSG_MOVE_1MM "Move 1mm"
|
||||
define MSG_MOVE_10MM "Move 10mm"
|
||||
|
||||
|
||||
+define MSG_NOZZLE1 "Nozzle2"
|
||||
+define MSG_NOZZLE2 "Nozzle3"
|
||||
+define MSG_FLOW0 "Flow 0"
|
||||
+define MSG_FLOW1 "Flow 1"
|
||||
+define MSG_FLOW2 "Flow 2"
|
||||
+define MSG_CONTROL "Control"
|
||||
+define MSG_MIN " \002 Min"
|
||||
+define MSG_MAX " \002 Max"
|
||||
+define MSG_FACTOR " \002 Fact"
|
||||
+define MSG_MOTION "Motion"
|
||||
+define MSG_VOLUMETRIC "Filament"
|
||||
+define MSG_VOLUMETRIC_ENABLED "E in mm3"
|
||||
+define MSG_STORE_EPROM "Store memory"
|
||||
+define MSG_LOAD_EPROM "Load memory"
|
||||
+define MSG_RESTORE_FAILSAFE "Restore failsafe"
|
||||
+define MSG_REFRESH "\xF8" "Refresh"
|
||||
define MSG_NOZZLE1 "Nozzle2"
|
||||
define MSG_NOZZLE2 "Nozzle3"
|
||||
define MSG_FLOW0 "Flow 0"
|
||||
define MSG_FLOW1 "Flow 1"
|
||||
define MSG_FLOW2 "Flow 2"
|
||||
define MSG_CONTROL "Control"
|
||||
define MSG_MIN " \002 Min"
|
||||
define MSG_MAX " \002 Max"
|
||||
define MSG_FACTOR " \002 Fact"
|
||||
define MSG_MOTION "Motion"
|
||||
define MSG_VOLUMETRIC "Filament"
|
||||
define MSG_VOLUMETRIC_ENABLED "E in mm3"
|
||||
define MSG_STORE_EPROM "Store memory"
|
||||
define MSG_LOAD_EPROM "Load memory"
|
||||
define MSG_RESTORE_FAILSAFE "Restore failsafe"
|
||||
define MSG_REFRESH "\xF8" "Refresh"
|
||||
|
||||
+define MSG_INIT_SDCARD "Init. SD card"
|
||||
+define MSG_CNG_SDCARD "Change SD card"
|
||||
define MSG_INIT_SDCARD "Init. SD card"
|
||||
define MSG_CNG_SDCARD "Change SD card"
|
||||
define MSG_ZPROBE_OUT "Z probe out. bed"
|
||||
define MSG_POSITION_UNKNOWN "Home X/Y before Z"
|
||||
define MSG_ZPROBE_ZOFFSET "Z Offset"
|
||||
+define MSG_BABYSTEP_X "Babystep X"
|
||||
+define MSG_BABYSTEP_Y "Babystep Y"
|
||||
+define MSG_RECTRACT "Rectract"
|
||||
define MSG_BABYSTEP_X "Babystep X"
|
||||
define MSG_BABYSTEP_Y "Babystep Y"
|
||||
define MSG_RECTRACT "Rectract"
|
||||
|
|
|
|||
|
|
@ -184,8 +184,9 @@ static void lcd_main_menu();
|
|||
static void lcd_tune_menu();
|
||||
static void lcd_settings_menu();
|
||||
static void lcd_calibration_menu();
|
||||
#if (LNAG_NUM > 1)
|
||||
static void lcd_language_menu();
|
||||
|
||||
#endif
|
||||
static void lcd_control_temperature_menu();
|
||||
|
||||
static void lcd_babystep_z();
|
||||
|
|
@ -246,7 +247,9 @@ static void menu_action_back(menuFunc_t data);
|
|||
static void menu_action_submenu(menuFunc_t data);
|
||||
static void menu_action_gcode(const char* pgcode);
|
||||
static void menu_action_function(menuFunc_t data);
|
||||
#if (LANG_NUM > 1)
|
||||
static void menu_action_setlang(unsigned char lang);
|
||||
#endif
|
||||
static void menu_action_sdfile(const char* filename, char* longFilename);
|
||||
static void menu_action_sddirectory(const char* filename, char* longFilename);
|
||||
static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
|
||||
|
|
@ -380,7 +383,7 @@ static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder = 0, const boo
|
|||
}
|
||||
|
||||
/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
|
||||
|
||||
#if (LANG_NUM > 1)
|
||||
// Language selection dialog not active.
|
||||
#define LANGSEL_OFF 0
|
||||
// Language selection dialog modal, entered from the info screen. This is the case on firmware boot up,
|
||||
|
|
@ -390,9 +393,11 @@ static void lcd_goto_menu(menuFunc_t menu, const uint32_t encoder = 0, const boo
|
|||
#define LANGSEL_ACTIVE 2
|
||||
// Language selection dialog status
|
||||
unsigned char langsel = LANGSEL_OFF;
|
||||
#endif
|
||||
|
||||
void set_language_from_EEPROM() {
|
||||
unsigned char eep = eeprom_read_byte((unsigned char*)EEPROM_LANG);
|
||||
#if (LANG_NUM > 1)
|
||||
if (eep < LANG_NUM)
|
||||
{
|
||||
lang_selected = eep;
|
||||
|
|
@ -405,6 +410,13 @@ void set_language_from_EEPROM() {
|
|||
// Invalid language, enter the language selection screen in a modal mode.
|
||||
langsel = LANGSEL_MODAL;
|
||||
}
|
||||
#else
|
||||
lang_selected = LANG_ID_DEFAULT;
|
||||
if (eep != LANG_ID_DEFAULT)
|
||||
{
|
||||
eeprom_update_byte((unsigned char *)EEPROM_LANG, LANG_ID_DEFAULT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void lcd_status_screen()
|
||||
|
|
@ -423,12 +435,6 @@ static void lcd_status_screen()
|
|||
eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, 0);
|
||||
eeprom_update_dword((uint32_t *)EEPROM_FILAMENTUSED, 0);
|
||||
}
|
||||
|
||||
if (langsel) {
|
||||
//strncpy_P(lcd_status_message, PSTR(">>>>>>>>>>>> PRESS v"), LCD_WIDTH);
|
||||
// Entering the language selection screen in a modal mode.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -522,8 +528,6 @@ static void lcd_status_screen()
|
|||
}
|
||||
|
||||
|
||||
//if (--langsel ==0) {langsel=1;current_click=true;}
|
||||
|
||||
if (current_click && (lcd_commands_type != LCD_COMMAND_STOP_PRINT)) //click is aborted unless stop print finishes
|
||||
{
|
||||
|
||||
|
|
@ -1225,9 +1229,9 @@ void lcd_commands()
|
|||
cancel_heatup = true;
|
||||
setTargetBed(0);
|
||||
#ifndef SNMM
|
||||
setTargetHotend(0, 0); //heating when changing filament for multicolor
|
||||
setTargetHotend(0, 1);
|
||||
setTargetHotend(0, 2);
|
||||
setTargetHotend0(0); //heating when changing filament for multicolor
|
||||
setTargetHotend1(0);
|
||||
setTargetHotend2(0);
|
||||
#endif
|
||||
manage_heater();
|
||||
custom_message = true;
|
||||
|
|
@ -3173,10 +3177,12 @@ static void lcd_set_lang(unsigned char lang) {
|
|||
lang_selected = lang;
|
||||
firstrun = 1;
|
||||
eeprom_update_byte((unsigned char *)EEPROM_LANG, lang);
|
||||
/*langsel=0;*/
|
||||
|
||||
#if (LANG_NUM > 1)
|
||||
if (langsel == LANGSEL_MODAL)
|
||||
// From modal mode to an active mode? This forces the menu to return to the setup menu.
|
||||
langsel = LANGSEL_ACTIVE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !SDSORT_USES_RAM
|
||||
|
|
@ -3193,6 +3199,7 @@ void lcd_force_language_selection() {
|
|||
eeprom_update_byte((unsigned char *)EEPROM_LANG, LANG_ID_FORCE_SELECTION);
|
||||
}
|
||||
|
||||
#if (LANG_NUM > 1)
|
||||
static void lcd_language_menu()
|
||||
{
|
||||
START_MENU();
|
||||
|
|
@ -3206,6 +3213,7 @@ static void lcd_language_menu()
|
|||
}
|
||||
END_MENU();
|
||||
}
|
||||
#endif
|
||||
|
||||
void lcd_mesh_bedleveling()
|
||||
{
|
||||
|
|
@ -3585,7 +3593,9 @@ static void lcd_settings_menu()
|
|||
{
|
||||
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
|
||||
}
|
||||
#if (LANG_NUM > 1)
|
||||
MENU_ITEM(submenu, MSG_LANGUAGE_SELECT, lcd_language_menu);
|
||||
#endif
|
||||
|
||||
if (card.ToshibaFlashAir_isEnabled()) {
|
||||
MENU_ITEM(function, MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_ON, lcd_toshiba_flash_air_compatibility_toggle);
|
||||
|
|
@ -3657,6 +3667,7 @@ static void lcd_calibration_menu()
|
|||
END_MENU();
|
||||
}
|
||||
|
||||
#if (LANG_NUM > 1)
|
||||
void lcd_mylang_drawmenu(int cursor) {
|
||||
int first = 0;
|
||||
if (cursor>3) first = cursor-3;
|
||||
|
|
@ -3779,6 +3790,11 @@ void lcd_mylang() {
|
|||
lcd_return_to_status();
|
||||
|
||||
}
|
||||
#else
|
||||
void lcd_mylang() {
|
||||
lcd_set_lang(LANG_ID_DEFAULT);
|
||||
}
|
||||
#endif
|
||||
|
||||
void bowden_menu() {
|
||||
int enc_dif = encoderDiff;
|
||||
|
|
@ -5859,9 +5875,11 @@ static void menu_action_submenu(menuFunc_t data) {
|
|||
static void menu_action_gcode(const char* pgcode) {
|
||||
enquecommand_P(pgcode);
|
||||
}
|
||||
#if (LANG_NUM > 1)
|
||||
static void menu_action_setlang(unsigned char lang) {
|
||||
lcd_set_lang(lang);
|
||||
}
|
||||
#endif
|
||||
static void menu_action_function(menuFunc_t data) {
|
||||
(*data)();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue