|
@@ -6675,13 +6675,13 @@ static void lcd_tune_menu()
|
|
MENU_END();
|
|
MENU_END();
|
|
}
|
|
}
|
|
|
|
|
|
-static void mbl_magnets_elimination_set() {
|
|
|
|
|
|
+static void mbl_magnets_elimination_toggle() {
|
|
bool magnet_elimination = (eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION) > 0);
|
|
bool magnet_elimination = (eeprom_read_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION) > 0);
|
|
magnet_elimination = !magnet_elimination;
|
|
magnet_elimination = !magnet_elimination;
|
|
eeprom_update_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION, (uint8_t)magnet_elimination);
|
|
eeprom_update_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION, (uint8_t)magnet_elimination);
|
|
}
|
|
}
|
|
|
|
|
|
-static void mbl_mesh_set() {
|
|
|
|
|
|
+static void mbl_mesh_toggle() {
|
|
uint8_t mesh_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_POINTS_NR);
|
|
uint8_t mesh_nr = eeprom_read_byte((uint8_t*)EEPROM_MBL_POINTS_NR);
|
|
if(mesh_nr == 3) mesh_nr = 7;
|
|
if(mesh_nr == 3) mesh_nr = 7;
|
|
else mesh_nr = 3;
|
|
else mesh_nr = 3;
|
|
@@ -6707,16 +6707,16 @@ static void lcd_mesh_bed_leveling_settings()
|
|
|
|
|
|
MENU_BEGIN();
|
|
MENU_BEGIN();
|
|
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
|
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
|
- if(points_nr == 3) MENU_ITEM_FUNCTION_P(_i("Mesh [3x3]"), mbl_mesh_set); ////MSG_MESH_3x3 c=18 r=0
|
|
|
|
- else MENU_ITEM_FUNCTION_P(_i("Mesh [7x7]"), mbl_mesh_set); ////MSG_MESH_7x7 c=18 r=0
|
|
|
|
|
|
+ if(points_nr == 3) MENU_ITEM_FUNCTION_P(_i("Mesh [3x3]"), mbl_mesh_toggle); ////MSG_MESH_3x3 c=18 r=0
|
|
|
|
+ else MENU_ITEM_FUNCTION_P(_i("Mesh [7x7]"), mbl_mesh_toggle); ////MSG_MESH_7x7 c=18 r=0
|
|
switch (mbl_z_probe_nr) {
|
|
switch (mbl_z_probe_nr) {
|
|
case 1: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [1]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
case 1: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [1]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
case 5: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [5]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
case 5: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [5]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
default: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [3]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
default: MENU_ITEM_FUNCTION_P(_i("Z-probe nr. [3]"), mbl_probe_nr_set); break; ////MSG_Z_PROBE_NR_1 c=18 r=0
|
|
}
|
|
}
|
|
if (points_nr == 7) {
|
|
if (points_nr == 7) {
|
|
- if (magnet_elimination) MENU_ITEM_FUNCTION_P(_i("Magnets comp. [On]"), mbl_magnets_elimination_set); ////MSG_MAGNETS_COMP_ON c=18 r=0
|
|
|
|
- else MENU_ITEM_FUNCTION_P(_i("Magnets comp.[Off]"), mbl_magnets_elimination_set); ////MSG_MAGNETS_COMP_OFF c=18 r=0
|
|
|
|
|
|
+ if (magnet_elimination) MENU_ITEM_FUNCTION_P(_i("Magnets comp. [On]"), mbl_magnets_elimination_toggle); ////MSG_MAGNETS_COMP_ON c=18 r=0
|
|
|
|
+ else MENU_ITEM_FUNCTION_P(_i("Magnets comp.[Off]"), mbl_magnets_elimination_toggle); ////MSG_MAGNETS_COMP_OFF c=18 r=0
|
|
}
|
|
}
|
|
else menu_item_text_P(_i("Magnets comp.[N/A]")); ////MSG_MAGNETS_COMP_NA c=18 r=0
|
|
else menu_item_text_P(_i("Magnets comp.[N/A]")); ////MSG_MAGNETS_COMP_NA c=18 r=0
|
|
MENU_END();
|
|
MENU_END();
|