merge with upstream
This commit is contained in:
commit
0c80eca648
@ -14,7 +14,7 @@ typedef void (*menu_func_t)(void);
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
menu_func_t menu;
|
menu_func_t menu;
|
||||||
uint8_t position;
|
int8_t position;
|
||||||
} menu_record_t;
|
} menu_record_t;
|
||||||
|
|
||||||
extern menu_record_t menu_stack[MENU_DEPTH_MAX];
|
extern menu_record_t menu_stack[MENU_DEPTH_MAX];
|
||||||
|
@ -162,6 +162,13 @@ void mmu_loop(void)
|
|||||||
mmu_printf_P(PSTR("T%d\n"), extruder);
|
mmu_printf_P(PSTR("T%d\n"), extruder);
|
||||||
mmu_state = 3; // wait for response
|
mmu_state = 3; // wait for response
|
||||||
}
|
}
|
||||||
|
else if ((mmu_cmd >= MMU_CMD_L0) && (mmu_cmd <= MMU_CMD_L4))
|
||||||
|
{
|
||||||
|
int filament = mmu_cmd - MMU_CMD_L0;
|
||||||
|
printf_P(PSTR("MMU <= 'L%d'\n"), filament);
|
||||||
|
mmu_printf_P(PSTR("L%d\n"), filament);
|
||||||
|
mmu_state = 3; // wait for response
|
||||||
|
}
|
||||||
else if (mmu_cmd == MMU_CMD_C0)
|
else if (mmu_cmd == MMU_CMD_C0)
|
||||||
{
|
{
|
||||||
printf_P(PSTR("MMU <= 'C0'\n"));
|
printf_P(PSTR("MMU <= 'C0'\n"));
|
||||||
@ -327,6 +334,7 @@ void manage_response(bool move_axes, bool turn_off_nozzle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
lcd_display_message_fullscreen_P(_i("Check MMU. Fix the issue and then press button on MMU unit."));
|
lcd_display_message_fullscreen_P(_i("Check MMU. Fix the issue and then press button on MMU unit."));
|
||||||
|
delay_keep_alive(1000);
|
||||||
}
|
}
|
||||||
else if (mmu_print_saved) {
|
else if (mmu_print_saved) {
|
||||||
printf_P(PSTR("MMU start responding\n"));
|
printf_P(PSTR("MMU start responding\n"));
|
||||||
@ -485,8 +493,13 @@ void display_loading()
|
|||||||
void extr_adj(int extruder) //loading filament for SNMM
|
void extr_adj(int extruder) //loading filament for SNMM
|
||||||
{
|
{
|
||||||
#ifndef SNMM
|
#ifndef SNMM
|
||||||
printf_P(PSTR("L%d \n"),extruder);
|
uint8_t cmd = MMU_CMD_L0 + extruder;
|
||||||
fprintf_P(uart2io, PSTR("L%d\n"), extruder);
|
if (cmd > MMU_CMD_L4)
|
||||||
|
{
|
||||||
|
printf_P(PSTR("Filament out of range %d \n"),extruder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mmu_command(cmd);
|
||||||
|
|
||||||
//show which filament is currently loaded
|
//show which filament is currently loaded
|
||||||
|
|
||||||
@ -496,7 +509,7 @@ void extr_adj(int extruder) //loading filament for SNMM
|
|||||||
//if(strlen(_T(MSG_LOADING_FILAMENT))>18) lcd.setCursor(0, 1);
|
//if(strlen(_T(MSG_LOADING_FILAMENT))>18) lcd.setCursor(0, 1);
|
||||||
//else lcd.print(" ");
|
//else lcd.print(" ");
|
||||||
lcd_print(" ");
|
lcd_print(" ");
|
||||||
lcd_print(mmu_extruder + 1);
|
lcd_print(extruder + 1);
|
||||||
|
|
||||||
// get response
|
// get response
|
||||||
manage_response(false, false);
|
manage_response(false, false);
|
||||||
|
@ -23,6 +23,11 @@ extern int16_t mmu_buildnr;
|
|||||||
#define MMU_CMD_T2 0x12
|
#define MMU_CMD_T2 0x12
|
||||||
#define MMU_CMD_T3 0x13
|
#define MMU_CMD_T3 0x13
|
||||||
#define MMU_CMD_T4 0x14
|
#define MMU_CMD_T4 0x14
|
||||||
|
#define MMU_CMD_L0 0x20
|
||||||
|
#define MMU_CMD_L1 0x21
|
||||||
|
#define MMU_CMD_L2 0x22
|
||||||
|
#define MMU_CMD_L3 0x23
|
||||||
|
#define MMU_CMD_L4 0x24
|
||||||
#define MMU_CMD_C0 0x30
|
#define MMU_CMD_C0 0x30
|
||||||
|
|
||||||
extern int mmu_puts_P(const char* str);
|
extern int mmu_puts_P(const char* str);
|
||||||
|
@ -528,7 +528,11 @@ void lcdui_print_percent_done(void)
|
|||||||
// Print extruder status (5 chars total)
|
// Print extruder status (5 chars total)
|
||||||
void lcdui_print_extruder(void)
|
void lcdui_print_extruder(void)
|
||||||
{
|
{
|
||||||
int chars = lcd_printf_P(_N(" T%u"), mmu_extruder);
|
int chars = 0;
|
||||||
|
if (mmu_extruder == tmp_extruder)
|
||||||
|
chars = lcd_printf_P(_N(" T%u"), mmu_extruder);
|
||||||
|
else
|
||||||
|
chars = lcd_printf_P(_N(" %u>%u"), mmu_extruder, tmp_extruder);
|
||||||
lcd_space(5 - chars);
|
lcd_space(5 - chars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user