ENH: support extension tool; support check extension tool

JIRA: [STUDIO-14122] [STUDIO-14162]
Change-Id: I147d335420fcc7c9a190f570863e38e138cdadcf
(cherry picked from commit db83b9fb6c6399d917b27b74cc573d668737c705)
This commit is contained in:
xin.zhang 2025-08-22 12:13:20 +08:00 committed by Noisyfox
parent b5b64265b2
commit fedcfc4ea5
10 changed files with 170 additions and 0 deletions

View file

@ -20,6 +20,7 @@
#include "DeviceCore/DevConfig.h"
#include "DeviceCore/DevNozzleSystem.h"
#include "DeviceCore/DevExtensionTool.h"
#include "DeviceCore/DevExtruderSystem.h"
#include "DeviceCore/DevFilaBlackList.h"
#include "DeviceCore/DevFilaSystem.h"
@ -1676,6 +1677,9 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
msg = msg_text;
Enable_Refresh_Button(true);
Enable_Send_Button(true);
} else if (status == PrintStatusToolHeadCoolingFanWarning) {
Enable_Refresh_Button(true);
Enable_Send_Button(true);
} else if (status == PrintStatusMixAmsAndVtSlotWarning) {
Enable_Refresh_Button(true);
Enable_Send_Button(true);
@ -3587,6 +3591,9 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
}
}
// check extension tool warning
UpdateStatusCheckWarning_ExtensionTool(obj_);
/** normal check **/
show_status(PrintDialogStatus::PrintStatusReadyToGo);
}
@ -4575,6 +4582,32 @@ SelectMachineDialog::~SelectMachineDialog()
delete m_refresh_timer;
}
void SelectMachineDialog::UpdateStatusCheckWarning_ExtensionTool(MachineObject* obj_)
{
if (!obj_)
{
return;
}
if (auto extension_tool = obj_->GetExtensionTool().lock())
{
if (extension_tool->IsToolTypeFanF000() && !extension_tool->IsMounted() )
{
for (const FilamentInfo& item : m_ams_mapping_result)
{
auto filament_info = wxGetApp().preset_bundle->get_filament_by_filament_id(item.filament_id);
if (filament_info && (filament_info->temperature_vitrification <= 50))
{
show_status(PrintDialogStatus::PrintStatusToolHeadCoolingFanWarning,
{ _L("Install toolhead enhanced cooling fan to prevent filament softening.")},
"https://e.bambulab.com/t?c=l3T7caKGeNt3omA9");
return;
}
}
}
}
}
ThumbnailPanel::ThumbnailPanel(wxWindow *parent, wxWindowID winid, const wxPoint &pos, const wxSize &size)
: wxPanel(parent, winid, pos, size)
{