FIX:fix the v tray's filament unload logic

jira:[STUDIO-6627]

Change-Id: I34420bc4d1d27b6b36defb9852bba2eaf77fdcf2
This commit is contained in:
tao wang 2024-03-22 10:18:27 +08:00 committed by Lane.Wei
parent af8e195532
commit 74f60c47ef
1 changed files with 15 additions and 17 deletions

View File

@ -2738,33 +2738,31 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected)
enable[ACTION_BTN_UNLOAD] = false;
}
else {
if (m_ams_control->GetCurentAms() == std::to_string(VIRTUAL_TRAY_ID)) {
if (obj->m_tray_now == "255") {
if (obj->m_tray_now == "255") {
if ( m_ams_control->GetCurentAms() == std::to_string(VIRTUAL_TRAY_ID) ) {
enable[ACTION_BTN_LOAD] = true;
enable[ACTION_BTN_UNLOAD] = false;
}
else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) {
else if (!m_ams_control->GetCurrentCan(m_ams_control->GetCurentAms()).empty()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
}
}
else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) {
if (m_ams_control->GetCurentAms() == std::to_string(VIRTUAL_TRAY_ID)) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = true;
}
}
else if (!m_ams_control->GetCurrentCan(m_ams_control->GetCurentAms()).empty()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
}
/* if (obj->m_tray_now == "255") {
enable[ACTION_BTN_LOAD] = true;
enable[ACTION_BTN_UNLOAD] = false;
}
else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = true;
else if (!m_ams_control->GetCurrentCan(m_ams_control->GetCurentAms()).empty()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
}
}
else {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
}*/
}
}
}
}