Browse Source

Updated branch to use TOGGLE

Alex Voinea 5 years ago
parent
commit
e66574ac5f
3 changed files with 10 additions and 4 deletions
  1. 3 0
      Firmware/messages.c
  2. 3 0
      Firmware/messages.h
  3. 4 4
      Firmware/ultralcd.cpp

+ 3 - 0
Firmware/messages.c

@@ -128,6 +128,9 @@ 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."); ////
+const char MSG_FS_ACTION[] PROGMEM_I1 = ISTR("FS Action"); ////
+const char MSG_FS_CONTINUE[] PROGMEM_I1 = ISTR("Cont."); ////
+const char MSG_FS_PAUSE[] PROGMEM_I1 = ISTR("Pause"); ////
 
 //not internationalized messages
 const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////

+ 3 - 0
Firmware/messages.h

@@ -128,6 +128,9 @@ extern const char MSG_SOUND_BLIND[];
 extern const char MSG_MESH[];
 extern const char MSG_Z_PROBE_NR[];
 extern const char MSG_MAGNETS_COMP[];
+extern const char MSG_FS_ACTION[];
+extern const char MSG_FS_CONTINUE[];
+extern const char MSG_FS_PAUSE[];
 
 //not internationalized messages
 extern const char MSG_BROWNOUT_RESET[];

+ 4 - 4
Firmware/ultralcd.cpp

@@ -5726,10 +5726,10 @@ do\
     switch(oFsensorActionNA)\
          {\
          case ClFsensorActionNA::_Continue:\
-              MENU_ITEM_FUNCTION_P(_i("FS Action [cont.]"),lcd_fsensor_actionNA_set);\
+              MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_FS_CONTINUE), lcd_fsensor_actionNA_set);\
               break;\
          case ClFsensorActionNA::_Pause:\
-              MENU_ITEM_FUNCTION_P(_i("FS Action [pause]"),lcd_fsensor_actionNA_set);\
+              MENU_ITEM_TOGGLE_P(_T(MSG_FS_ACTION), _T(MSG_FS_PAUSE), lcd_fsensor_actionNA_set);\
               break;\
          default:\
               oFsensorActionNA=ClFsensorActionNA::_Continue;\
@@ -7107,11 +7107,11 @@ static void lcd_tune_menu()
 	if (FSensorStateMenu == 0) {
           if (fsensor_not_responding && (mmu_enabled == false)) {
                /* Filament sensor not working*/
-               MENU_ITEM_FUNCTION_P(_i("Fil. sensor [N/A]"), lcd_fsensor_state_set);
+               MENU_ITEM_TOGGLE_P(_T(MSG_MSG_FSENSOR), _T(MSG_NA), lcd_fsensor_state_set);
           }
           else {
                /* Filament sensor turned off, working, no problems*/
-               MENU_ITEM_FUNCTION_P(_T(MSG_FSENSOR_OFF), lcd_fsensor_state_set);
+               MENU_ITEM_TOGGLE_P(_T(MSG_MSG_FSENSOR), _T(MSG_OFF), lcd_fsensor_state_set);
           }
 	}
 	else {