MBL toggle and cleanup

This commit is contained in:
Alex Voinea 2019-11-09 20:58:56 +02:00
parent 20a59f5f40
commit 11428388c6
10 changed files with 218 additions and 567 deletions

View File

@ -125,6 +125,9 @@ const char MSG_SOUND[] PROGMEM_I1 = ISTR("Sound"); ////
const char MSG_SOUND_LOUD[] PROGMEM_I1 = ISTR("Loud"); ////
const char MSG_SOUND_ONCE[] PROGMEM_I1 = ISTR("Once"); ////
const char MSG_SOUND_BLIND[] PROGMEM_I1 = ISTR("Assist"); ////
const char MSG_MESH[] PROGMEM_I1 = ISTR("Mesh"); ////
const char MSG_Z_PROBE_NR[] PROGMEM_I1 = ISTR("Z-probe nr."); ////
const char MSG_MAGNETS_COMP[] PROGMEM_I1 = ISTR("Magnets comp."); ////
//not internationalized messages
const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////

View File

@ -125,6 +125,9 @@ extern const char MSG_SOUND[];
extern const char MSG_SOUND_LOUD[];
extern const char MSG_SOUND_ONCE[];
extern const char MSG_SOUND_BLIND[];
extern const char MSG_MESH[];
extern const char MSG_Z_PROBE_NR[];
extern const char MSG_MAGNETS_COMP[];
//not internationalized messages
extern const char MSG_BROWNOUT_RESET[];

View File

@ -5530,7 +5530,6 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,nDiameter);
#define SETTINGS_NOZZLE \
do\
{\
char sNozzleDiam[5];/*enough for two decimals*/\
float fNozzleDiam;\
switch(oNozzleDiameter)\
{\
@ -5539,8 +5538,7 @@ do\
case ClNozzleDiameter::_Diameter_600: fNozzleDiam = 0.6f; break;\
default: fNozzleDiam = 0.4f; break;\
}\
sprintf_P(sNozzleDiam, PSTR("%.2f"), fNozzleDiam);\
MENU_ITEM_TOGGLE(_T(MSG_NOZZLE_DIAMETER), sNozzleDiam, lcd_nozzle_diameter_set);\
MENU_ITEM_TOGGLE(_T(MSG_NOZZLE_DIAMETER), ftostr12ns(fNozzleDiam), lcd_nozzle_diameter_set);\
}\
while (0)
@ -7105,21 +7103,19 @@ static void lcd_mesh_bed_leveling_settings()
bool magnet_elimination = (eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION) > 0);
uint8_t points_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_POINTS_NR);
char sToggle[4]; //enough for nxn format
MENU_BEGIN();
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
if(points_nr == 3) MENU_ITEM_FUNCTION_P(_i("Mesh [3x3]"), mbl_mesh_toggle); ////MSG_MESH_3x3 c=18
else MENU_ITEM_FUNCTION_P(_i("Mesh [7x7]"), mbl_mesh_toggle); ////MSG_MESH_7x7 c=18
switch (mbl_z_probe_nr) {
case 1: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [1]"), mbl_probe_nr_toggle); break; ////MSG_Z_PROBE_NR_1 c=18
case 5: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [5]"), mbl_probe_nr_toggle); break; ////MSG_Z_PROBE_NR_1 c=18
default: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [3]"), mbl_probe_nr_toggle); break; ////MSG_Z_PROBE_NR_1 c=18
}
if (points_nr == 7) {
if (magnet_elimination) MENU_ITEM_FUNCTION_P(_i("Magnets comp. [On]"), mbl_magnets_elimination_toggle); ////MSG_MAGNETS_COMP_ON c=18
else MENU_ITEM_FUNCTION_P(_i("Magnets comp.[Off]"), mbl_magnets_elimination_toggle); ////MSG_MAGNETS_COMP_OFF c=18
}
else menu_item_text_P(_i("Magnets comp.[N/A]")); ////MSG_MAGNETS_COMP_NA c=18
sToggle[0] = points_nr + '0';
sToggle[1] = 'x';
sToggle[2] = points_nr + '0';
sToggle[3] = 0;
MENU_ITEM_TOGGLE(_T(MSG_MESH), sToggle, mbl_mesh_toggle);
sToggle[0] = mbl_z_probe_nr + '0';
sToggle[1] = 0;
MENU_ITEM_TOGGLE(_T(MSG_Z_PROBE_NR), sToggle, mbl_probe_nr_toggle);
MENU_ITEM_TOGGLE_P(_T(MSG_MAGNETS_COMP), (points_nr == 7) ? (magnet_elimination ? _T(MSG_ON): _T(MSG_OFF)) : _T(MSG_NA), mbl_magnets_elimination_toggle);
MENU_END();
//SETTINGS_MBL_MODE;
}

