New ML support - language.c, language.h - code fixed, Marlin_main.cpp - debug output
This commit is contained in:
parent
d979c3dffc
commit
f00a9ce636
@ -1258,10 +1258,18 @@ 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();
|
||||
}
|
||||
|
||||
/// lang_selected = eeprom_read_byte((uint8_t*)EEPROM_LANG);
|
||||
/// if (lang_selected >= LANG_NUM){
|
||||
/// lcd_mylang();
|
||||
/// }
|
||||
lang_select(0);
|
||||
puts_P(_n("\nNew ML support"));
|
||||
printf_P(_n(" lang_selected =%d\n"), lang_selected);
|
||||
printf_P(_n(" &_SEC_LANG =%04x\n"), &_SEC_LANG);
|
||||
printf_P(_n(" sizeof(_SEC_LANG) =%04x\n"), sizeof(_SEC_LANG));
|
||||
puts_P(_n("\n"));
|
||||
|
||||
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE) == 255) {
|
||||
eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
|
||||
|
@ -10,7 +10,7 @@ unsigned char lang_selected = 0;
|
||||
#if (LANG_MODE == 0) //primary language only
|
||||
#else //(LANG_MODE == 0)
|
||||
//reserved xx kbytes for secondary language table
|
||||
static const char _SEC_LANG[LANG_SIZE_RESERVED] PROGMEM_I2 = "_SEC_LANG";
|
||||
const char _SEC_LANG[LANG_SIZE_RESERVED] PROGMEM_I2 = "_SEC_LANG";
|
||||
#endif //(LANG_MODE == 0)
|
||||
|
||||
//lang_table_t structure - 16byte header
|
||||
|
@ -21,11 +21,6 @@
|
||||
#define STRINGIFY_(n) #n
|
||||
#define STRINGIFY(n) STRINGIFY_(n)
|
||||
|
||||
#if (LANG_MODE == 0)
|
||||
//#define _i PSTR
|
||||
//#define _I(s) (__extension__({static const char __c[] __attribute__((section("Txt_i"))) = s; &__c[0];}))
|
||||
#endif //(LANG_MODE == 0)
|
||||
|
||||
//section progmem0 will be used for localized translated strings
|
||||
#define PROGMEM_I2 __attribute__((section(".progmem0")))
|
||||
//section progmem1 will be used for localized strings in english
|
||||
@ -70,6 +65,10 @@ extern "C" {
|
||||
// Currectly active language selection.
|
||||
extern unsigned char lang_selected;
|
||||
|
||||
#if (LANG_MODE != 0)
|
||||
extern const char _SEC_LANG[LANG_SIZE_RESERVED];
|
||||
#endif //(LANG_MODE == 0)
|
||||
|
||||
extern const char* lang_get_translation(const char* s);
|
||||
extern const char* lang_select(unsigned char lang);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user