mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-04 13:57:43 -07:00
FIX: disable send print while the ams is during setting up
jira: [STUDIO-9813] Change-Id: I55dcca9aab4a9923636c1cf7a0a27bc7e4b9586d (cherry picked from commit 5b800d034266489e5b288aa7a51ce6d244ae06b8)
This commit is contained in:
parent
c8fa5e1e4e
commit
b63e0ee556
4 changed files with 30 additions and 1 deletions
|
|
@ -912,6 +912,20 @@ bool MachineObject::is_support_amx_ext_mix_mapping() {
|
|||
return true;
|
||||
}
|
||||
|
||||
/* the API is developing by AP, not completed now*/
|
||||
bool MachineObject::is_ams_on_settingup() const
|
||||
{
|
||||
for (const auto& ext : m_extder_data.extders)
|
||||
{
|
||||
if (ext.ams_stat != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void MachineObject::get_ams_colors(std::vector<wxColour> &ams_colors) {
|
||||
ams_colors.clear();
|
||||
ams_colors.reserve(amsList.size());
|
||||
|
|
@ -4299,6 +4313,8 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||
|
||||
/*AMS without initialization*/
|
||||
if (nozzle_id == 0xE) {
|
||||
ams_id_set.erase(ams_id);
|
||||
amsList.erase(ams_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -700,6 +700,8 @@ public:
|
|||
bool is_ams_need_update;
|
||||
|
||||
inline bool is_ams_unload() { return m_tray_tar.compare("255") == 0; }
|
||||
[[nodiscard]] bool is_ams_on_settingup() const;
|
||||
|
||||
Ams* get_curr_Ams();
|
||||
AmsTray* get_curr_tray();
|
||||
AmsTray *get_ams_tray(std::string ams_id, std::string tray_id);
|
||||
|
|
|
|||
|
|
@ -1743,6 +1743,10 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
update_print_status_msg(msg_text, true, true);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsOnSettingup) {
|
||||
update_print_status_msg(_L("AMS is setting up. Please try again later."), false, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusDisableAms) {
|
||||
update_print_status_msg(wxEmptyString, false, false);
|
||||
Enable_Send_Button(true);
|
||||
|
|
@ -1756,7 +1760,7 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
update_print_status_msg(msg_text, true, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingSuccess){
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingSuccess){
|
||||
wxString msg_text = _L("Filaments to AMS slots mappings have been established. You can click a filament above to change its mapping AMS slot");
|
||||
update_print_status_msg(msg_text, false, false);
|
||||
Enable_Send_Button(true);
|
||||
|
|
@ -3347,6 +3351,12 @@ void SelectMachineDialog::update_show_status()
|
|||
}
|
||||
|
||||
// check ams and vt_slot mix use status
|
||||
if (obj_->is_ams_on_settingup())
|
||||
{
|
||||
show_status(PrintDialogStatus::PrintStatusAmsOnSettingup);
|
||||
return;
|
||||
}
|
||||
|
||||
struct ExtruderStatus
|
||||
{
|
||||
bool has_ams{false};
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ enum PrintDialogStatus {
|
|||
PrintStatusInSystemPrinting,
|
||||
PrintStatusInPrinting,
|
||||
PrintStatusDisableAms,
|
||||
PrintStatusAmsOnSettingup,
|
||||
PrintStatusAmsMappingSuccess,
|
||||
PrintStatusAmsMappingInvalid,
|
||||
PrintStatusAmsMappingU0Invalid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue