ENH: do ams mapping in printing and upgrading
Change-Id: I592d37ce581077c317642cbdf250a369bc992d09
This commit is contained in:
parent
ad471bf3db
commit
32ac28738e
|
@ -666,9 +666,11 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// is_support_ams_mapping
|
||||
if (!is_support_ams_mapping()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "ams_mapping: do not support, use order mapping";
|
||||
result.clear();
|
||||
for (int i = 0; i < filaments.size(); i++) {
|
||||
FilamentInfo info;
|
||||
info.id = filaments[i].id;
|
||||
|
|
|
@ -1991,6 +1991,18 @@ void SelectMachineDialog::update_show_status()
|
|||
reset_timeout();
|
||||
update_ams_check(obj_);
|
||||
|
||||
// do ams mapping if no ams result
|
||||
if (obj_->has_ams() && m_ams_mapping_result.empty()) {
|
||||
if (obj_->ams_support_use_ams) {
|
||||
if (ams_check->GetValue()) {
|
||||
do_ams_mapping(obj_);
|
||||
} else {
|
||||
m_ams_mapping_result.clear();
|
||||
sync_ams_mapping_result(m_ams_mapping_result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// reading done
|
||||
if (obj_->is_in_upgrading()) {
|
||||
show_status(PrintDialogStatus::PrintStatusInUpgrading);
|
||||
|
|
Loading…
Reference in New Issue