ENH: add tpu check for send print and cali

jira: 8234
Change-Id: I5706071d900079477abc9558461811a8d85fb0ab
(cherry picked from commit f0d2ad3dbe2e29548a8b3621a863cd38b543b6b4)
This commit is contained in:
zhimin.zeng
2024-09-25 11:58:12 +08:00
committed by Noisyfox
parent 45eb45e531
commit 22d00f89b0
8 changed files with 64 additions and 36 deletions

View File

@@ -563,20 +563,19 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event)
//check is it in the filament blacklist
if (!is_virtual_tray() && wxGetApp().app_config->get("skip_ams_blacklist_check") != "true") {
if (wxGetApp().app_config->get("skip_ams_blacklist_check") != "true") {
bool in_blacklist = false;
std::string action;
std::string info;
std::string filamnt_type;
it->get_filament_type(filamnt_type);
auto vendor = dynamic_cast<ConfigOptionStrings*> (it->config.option("filament_vendor"));
auto vendor = dynamic_cast<ConfigOptionStrings *>(it->config.option("filament_vendor"));
if (vendor && (vendor->values.size() > 0)) {
std::string vendor_name = vendor->values[0];
DeviceManager::check_filaments_in_blacklist(vendor_name, filamnt_type, in_blacklist, action, info);
DeviceManager::check_filaments_in_blacklist(vendor_name, filamnt_type, ams_id, in_blacklist, action, info);
}
if (in_blacklist) {
if (action == "prohibition") {
MessageDialog msg_wingow(nullptr, wxString::FromUTF8(info), _L("Error"), wxICON_WARNING | wxOK);