View File

@ -912,14 +912,14 @@
#
"FINDA:"
#
"Firmware [none]"
#MSG_FIRMWARE
"Firmware"
#
"Firmware [strict]"
#MSG_STRICT
"Strict"
#
"Firmware [warn]"
#MSG_WARN
"Warn"
#
"HW Setup"
@ -927,20 +927,11 @@
#
"IR:"
#
"Magnets comp.[N/A]"
#MSG_MAGNETS_COMP
"Magnets comp."
#
"Magnets comp.[Off]"
#
"Magnets comp. [On]"
#
"Mesh [3x3]"
#
"Mesh [7x7]"
#MSG_MESH
"Mesh"
#
"Mesh bed leveling"
@ -948,41 +939,17 @@
#
"MK3S firmware detected on MK3 printer"
#
"MMU Mode [Normal]"
#
"MMU Mode[Stealth]"
#MSG_MMU_MODE
"MMU Mode"
#
"Mode change in progress ..."
#
"Model [none]"
#MSG_MODEL
"Model"
#
"Model [strict]"
#
"Model [warn]"
#
"Nozzle d. [0.25]"
#
"Nozzle d. [0.40]"
#
"Nozzle d. [0.60]"
#
"Nozzle [none]"
#
"Nozzle [strict]"
#
"Nozzle [warn]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
#
"G-code sliced for a different level. Continue?"
@ -1029,8 +996,8 @@
#
"Sheet"
#
"Sound [assist]"
#MSG_SOUND_BLIND
"Assist"
#
"Steel sheets"
@ -1038,11 +1005,5 @@
#
"Z-correct:"
#
"Z-probe nr. [1]"
#
"Z-probe nr. [3]"
#
"Z-probe nr. [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."

View File

@ -1218,17 +1218,17 @@
"FINDA:"
"\x00"
#
"Firmware [none]"
"Firmware [Zadne]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware [Prisne]"
#MSG_STRICT
"Strict"
"Prisne"
#
"Firmware [warn]"
"Firmware[Varovat]"
#MSG_WARN
"Warn"
"Varovat"
#
"HW Setup"
@ -1238,25 +1238,13 @@
"IR:"
"\x00"
#
"Magnets comp.[N/A]"
"Komp. magnetu[N/A]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Komp. magnetu"
#
"Magnets comp.[Off]"
"Komp. magnetu[Vyp]"
#
"Magnets comp. [On]"
"Komp. magnetu[Zap]"
#
"Mesh [3x3]"
"Mesh [3x3]"
#
"Mesh [7x7]"
"Mesh [7x7]"
#MSG_MESH
"Mesh"
"\x00"
#
"Mesh bed leveling"
@ -1266,53 +1254,21 @@
"MK3S firmware detected on MK3 printer"
"MK3S firmware detekovan na tiskarne MK3"
#
"MMU Mode [Normal]"
"MMU mod [Normal]"
#
"MMU Mode[Stealth]"
"MMU Mod [Tichy]"
#MSG_MMU_MODE
"MMU Mode"
"MMU mod"
#
"Mode change in progress ..."
"Probiha zmena modu..."
#
"Model [none]"
"Model [Zadne]"
#MSG_MODEL
"Model"
"\x00"
#
"Model [strict]"
"Model [Prisne]"
#
"Model [warn]"
"Model [Varovat]"
#
"Nozzle d. [0.25]"
"Tryska [0.25]"
#
"Nozzle d. [0.40]"
"Tryska [0.40]"
#
"Nozzle d. [0.60]"
"Tryska [0.60]"
#
"Nozzle [none]"
"Tryska [Zadne]"
#
"Nozzle [strict]"
"Tryska [Prisne]"
#
"Nozzle [warn]"
"Tryska [Varovat]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Tryska"
#
"G-code sliced for a different level. Continue?"
@ -1374,9 +1330,9 @@
"Sheet"
"Plat"
#
"Sound [assist]"
"Zvuk [Asist.]"
#MSG_SOUND_BLIND
"Assist"
"Asist."
#
"Steel sheets"
@ -1386,14 +1342,6 @@
"Z-correct:"
"Korekce Z:"
#
"Z-probe nr. [1]"
"Pocet mereni Z [1]"
#
"Z-probe nr. [3]"
"Pocet mereni Z [3]"
#
"Z-probe nr. [5]"
"Pocet mereni Z [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"Pocet mereni Z"

View File

