New ML support - cond.trans. for LANG_MODE 0
This commit is contained in:
parent
1e35067c3f
commit
076258ff99
@ -989,6 +989,8 @@ void erase_eeprom_section(uint16_t offset, uint16_t bytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if (LANG_MODE != 0) //secondary language support
|
||||||
|
|
||||||
#ifdef W25X20CL
|
#ifdef W25X20CL
|
||||||
|
|
||||||
#include "bootapp.h" //bootloader support
|
#include "bootapp.h" //bootloader support
|
||||||
@ -1076,6 +1078,8 @@ void list_sec_lang_from_external_flash()
|
|||||||
|
|
||||||
#endif //W25X20CL
|
#endif //W25X20CL
|
||||||
|
|
||||||
|
#endif //(LANG_MODE != 0)
|
||||||
|
|
||||||
|
|
||||||
// "Setup" function is called by the Arduino framework on startup.
|
// "Setup" function is called by the Arduino framework on startup.
|
||||||
// Before startup, the Timers-functions (PWM)/Analog RW and HardwareSerial provided by the Arduino-code
|
// Before startup, the Timers-functions (PWM)/Analog RW and HardwareSerial provided by the Arduino-code
|
||||||
@ -1089,12 +1093,14 @@ void setup()
|
|||||||
|
|
||||||
lcd_splash();
|
lcd_splash();
|
||||||
|
|
||||||
|
#if (LANG_MODE != 0) //secondary language support
|
||||||
#ifdef W25X20CL
|
#ifdef W25X20CL
|
||||||
if (w25x20cl_init())
|
if (w25x20cl_init())
|
||||||
update_sec_lang_from_external_flash();
|
update_sec_lang_from_external_flash();
|
||||||
else
|
else
|
||||||
kill(_i("External SPI flash W25X20CL not responding."));
|
kill(_i("External SPI flash W25X20CL not responding."));
|
||||||
#endif //W25X20CL
|
#endif //W25X20CL
|
||||||
|
#endif //(LANG_MODE != 0)
|
||||||
|
|
||||||
setup_killpin();
|
setup_killpin();
|
||||||
setup_powerhold();
|
setup_powerhold();
|
||||||
@ -1478,6 +1484,8 @@ void setup()
|
|||||||
// is being written into the EEPROM, so the update procedure will be triggered only once.
|
// is being written into the EEPROM, so the update procedure will be triggered only once.
|
||||||
|
|
||||||
|
|
||||||
|
#if (LANG_MODE != 0) //secondary language support
|
||||||
|
|
||||||
#ifdef DEBUG_W25X20CL
|
#ifdef DEBUG_W25X20CL
|
||||||
W25X20CL_SPI_ENTER();
|
W25X20CL_SPI_ENTER();
|
||||||
uint8_t uid[8]; // 64bit unique id
|
uint8_t uid[8]; // 64bit unique id
|
||||||
@ -1501,7 +1509,9 @@ void setup()
|
|||||||
|
|
||||||
// lang_print_sec_lang(uartout);
|
// lang_print_sec_lang(uartout);
|
||||||
#endif //DEBUG_SEC_LANG
|
#endif //DEBUG_SEC_LANG
|
||||||
|
|
||||||
|
#endif //(LANG_MODE != 0)
|
||||||
|
|
||||||
if (eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE) == 255) {
|
if (eeprom_read_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE) == 255) {
|
||||||
eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
|
eeprom_write_byte((uint8_t*)EEPROM_TEMP_CAL_ACTIVE, 0);
|
||||||
temp_cal_active = false;
|
temp_cal_active = false;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
//LANG - Multi-language support
|
//LANG - Multi-language support
|
||||||
//#define LANG_MODE 0 // primary language only
|
//#define LANG_MODE 0 // primary language only
|
||||||
#define LANG_MODE 1 // sec. language support
|
#define LANG_MODE 0 // sec. language support
|
||||||
#define LANG_SIZE_RESERVED 0x2700 // reserved space for secondary language (~10kb)
|
#define LANG_SIZE_RESERVED 0x2700 // reserved space for secondary language (~10kb)
|
||||||
//#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
|
//#define LANG_SIZE_RESERVED 0x1ef8 // reserved space for secondary language (~10kb)
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ uint8_t lang_select(uint8_t lang) { return 0; }
|
|||||||
uint8_t lang_get_count() { return 1; }
|
uint8_t lang_get_count() { return 1; }
|
||||||
uint16_t lang_get_code(uint8_t lang) { return LANG_CODE_EN; }
|
uint16_t lang_get_code(uint8_t lang) { return LANG_CODE_EN; }
|
||||||
const char* lang_get_name_by_code(uint16_t code) { return _n("English"); }
|
const char* lang_get_name_by_code(uint16_t code) { return _n("English"); }
|
||||||
|
void lang_reset(void) { }
|
||||||
|
uint8_t lang_is_selected(void) { return 1; }
|
||||||
|
|
||||||
#else //(LANG_MODE == 0) //secondary languages in progmem or xflash
|
#else //(LANG_MODE == 0) //secondary languages in progmem or xflash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user