mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-22 12:45:17 +00:00
FIX: disable printing while ams setting up
jira: [STUDIO-9813] Change-Id: Ic5ff3f96ab86da317744d5fbe0b068e3ba77666b (cherry picked from commit 26609a130afbab4088cc7bea261266fa6da1def5)
This commit is contained in:
@@ -917,15 +917,12 @@ bool MachineObject::is_support_amx_ext_mix_mapping() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the API is developing by AP, not completed now*/
|
|
||||||
bool MachineObject::is_ams_on_settingup() const
|
bool MachineObject::is_ams_on_settingup() const
|
||||||
{
|
{
|
||||||
for (const auto& ext : m_extder_data.extders)
|
int setting_up_stat = this->get_flag_bits(ams_cali_stat, 0, 8);
|
||||||
|
if (setting_up_stat == 0x01 || setting_up_stat == 0x02 || setting_up_stat == 0x03 || setting_up_stat == 0x04)
|
||||||
{
|
{
|
||||||
if (ext.ams_stat != 0)
|
return true;
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -4285,6 +4282,16 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||||||
tray_exist_bits = stol(jj["ams"]["tray_exist_bits"].get<std::string>(), nullptr, 16);
|
tray_exist_bits = stol(jj["ams"]["tray_exist_bits"].get<std::string>(), nullptr, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (jj["ams"].contains("cali_id"))
|
||||||
|
{
|
||||||
|
ams_cali_id = jj["ams"]["cali_id"].get<int>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jj["ams"].contains("cali_stat"))
|
||||||
|
{
|
||||||
|
ams_cali_stat = jj["ams"]["cali_stat"].get<int>();
|
||||||
|
}
|
||||||
|
|
||||||
if (!key_field_only) {
|
if (!key_field_only) {
|
||||||
if (jj["ams"].contains("tray_read_done_bits")) {
|
if (jj["ams"].contains("tray_read_done_bits")) {
|
||||||
tray_read_done_bits = stol(jj["ams"]["tray_read_done_bits"].get<std::string>(), nullptr, 16);
|
tray_read_done_bits = stol(jj["ams"]["tray_read_done_bits"].get<std::string>(), nullptr, 16);
|
||||||
|
|||||||
@@ -674,6 +674,11 @@ public:
|
|||||||
|
|
||||||
/* ams properties */
|
/* ams properties */
|
||||||
std::map<std::string, Ams*> amsList; // key: ams[id], start with 0
|
std::map<std::string, Ams*> amsList; // key: ams[id], start with 0
|
||||||
|
|
||||||
|
int ams_cali_id = 0;
|
||||||
|
int ams_cali_stat = 0;
|
||||||
|
|
||||||
|
//AmsTray vt_tray; // virtual tray
|
||||||
long ams_exist_bits = 0;
|
long ams_exist_bits = 0;
|
||||||
long tray_exist_bits = 0;
|
long tray_exist_bits = 0;
|
||||||
long tray_is_bbl_bits = 0;
|
long tray_is_bbl_bits = 0;
|
||||||
|
|||||||
@@ -3449,14 +3449,11 @@ void SelectMachineDialog::update_show_status()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check ams and vt_slot mix use status
|
|
||||||
#if 0 /*AP is supporting, send the print job and let the device check it*/
|
|
||||||
if (obj_->is_ams_on_settingup())
|
if (obj_->is_ams_on_settingup())
|
||||||
{
|
{
|
||||||
show_status(PrintDialogStatus::PrintStatusAmsOnSettingup);
|
show_status(PrintDialogStatus::PrintStatusAmsOnSettingup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
struct ExtruderStatus
|
struct ExtruderStatus
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user