@ -1218,17 +1218,17 @@
"FINDA:"
"\x00"
#
"Firmware [none]"
"Firmware [ohne]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware [strikt]"
#MSG_STRICT
"Strict"
"Strikt"
#
"Firmware [warn]"
"Firmware [warnen]"
#MSG_WARN
"Warn"
"Warnen"
#
"HW Setup"
@ -1238,25 +1238,13 @@
"IR:"
"\x00"
#
"Magnets comp.[N/A]"
"Magnet Komp. [nv]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Magnet Komp."
#
"Magnets comp.[Off]"
"Magnet Komp. [Aus]"
#
"Magnets comp. [On]"
"Magnet Komp. [An]"
#
"Mesh [3x3]"
"Gitter [3x3]"
#
"Mesh [7x7]"
"Gitter [7x7]"
#MSG_MESH
"Mesh"
"Gitter"
#
"Mesh bed leveling"
@ -1266,53 +1254,21 @@
"MK3S firmware detected on MK3 printer"
"MK3S-Firmware auf MK3-Drucker erkannt"
#
"MMU Mode [Normal]"
"MMU Modus[Normal]"
#
"MMU Mode[Stealth]"
"MMU Mod.[Stealth]"
#MSG_MMU_MODE
"MMU Mode"
"MMU Modus"
#
"Mode change in progress ..."
"Moduswechsel erfolgt..."
#
"Model [none]"
"Modell [ohne]"
#MSG_MODEL
"Model"
"Modell"
#
"Model [strict]"
"Modell [strikt]"
#
"Model [warn]"
"Modell [warnen]"
#
"Nozzle d. [0.25]"
"Duese D. [0.25]"
#
"Nozzle d. [0.40]"
"Duese D. [0.40]"
#
"Nozzle d. [0.60]"
"Duese D. [0.60]"
#
"Nozzle [none]"
"Duese [ohne]"
#
"Nozzle [strict]"
"Duese [strikt]"
#
"Nozzle [warn]"
"Duese [warnen]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Duese D."
#
"G-code sliced for a different level. Continue?"
@ -1374,9 +1330,9 @@
"Sheet"
"Blech"
#
"Sound [assist]"
"Sound [Assist]"
#MSG_SOUND_BLIND
"Assist"
"\x00"
#
"Steel sheets"
@ -1386,14 +1342,6 @@
"Z-correct:"
"Z-Korrektur:"
#
"Z-probe nr. [1]"
"Z-Probe Nr. [1]"
#
"Z-probe nr. [3]"
"Z-Probe Nr. [3]"
#
"Z-probe nr. [5]"
"Z-Probe Nr. [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"\x00"

View File

@ -1218,17 +1218,17 @@
"FINDA:"
"FINDA:"
#
"Firmware [none]"
"Firmware[ninguno]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware[estrict]"
#MSG_STRICT
"Strict"
"Estrict"
#
"Firmware [warn]"
"Firmware [aviso]"
#MSG_WARN
"Warn"
"Aviso"
#
"HW Setup"
@ -1238,25 +1238,13 @@
"IR:"
"\x00"
#
"Magnets comp.[N/A]"
"Comp. imanes [N/A]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Comp. imanes"
#
"Magnets comp.[Off]"
"Comp. imanes [Off]"
#
"Magnets comp. [On]"
"Comp. imanes [On]"
#
"Mesh [3x3]"
"Malla [3x3]"
#
"Mesh [7x7]"
"Malla [7x7]"
#MSG_MESH
"Mesh"
"Malla"
#
"Mesh bed leveling"
@ -1266,53 +1254,21 @@
"MK3S firmware detected on MK3 printer"
"Firmware MK3S detectado en impresora MK3"
#
"MMU Mode [Normal]"
"Modo MMU [Normal]"
#
"MMU Mode[Stealth]"
"Modo MMU[Silenci]"
#MSG_MMU_MODE
"MMU Mode"
"Modo MMU"
#
"Mode change in progress ..."
"Cambio de modo progresando ..."
#
"Model [none]"
"Modelo [ninguno]"
#MSG_MODEL
"Model"
"Modelo"
#
"Model [strict]"
"Modelo [estricto]"
#
"Model [warn]"
"Modelo [aviso]"
#
"Nozzle d. [0.25]"
"Diam. nozzl[0.25]"
#
"Nozzle d. [0.40]"
"Diam. nozzl[0.40]"
#
"Nozzle d. [0.60]"
"Diam. nozzl[0.60]"
#
"Nozzle [none]"
"Nozzle [ninguno]"
#
"Nozzle [strict]"
"Nozzle [estricto]"
#
"Nozzle [warn]"
"Nozzle [aviso]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Diam. nozzl"
#
"G-code sliced for a different level. Continue?"
@ -1374,9 +1330,9 @@
"Sheet"
"Lamina"
#
"Sound [assist]"
"Sonido [asistido]"
#MSG_SOUND_BLIND
"Assist"
"Asistido"
#
"Steel sheets"
@ -1386,14 +1342,6 @@
"Z-correct:"
"Corregir-Z:"
#
"Z-probe nr. [1]"
"Z-sensor nr. [1]"
#
"Z-probe nr. [3]"
"Z-sensor nr. [3]"
#
"Z-probe nr. [5]"
"Z-sensor nr. [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"Z-sensor nr."

