PFW-1425 Rename "Load to Extruder" to "Loading Test"

This commit is contained in:
Guðni Már Gilbert 2022-11-15 18:04:08 +00:00 committed by DRracer
parent 7b43f322de
commit e11ef11a64
6 changed files with 24 additions and 23 deletions

View File

@ -54,7 +54,7 @@ const char MSG_SELECT_FILAMENT[] PROGMEM_I1 = ISTR("Select filament:"); ////MSG_
const char MSG_LAST_PRINT[] PROGMEM_I1 = ISTR("Last print"); ////MSG_LAST_PRINT c=18
const char MSG_LAST_PRINT_FAILURES[] PROGMEM_I1 = ISTR("Last print failures"); ////MSG_LAST_PRINT_FAILURES c=20
const char MSG_LOAD_FILAMENT[] PROGMEM_I1 = ISTR("Load filament"); ////MSG_LOAD_FILAMENT c=17
const char MSG_LOAD_TO_EXTRUDER[] PROGMEM_I1 = ISTR("Load to extruder"); ////MSG_LOAD_TO_EXTRUDER c=18
const char MSG_LOADING_TEST[] PROGMEM_I1 = ISTR("Loading Test"); ////MSG_LOADING_TEST c=18
const char MSG_LOADING_FILAMENT[] PROGMEM_I1 = ISTR("Loading filament"); ////MSG_LOADING_FILAMENT c=20
const char MSG_TESTING_FILAMENT[] PROGMEM_I1 = ISTR("Testing filament"); ////MSG_TESTING_FILAMENT c=20
const char MSG_EJECT_FILAMENT[] PROGMEM_I1 = ISTR("Eject filament"); ////MSG_EJECT_FILAMENT c=17

View File

@ -60,7 +60,7 @@ extern const char MSG_SELECT_FILAMENT[];
extern const char MSG_LAST_PRINT[];
extern const char MSG_LAST_PRINT_FAILURES[];
extern const char MSG_LOAD_FILAMENT[];
extern const char MSG_LOAD_TO_EXTRUDER[];
extern const char MSG_LOADING_TEST[];
extern const char MSG_LOADING_FILAMENT[];
extern const char MSG_TESTING_FILAMENT[];
extern const char MSG_M117_V2_CALIBRATION[];

View File

