diff --git a/UI.hpp b/UI.hpp index a274bfe..3b37ab9 100644 --- a/UI.hpp +++ b/UI.hpp @@ -2808,7 +2808,10 @@ void UI_func_epiano_pan_tremolo(uint8_t param) lcd_display_bar_int("EP Trem. Width", configuration.epiano.pan_tremolo, 1.0, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 3, false, false, false); #if defined(USE_EPIANO) - ep.setPanTremolo(mapfloat(configuration.epiano.pan_tremolo, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 0, 1.0)); + if (configuration.epiano.pan_tremolo == 0) + ep.setPanTremolo(0.0); + else + ep.setPanTremolo(mapfloat(configuration.epiano.pan_tremolo, EP_PAN_TREMOLO_MIN, EP_PAN_TREMOLO_MAX, 0.0, 1.0)); #endif } @@ -2847,7 +2850,10 @@ void UI_func_epiano_pan_lfo(uint8_t param) lcd_display_bar_int("EP LFO", configuration.epiano.pan_lfo, 1.0, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 3, false, false, false); #if defined(USE_EPIANO) - ep.setPanLFO(mapfloat(configuration.epiano.pan_lfo, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 0, 1.0)); + if (configuration.epiano.pan_lfo == 0) + ep.setPanLFO(0.0); + else + ep.setPanLFO(mapfloat(configuration.epiano.pan_lfo, EP_PAN_LFO_MIN, EP_PAN_LFO_MAX, 0.0, 1.0)); #endif } @@ -7331,7 +7337,7 @@ void UI_func_save_performance(uint8_t param) } encoderDir[ENC_R].reset(); } - + if (LCDML.FUNC_close()) // ****** STABLE END ********* { if (mode < 0xff) diff --git a/third-party/LCDMenuLib2/src/LCDMenuLib2.h b/third-party/LCDMenuLib2/src/LCDMenuLib2.h index 1b344d8..f63b3a0 100644 --- a/third-party/LCDMenuLib2/src/LCDMenuLib2.h +++ b/third-party/LCDMenuLib2/src/LCDMenuLib2.h @@ -44,7 +44,7 @@ // ####################### // // you can change this parameters - #define _LCDML_cfg_use_ram // enable this line when you want to use the ram mode + //#define _LCDML_cfg_use_ram // enable this line when you want to use the ram mode // set the number of custom events (this could be a button ore something else) #define _LCDML_CE_cb_function_cnt 4 // this is the number of custom event callback functions which are supported diff --git a/third-party/LCDMenuLib2/src/LCDMenuLib2_macros.h b/third-party/LCDMenuLib2/src/LCDMenuLib2_macros.h index 391f13f..4990e7d 100644 --- a/third-party/LCDMenuLib2/src/LCDMenuLib2_macros.h +++ b/third-party/LCDMenuLib2/src/LCDMenuLib2_macros.h @@ -91,23 +91,41 @@ #define LCDML_DISP_initFunction(N) LCDML_DISP_func_repeat(N); #ifndef _LCDML_cfg_use_ram - // stored in flash (Arduino) - #define LCDML_langDef(name, lang, content) \ - const char g_LCDML_DISP_lang_ ## lang ## _ ## name ##_var[] PROGMEM = {content} - - #define LCDML_getCustomContent(lang, var, id) \ - if(id < _LCDML_NO_FUNC) {\ - strcpy_P(var, (char*)pgm_read_word(&(g_LCDML_DISP_lang_ ## lang ## _table[id]))); \ - } - - #define LCDML_createCustomLang(N, lang) \ - const char * const g_LCDML_DISP_lang_ ## lang ## _table[] PROGMEM = { LCDML_DISP_lang_repeat(N, lang) } - - #define LCDML_getCustomElementName(lang, var, element_id) \ - if(element_id < _LCDML_NO_FUNC && (sizeof(g_LCDML_DISP_lang_ ## lang ## _table)-1) >= element_id) {\ - strcpy_P(var, (char*)pgm_read_word(&(g_LCDML_DISP_lang_ ## lang ## _table[element_id])));\ - } - + #if defined(__IMXRT1062__) || defined (ARDUINO_TEENSY40) || defined (ARDUINO_TEENSY41) || defined(__MK66FX1M0__) || defined (__MK64FX512__) + // stored in flash (Teensy-3.5/Teensy-3.6/Teensy-4.x) + #define LCDML_langDef(name, lang, content) \ + const char g_LCDML_DISP_lang_ ## lang ## _ ## name ##_var[] = {content} + + #define LCDML_getCustomContent(lang, var, id) \ + if(id < _LCDML_NO_FUNC) {\ + strcpy(var, g_LCDML_DISP_lang_ ## lang ## _table[id]); \ + } + + #define LCDML_createCustomLang(N, lang) \ + const char * g_LCDML_DISP_lang_ ## lang ## _table[] = { LCDML_DISP_lang_repeat(N, lang) } + + #define LCDML_getCustomElementName(lang, var, element_id) \ + if(element_id < _LCDML_NO_FUNC && (sizeof(g_LCDML_DISP_lang_ ## lang ## _table)-1) >= element_id) {\ + strcpy(var, g_LCDML_DISP_lang_ ## lang ## _table[element_id]);\ + } + #else + // stored in flash (Arduino) + #define LCDML_langDef(name, lang, content) \ + const char g_LCDML_DISP_lang_ ## lang ## _ ## name ##_var[] PROGMEM = {content} + + #define LCDML_getCustomContent(lang, var, id) \ + if(id < _LCDML_NO_FUNC) {\ + strcpy_P(var, (char*)pgm_read_word(&(g_LCDML_DISP_lang_ ## lang ## _table[id]))); \ + } + + #define LCDML_createCustomLang(N, lang) \ + const char * const g_LCDML_DISP_lang_ ## lang ## _table[] PROGMEM = { LCDML_DISP_lang_repeat(N, lang) } + + #define LCDML_getCustomElementName(lang, var, element_id) \ + if(element_id < _LCDML_NO_FUNC && (sizeof(g_LCDML_DISP_lang_ ## lang ## _table)-1) >= element_id) {\ + strcpy_P(var, (char*)pgm_read_word(&(g_LCDML_DISP_lang_ ## lang ## _table[element_id])));\ + } + #endif #else // stored in ram (esp, stm, other controllers) #define LCDML_langDef(name, lang, content) \ @@ -125,7 +143,6 @@ if(element_id < _LCDML_NO_FUNC && (sizeof(g_LCDML_DISP_lang_ ## lang ## _table)-1) >= element_id) {\ strcpy(var, g_LCDML_DISP_lang_ ## lang ## _table[element_id]);\ } - #endif #define LCDML_getElementName(var, element_id) \