View File

@ -1215,17 +1215,17 @@
"FINDA:"
"FINDA:"
#
"Firmware [none]"
"Firmware [aucune]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware[stricte]"
#MSG_STRICT
"Strict"
"Stricte"
#
"Firmware [warn]"
"Firmware [avert]"
#MSG_WARN
"Warn"
"Avert"
#
"HW Setup"
@ -1235,24 +1235,12 @@
"IR:"
"IR:"
#
"Magnets comp.[N/A]"
"Compens. aim.[N/A]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Compens. aim."
#
"Magnets comp.[Off]"
"Compens. aim.[off]"
#
"Magnets comp. [On]"
"Compens. aim. [on]"
#
"Mesh [3x3]"
"\x00"
#
"Mesh [7x7]"
#MSG_MESH
"Mesh"
"\x00"
#
@ -1263,53 +1251,21 @@
"MK3S firmware detected on MK3 printer"
"Firmware MK3S detecte sur imprimante MK3"
#
"MMU Mode [Normal]"
"Mode MMU [normal]"
#
"MMU Mode[Stealth]"
"Mode MMU [feutre]"
#MSG_MMU_MODE
"MMU Mode"
"Mode MMU"
#
"Mode change in progress ..."
"Changement de mode en cours..."
#
"Model [none]"
"Modele [aucune]"
#MSG_MODEL
"Model"
"Modele"
#
"Model [strict]"
"Modele [stricte]"
#
"Model [warn]"
"Modele [avert]"
#
"Nozzle d. [0.25]"
"Diam. buse [0.25]"
#
"Nozzle d. [0.40]"
"Diam. buse [0.40]"
#
"Nozzle d. [0.60]"
"Diam. buse [0.60]"
#
"Nozzle [none]"
"Buse [aucune]"
#
"Nozzle [strict]"
"Buse [stricte]"
#
"Nozzle [warn]"
"Buse [avert]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Diam. buse"
#
"G-code sliced for a different level. Continue?"
@ -1371,9 +1327,9 @@
"Sheet"
"Plaque"
#
"Sound [assist]"
"Son [assist]"
#MSG_SOUND_BLIND
"Assist"
"\x00"
#
"Steel sheets"
@ -1383,15 +1339,6 @@
"Z-correct:"
"Correct-Z:"
#
"Z-probe nr. [1]"
"Mesurer x-fois [1]"
#
"Z-probe nr. [3]"
"Mesurer x-fois [3]"
#
"Z-probe nr. [5]"
"Mesurer x-fois [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"Mesurer x-fois"

View File

