commit
374235906f
@ -163,6 +163,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
|
||||||
|
}
|
||||||
mmu_cmd = 0;
|
mmu_cmd = 0;
|
||||||
}
|
}
|
||||||
else if ((mmu_last_response + 1000) < millis()) //request every 1s
|
else if ((mmu_last_response + 1000) < millis()) //request every 1s
|
||||||
@ -480,8 +487,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
|
||||||
|
|
||||||
@ -491,7 +503,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);
|
||||||
|
@ -21,6 +21,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
|
||||||
|
|
||||||
extern int mmu_puts_P(const char* str);
|
extern int mmu_puts_P(const char* str);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user