Add possibility to use other filaments in LCD_COMMAND_V2_CAL.

This commit is contained in:
Marek Bel 2018-09-11 17:03:20 +02:00
parent 19a1ccdc76
commit 46df46f482

View file

@ -1250,6 +1250,7 @@ void lcd_commands()
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
{
char cmd1[30];
uint8_t filament = 0;
float width = 0.4;
float length = 20 - width;
float extr = count_e(0.2, width, length);
@ -1259,6 +1260,32 @@ void lcd_commands()
{
lcd_commands_step = 10;
}
if (lcd_commands_step == 20 && !blocks_queued() && cmd_buffer_empty())
{
filament = 0;
lcd_commands_step = 10;
}
if (lcd_commands_step == 21 && !blocks_queued() && cmd_buffer_empty())
{
filament = 1;
lcd_commands_step = 10;
}
if (lcd_commands_step == 22 && !blocks_queued() && cmd_buffer_empty())
{
filament = 2;
lcd_commands_step = 10;
}
if (lcd_commands_step == 23 && !blocks_queued() && cmd_buffer_empty())
{
filament = 3;
lcd_commands_step = 10;
}
if (lcd_commands_step == 24 && !blocks_queued() && cmd_buffer_empty())
{
filament = 4;
lcd_commands_step = 10;
}
if (lcd_commands_step == 10 && !blocks_queued() && cmd_buffer_empty())
{
enquecommand_P(PSTR("M107"));
@ -1280,7 +1307,6 @@ void lcd_commands()
if (mmu_enabled)
{
const uint8_t filament = 0;
strcpy(cmd1, "T");
strcat(cmd1, itostr3left(filament));
enquecommand(cmd1);