ENH: turn off flow calibration on PEI plate by default

Flow calibration on PEI plate may fail. To reduce users' confusion, let it be off by default.

Change-Id: Ic31f18b5fd378ac8b20e4d1461ed3dbfbae1ae4b
(cherry picked from commit bc8b4cb082f20984207f44e63104be9a603a2332)
This commit is contained in:
Arthur 2023-06-16 10:38:27 +08:00 committed by Lane.Wei
parent 568ad6f851
commit 6c41c6cd1a
2 changed files with 27 additions and 26 deletions

View File

@ -3342,27 +3342,28 @@ wxImage *SelectMachineDialog::LoadImageFromBlob(const unsigned char *data, int s
return NULL;
}
//void SelectMachineDialog::set_flow_calibration_state(bool state)
//{
// if (!state) {
// m_checkbox_list["flow_cali"]->SetValue(state);
// m_checkbox_list["flow_cali"]->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
// m_checkbox_list["flow_cali"]->Disable();
// m_checkbox_state_list["flow_cali"] = state;
// for (auto win : select_flow->GetWindowChildren()) {
// win->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
// }
// select_flow->SetToolTip(_L("Extrusion compensation calibration is not supported when using Textured PEI Plate"));
// }
// else {
// m_checkbox_list["flow_cali"]->SetValue(state);
// m_checkbox_list["flow_cali"]->Enable();
// m_checkbox_state_list["flow_cali"] = state;
// for (auto win : select_flow->GetWindowChildren()) {
// win->SetToolTip( _L("Flow Calibration"));
// }
// }
//}
void SelectMachineDialog::set_flow_calibration_state(bool state)
{
if (!state) {
m_checkbox_list["flow_cali"]->SetValue(state);
auto tool_tip = _L("Caution to use! Flow calibration on Textured PEI Plate may fail due to the scattered surface.");
m_checkbox_list["flow_cali"]->SetToolTip(tool_tip);
m_checkbox_list["flow_cali"]->Enable();
//m_checkbox_state_list["flow_cali"] = state;
for (auto win : select_flow->GetWindowChildren()) {
win->SetToolTip(tool_tip);
}
select_flow->SetToolTip(tool_tip);
}
else {
m_checkbox_list["flow_cali"]->SetValue(state);
m_checkbox_list["flow_cali"]->Enable();
//m_checkbox_state_list["flow_cali"] = state;
for (auto win : select_flow->GetWindowChildren()) {
win->SetToolTip( _L("Automatic flow calibration using Micro Lidar"));
}
}
}
void SelectMachineDialog::set_default()
{
@ -3606,13 +3607,13 @@ void SelectMachineDialog::set_default_normal()
m_scrollable_view->SetMaxSize(m_scrollable_region->GetSize());
//disable pei bed
/*auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
if (bed_type == BedType::btPTE) {
set_flow_calibration_state(false);
}
else {
set_flow_calibration_state(true);
}*/
}
wxSize screenSize = wxGetDisplaySize();
auto dialogSize = this->GetSize();
@ -3762,13 +3763,13 @@ void SelectMachineDialog::set_default_from_sdcard()
m_scrollable_view->SetMaxSize(m_scrollable_region->GetSize());
//disable pei bed
/*auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
auto bed_type = m_plater->get_partplate_list().get_curr_plate()->get_bed_type(true);
if (bed_type == BedType::btPTE) {
set_flow_calibration_state(false);
}
else {
set_flow_calibration_state(true);
}*/
}
wxSize screenSize = wxGetDisplaySize();
auto dialogSize = this->GetSize();

View File

@ -438,7 +438,7 @@ public:
void update_priner_status_msg(wxString msg, bool is_warning = false);
void update_print_status_msg(wxString msg, bool is_warning = false, bool is_printer = true);
void update_print_error_info(int code, std::string msg, std::string extra);
//void set_flow_calibration_state(bool state);
void set_flow_calibration_state(bool state);
bool is_show_timelapse();
bool is_same_printer_model();
bool has_tips(MachineObject* obj);