@ -1217,17 +1217,17 @@
"FINDA:"
"\x00"
#
"Firmware [none]"
"Firmware[nessuno]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware [esatto]"
#MSG_STRICT
"Strict"
"Esatto"
#
"Firmware [warn]"
"Firmware [avviso]"
#MSG_WARN
"Warn"
"Avviso"
#
"HW Setup"
@ -1237,25 +1237,13 @@
"IR:"
"\x00"
#
"Magnets comp.[N/A]"
"Comp. Magneti[N/A]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Comp. Magneti"
#
"Magnets comp.[Off]"
"Comp. Magneti[off]"
#
"Magnets comp. [On]"
"Comp. Magneti [on]"
#
"Mesh [3x3]"
"Griglia [3x3]"
#
"Mesh [7x7]"
"Griglia [7x7]"
#MSG_MESH
"Mesh"
"Griglia"
#
"Mesh bed leveling"
@ -1265,53 +1253,21 @@
"MK3S firmware detected on MK3 printer"
"Firmware MK3S rilevato su stampante MK3"
#
"MMU Mode [Normal]"
"Modalita MMU [Normale]"
#
"MMU Mode[Stealth]"
"Modalita MMU [Silenziosa]"
#MSG_MMU_MODE
"MMU Mode"
"Mod. MMU"
#
"Mode change in progress ..."
"Cambio modalita in corso ..."
#
"Model [none]"
"Modello [nessuno]"
#MSG_MODEL
"Model"
"Modello"
#
"Model [strict]"
"Modello [esatto]"
#
"Model [warn]"
"Modello [avviso]"
#
"Nozzle d. [0.25]"
"Diam.Ugello[0.25]"
#
"Nozzle d. [0.40]"
"Diam.Ugello[0.40]"
#
"Nozzle d. [0.60]"
"Diam.Ugello[0.60]"
#
"Nozzle [none]"
"Ugello [nessuno]"
#
"Nozzle [strict]"
"Ugello [esatto]"
#
"Nozzle [warn]"
"Ugello [avviso]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Diam.Ugello"
#
"G-code sliced for a different level. Continue?"
@ -1373,9 +1329,9 @@
"Sheet"
"Piano"
#
"Sound [assist]"
"Suono [assist.]"
#MSG_SOUND_BLIND
"Assist"
"Assist."
#
"Steel sheets"
@ -1385,14 +1341,6 @@
"Z-correct:"
"Correzione-Z:"
#
"Z-probe nr. [1]"
"Z-probe nr. [1]"
#
"Z-probe nr. [3]"
"Z-probe nr. [3]"
#
"Z-probe nr. [5]"
"Z-probe nr. [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"\x00"

View File

@ -53,6 +53,7 @@
#MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin"
"\x00"
#MSG_AUTO_HOME
"Auto home"
"Auto zerowanie"
@ -1216,17 +1217,17 @@
"FINDA:"
"\x00"
#
"Firmware [none]"
"Firmware [brak]"
#MSG_FIRMWARE
"Firmware"
"\x00"
#
"Firmware [strict]"
"Firmware [restr.]"
#MSG_STRICT
"Strict"
"Restr."
#
"Firmware [warn]"
"Firmware[ostrzez]"
#MSG_WARN
"Warn"
"Ostrzez"
#
"HW Setup"
@ -1236,25 +1237,13 @@
"IR:"
"\x00"
#
"Magnets comp.[N/A]"
"Kor. magnesow[N/D]"
#MSG_MAGNETS_COMP
"Magnets comp."
"Kor. magnesow"
#
"Magnets comp.[Off]"
"Kor. magnesow[wyl]"
#
"Magnets comp. [On]"
"Kor. magnesow [wl]"
#
"Mesh [3x3]"
"Siatka [3x3]"
#
"Mesh [7x7]"
"Siatka [7x7]"
#MSG_MESH
"Mesh"
"Siatka"
#
"Mesh bed leveling"
@ -1264,53 +1253,21 @@
"MK3S firmware detected on MK3 printer"
"Wykryto firmware MK3S w drukarce MK3"
#
"MMU Mode [Normal]"
"Tryb MMU[Normaln]"
#
"MMU Mode[Stealth]"
"Tryb MMU[Stealth]"
#MSG_MMU_MODE
"MMU Mode"
"Tryb MMU"
#
"Mode change in progress ..."
"Trwa zmiana trybu..."
#
"Model [none]"
"Model [brak]"
#MSG_MODEL
"Model"
"\x00"
#
"Model [strict]"
"Model [restrykc.]"
#
"Model [warn]"
"Model [ostrzez.]"
#
"Nozzle d. [0.25]"
"Sr. dyszy [0,25]"
#
"Nozzle d. [0.40]"
"Sr. dyszy [0,40]"
#
"Nozzle d. [0.60]"
"Sr. dyszy [0,60]"
#
"Nozzle [none]"
"Dysza [brak]"
#
"Nozzle [strict]"
"Dysza [restrykc.]"
#
"Nozzle [warn]"
"Dysza [ostrzez.]"
#MSG_NOZZLE_DIAMETER
"Nozzle d."
"Sr. dyszy"
#
"G-code sliced for a different level. Continue?"
@ -1372,9 +1329,9 @@
"Sheet"
"Plyta"
#
"Sound [assist]"
"Dzwiek [asyst.]"
#MSG_SOUND_BLIND
"Assist"
"Asyst."
#
"Steel sheets"
@ -1384,14 +1341,6 @@
"Z-correct:"
"Korekcja-Z:"
#
"Z-probe nr. [1]"
"Ilosc Pomiarow [1]"
#
"Z-probe nr. [3]"
"Ilosc Pomiarow [3]"
#
"Z-probe nr. [5]"
"Ilosc Pomiarow [5]"
#MSG_Z_PROBE_NR
"Z-probe nr."
"Ilosc Pomiarow"