@ -455,7 +455,7 @@ void FullScreenMsg(const char *pgmS, uint8_t slot){
lcd_print(slot + 1);
}
bool MMU2::load_to_extruder(uint8_t index){
bool MMU2::loading_test(uint8_t index){
FullScreenMsg(_T(MSG_TESTING_FILAMENT), index);
tool_change(index);
st_synchronize();

View File

@ -140,7 +140,9 @@ public:
/// It behaves very similarly like a ToolChange, but it doesn't load the filament
/// all the way down to the nozzle. The sole purpose of this operation
/// is to check, that the filament will be ready for printing.
bool load_to_extruder(uint8_t index);
/// @param index index of slot to be tested
/// @returns true
bool loading_test(uint8_t index);
/// @returns the active filament slot index (0-4) or 0xff in case of no active tool
uint8_t get_current_tool() const;

View File

@ -123,7 +123,7 @@ static void lcd_v2_calibration();
static void mmu_fil_eject_menu();
static void mmu_load_to_nozzle_menu();
static void mmu_load_to_extruder_menu();
static void mmu_loading_test_menu();
static void preheat_or_continue();
#ifdef MMU_HAS_CUTTER
@ -1827,7 +1827,7 @@ switch(eFilamentAction)
case FilamentAction::Load:
case FilamentAction::AutoLoad:
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadExtruder:
case FilamentAction::MmuLoadingTest:
lcd_puts_P(_i("to load filament")); ////MSG_TO_LOAD_FIL c=20
break;
case FilamentAction::UnLoad:
@ -1867,7 +1867,7 @@ switch(eFilamentAction)
enquecommand_P(PSTR("M702")); // unload filament
break;
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadExtruder:
case FilamentAction::MmuLoadingTest:
case FilamentAction::MmuUnLoad:
case FilamentAction::MmuEject:
case FilamentAction::MmuCut:
@ -1939,11 +1939,11 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
menu_back(nLevel);
menu_submenu(mmu_load_to_nozzle_menu);
break;
case FilamentAction::MmuLoadExtruder:
case FilamentAction::MmuLoadingTest:
nLevel = bFilamentPreheatState ? 1 : 2;
bFilamentAction = true;
menu_back(nLevel);
menu_submenu(mmu_load_to_extruder_menu);
menu_submenu(mmu_loading_test_menu);
break;
case FilamentAction::MmuUnLoad:
nLevel = bFilamentPreheatState ? 1 : 2;
@ -1999,7 +1999,7 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
case FilamentAction::Load:
case FilamentAction::AutoLoad:
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadExtruder:
case FilamentAction::MmuLoadingTest:
lcd_puts_P(_i("Preheating to load")); ////MSG_PREHEATING_TO_LOAD c=20
if (once) raise_z_above(MIN_Z_FOR_LOAD);
break;
@ -4413,11 +4413,10 @@ do\
while (0)
*/
// TODO: Rename 'Load to extruder' to 'Loading test'
#define SETTINGS_MMU_LOAD_TEST \
#define SETTINGS_MMU_LOADING_TEST \
do\
{\
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_TO_EXTRUDER), mmu_load_to_extruder_menu); \
MENU_ITEM_SUBMENU_P(_T(MSG_LOADING_TEST), mmu_loading_test_menu); \
}\
while (0)
@ -4757,7 +4756,7 @@ static void lcd_settings_menu()
SETTINGS_SPOOLJOIN;
SETTINGS_CUTTER;
SETTINGS_MMU_MODE;
SETTINGS_MMU_LOAD_TEST;
SETTINGS_MMU_LOADING_TEST;
}
if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED))
@ -5161,26 +5160,26 @@ static void mmu_cut_filament_menu() {
}
#endif //MMU_HAS_CUTTER
static inline void load_to_extruder_all_wrapper(){
static inline void loading_test_all_wrapper(){
for(uint8_t i = 0; i < 5; ++i){
MMU2::mmu2.load_to_extruder(i);
MMU2::mmu2.loading_test(i);
}
}
static inline void load_to_extruder_wrapper(uint8_t i){
MMU2::mmu2.load_to_extruder(i);
static inline void loading_test_wrapper(uint8_t i){
MMU2::mmu2.loading_test(i);
}
static void mmu_load_to_extruder_menu() {
static void mmu_loading_test_menu() {
if (bFilamentAction) {
MENU_BEGIN();
MENU_ITEM_BACK_P(_T(MSG_MAIN));
MENU_ITEM_FUNCTION_P(_T(MSG_LOAD_ALL), load_to_extruder_all_wrapper);
MENU_ITEM_FUNCTION_P(_T(MSG_LOAD_ALL), loading_test_all_wrapper);
for (uint8_t i = 0; i < MMU_FILAMENT_COUNT; i++)
MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), i + '1', load_to_extruder_wrapper, i); ////MSG_LOAD_FILAMENT c=16
MENU_ITEM_FUNCTION_NR_P(_T(MSG_LOAD_FILAMENT), i + '1', loading_test_wrapper, i); ////MSG_LOAD_FILAMENT c=16
MENU_END();
} else {
eFilamentAction = FilamentAction::MmuLoadExtruder;
eFilamentAction = FilamentAction::MmuLoadingTest;
preheat_or_continue();
}
}

View File

@ -187,7 +187,7 @@ enum class FilamentAction : uint_least8_t
MmuUnLoad,
MmuEject,
MmuCut,
MmuLoadExtruder,
MmuLoadingTest,
Preheat,
Lay1Cal,
};