Timer in autoloadmenu - dirty hack (unable to compile under 4.8.1)
This commit is contained in:
parent
fc834fc28c
commit
f64d266c89
@ -111,7 +111,8 @@ union MenuData
|
|||||||
|
|
||||||
struct AutoLoadFilamentMenu
|
struct AutoLoadFilamentMenu
|
||||||
{
|
{
|
||||||
Timer timer;
|
//Timer timer;
|
||||||
|
char dummy;
|
||||||
} autoLoadFilamentMenu;
|
} autoLoadFilamentMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2085,12 +2086,13 @@ static void lcd_menu_AutoLoadFilament()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!menuData.autoLoadFilamentMenu.timer.running()) menuData.autoLoadFilamentMenu.timer.start();
|
Timer* ptimer = (Timer*)&(menuData.autoLoadFilamentMenu.dummy);
|
||||||
|
if (!ptimer->running()) ptimer->start();
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
lcd_printPGM(MSG_ERROR);
|
lcd_printPGM(MSG_ERROR);
|
||||||
lcd.setCursor(0, 2);
|
lcd.setCursor(0, 2);
|
||||||
lcd_printPGM(MSG_PREHEAT_NOZZLE);
|
lcd_printPGM(MSG_PREHEAT_NOZZLE);
|
||||||
if (menuData.autoLoadFilamentMenu.timer.expired(2000ul)) menu_action_back();
|
if (ptimer->expired(2000ul)) menu_action_back();
|
||||||
}
|
}
|
||||||
if (lcd_clicked()) menu_action_back();
|
if (lcd_clicked()) menu_action_back();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user