NEW:AMS supports ams filament backup

Change-Id: I0bc84f52bcd88dbbc1b9614b15474433c748cc14
This commit is contained in:
tao wang 2023-03-24 16:08:20 +08:00 committed by Lane.Wei
parent f596a822e2
commit 00e1c50947
17 changed files with 585 additions and 38 deletions

View file

@ -1266,6 +1266,7 @@ StatusPanel::StatusPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos, co
Bind(EVT_AMS_EXTRUSION_CALI, &StatusPanel::on_filament_extrusion_cali, this);
Bind(EVT_AMS_LOAD, &StatusPanel::on_ams_load, this);
Bind(EVT_AMS_UNLOAD, &StatusPanel::on_ams_unload, this);
Bind(EVT_AMS_FILAMENT_BACKUP, &StatusPanel::on_ams_filament_backup, this);
Bind(EVT_AMS_SETTINGS, &StatusPanel::on_ams_setting_click, this);
Bind(EVT_AMS_REFRESH_RFID, &StatusPanel::on_ams_refresh_rfid, this);
Bind(EVT_AMS_ON_SELECTED, &StatusPanel::on_ams_selected, this);
@ -2651,6 +2652,15 @@ void StatusPanel::on_ams_unload(SimpleEvent &event)
if (obj) { obj->command_ams_switch(255); }
}
void StatusPanel::on_ams_filament_backup(SimpleEvent& event)
{
if (obj && obj->filam_bak.size() > 0) {
AmsReplaceMaterialDialog* m_replace_material_popup = new AmsReplaceMaterialDialog(this);
m_replace_material_popup->update_machine_obj(obj);
m_replace_material_popup->ShowModal();
}
}
void StatusPanel::on_ams_setting_click(SimpleEvent &event)
{
if (!m_ams_setting_dlg) m_ams_setting_dlg = new AMSSetting((wxWindow *) this, wxID_ANY);