ENH: hide some functions which are not ready on U2 version
Change-Id: I6ff7f98d55d9734938b65aaa72727320dd3c5f6e
This commit is contained in:
parent
efb7106ecc
commit
030efb339a
|
@ -257,17 +257,23 @@ void CameraPopup::check_func_supported()
|
||||||
|
|
||||||
allow_alter_resolution = (m_obj->is_function_supported(PrinterFunction::FUNC_ALTER_RESOLUTION) && m_obj->has_ipcam);
|
allow_alter_resolution = (m_obj->is_function_supported(PrinterFunction::FUNC_ALTER_RESOLUTION) && m_obj->has_ipcam);
|
||||||
|
|
||||||
|
//check u2 version
|
||||||
|
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
|
if (!dev) return;
|
||||||
|
MachineObject* obj = dev->get_selected_machine();
|
||||||
|
if (!obj) return;
|
||||||
|
|
||||||
//resolution supported
|
//resolution supported
|
||||||
std::vector<std::string> resolution_supported = m_obj->get_resolution_supported();
|
std::vector<std::string> resolution_supported = m_obj->get_resolution_supported();
|
||||||
auto support_count = resolution_supported.size();
|
auto support_count = resolution_supported.size();
|
||||||
for (int i = 0; i < (int)RESOLUTION_OPTIONS_NUM; ++i){
|
for (int i = 0; i < (int)RESOLUTION_OPTIONS_NUM; ++i){
|
||||||
auto curr_res = to_resolution_msg_string(CameraResolution(i));
|
auto curr_res = to_resolution_msg_string(CameraResolution(i));
|
||||||
std::vector <std::string> ::iterator it = std::find(resolution_supported.begin(), resolution_supported.end(), curr_res);
|
std::vector <std::string> ::iterator it = std::find(resolution_supported.begin(), resolution_supported.end(), curr_res);
|
||||||
if ((it == resolution_supported.end())||(support_count <= 1))
|
if ((it == resolution_supported.end())||(support_count <= 1) || !obj->is_support_1080dpi)
|
||||||
m_resolution_options[i] -> Hide();
|
m_resolution_options[i] -> Hide();
|
||||||
}
|
}
|
||||||
//hide resolution if there is only one choice
|
//hide resolution if there is only one choice
|
||||||
if (support_count <= 1) {
|
if (support_count <= 1 || !obj->is_support_1080dpi) {
|
||||||
m_text_resolution->Hide();
|
m_text_resolution->Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1271,12 +1271,18 @@ void MachineObject::parse_version_func()
|
||||||
is_xcam_buildplate_supported = false;
|
is_xcam_buildplate_supported = false;
|
||||||
xcam_support_recovery_step_loss = false;
|
xcam_support_recovery_step_loss = false;
|
||||||
is_support_send_to_sdcard = false;
|
is_support_send_to_sdcard = false;
|
||||||
|
is_support_1080dpi = false;
|
||||||
|
is_support_ai_monitoring = false;
|
||||||
|
is_support_ams_humidity = false;
|
||||||
} else {
|
} else {
|
||||||
ams_support_remain = true;
|
ams_support_remain = true;
|
||||||
ams_support_auto_switch_filament_flag = true;
|
ams_support_auto_switch_filament_flag = true;
|
||||||
is_xcam_buildplate_supported = true;
|
is_xcam_buildplate_supported = true;
|
||||||
xcam_support_recovery_step_loss = true;
|
xcam_support_recovery_step_loss = true;
|
||||||
is_support_send_to_sdcard = true;
|
is_support_send_to_sdcard = true;
|
||||||
|
is_support_1080dpi = true;
|
||||||
|
is_support_ai_monitoring = true;
|
||||||
|
is_support_ams_humidity = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2010,6 +2016,9 @@ bool MachineObject::is_function_supported(PrinterFunction func)
|
||||||
func_name = "FUNC_FIRSTLAYER_INSPECT";
|
func_name = "FUNC_FIRSTLAYER_INSPECT";
|
||||||
break;
|
break;
|
||||||
case FUNC_AI_MONITORING:
|
case FUNC_AI_MONITORING:
|
||||||
|
parse_version_func();
|
||||||
|
if (!is_support_ai_monitoring)
|
||||||
|
return false;
|
||||||
func_name = "FUNC_AI_MONITORING";
|
func_name = "FUNC_AI_MONITORING";
|
||||||
break;
|
break;
|
||||||
case FUNC_BUILDPLATE_MARKER_DETECT:
|
case FUNC_BUILDPLATE_MARKER_DETECT:
|
||||||
|
|
|
@ -589,6 +589,11 @@ public:
|
||||||
int xcam_auto_recovery_hold_count = 0;
|
int xcam_auto_recovery_hold_count = 0;
|
||||||
int ams_print_option_count = 0;
|
int ams_print_option_count = 0;
|
||||||
|
|
||||||
|
/*not support U2*/
|
||||||
|
bool is_support_1080dpi {false};
|
||||||
|
bool is_support_ai_monitoring {false};
|
||||||
|
bool is_support_ams_humidity {false};
|
||||||
|
|
||||||
/* sdcard */
|
/* sdcard */
|
||||||
MachineObject::SdcardState sdcard_state { NO_SDCARD };
|
MachineObject::SdcardState sdcard_state { NO_SDCARD };
|
||||||
MachineObject::SdcardState get_sdcard_state();
|
MachineObject::SdcardState get_sdcard_state();
|
||||||
|
|
|
@ -1843,7 +1843,7 @@ void StatusPanel::update_ams(MachineObject *obj)
|
||||||
for (auto ams = obj->amsList.begin(); ams != obj->amsList.end(); ams++) {
|
for (auto ams = obj->amsList.begin(); ams != obj->amsList.end(); ams++) {
|
||||||
AMSinfo info;
|
AMSinfo info;
|
||||||
info.ams_id = ams->first;
|
info.ams_id = ams->first;
|
||||||
if (ams->second->is_exists && info.parse_ams_info(ams->second, obj->ams_calibrate_remain_flag)) ams_info.push_back(info);
|
if (ams->second->is_exists && info.parse_ams_info(ams->second, obj->ams_calibrate_remain_flag, obj->is_support_ams_humidity)) ams_info.push_back(info);
|
||||||
}
|
}
|
||||||
//if (obj->ams_exist_bits != last_ams_exist_bits || obj->tray_exist_bits != last_tray_exist_bits || obj->tray_is_bbl_bits != last_tray_is_bbl_bits ||
|
//if (obj->ams_exist_bits != last_ams_exist_bits || obj->tray_exist_bits != last_tray_exist_bits || obj->tray_is_bbl_bits != last_tray_is_bbl_bits ||
|
||||||
// obj->tray_read_done_bits != last_read_done_bits || obj->ams_version != last_ams_version) {
|
// obj->tray_read_done_bits != last_read_done_bits || obj->ams_version != last_ams_version) {
|
||||||
|
|
|
@ -35,11 +35,18 @@ wxDEFINE_EVENT(EVT_AMS_CLIBRATION_CANCEL, wxCommandEvent);
|
||||||
wxDEFINE_EVENT(EVT_AMS_GUIDE_WIKI, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_AMS_GUIDE_WIKI, wxCommandEvent);
|
||||||
wxDEFINE_EVENT(EVT_AMS_RETRY, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_AMS_RETRY, wxCommandEvent);
|
||||||
|
|
||||||
bool AMSinfo::parse_ams_info(Ams *ams, bool remain_flag)
|
bool AMSinfo::parse_ams_info(Ams *ams, bool remain_flag, bool humidity_flag)
|
||||||
{
|
{
|
||||||
if (!ams) return false;
|
if (!ams) return false;
|
||||||
this->ams_id = ams->id;
|
this->ams_id = ams->id;
|
||||||
this->ams_humidity = ams->humidity;
|
|
||||||
|
if (humidity_flag) {
|
||||||
|
this->ams_humidity = ams->humidity;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->ams_humidity = -1;
|
||||||
|
}
|
||||||
|
|
||||||
cans.clear();
|
cans.clear();
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
auto it = ams->trayList.find(std::to_string(i));
|
auto it = ams->trayList.find(std::to_string(i));
|
||||||
|
@ -917,7 +924,8 @@ void AMSRoad::doRender(wxDC &dc)
|
||||||
dc.DrawBitmap(ams_humidity_0.bmp(), wxPoint(size.x - ams_humidity_0.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_0.GetBmpSize().y - FromDIP(8)));
|
dc.DrawBitmap(ams_humidity_0.bmp(), wxPoint(size.x - ams_humidity_0.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_0.GetBmpSize().y - FromDIP(8)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dc.DrawBitmap(ams_humidity_4.bmp(), wxPoint(size.x - ams_humidity_4.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_4.GetBmpSize().y - FromDIP(8)));
|
/*dc.DrawBitmap(ams_humidity_4.bmp(), wxPoint(size.x - ams_humidity_4.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_4.GetBmpSize().y - FromDIP(8)));*/
|
||||||
|
//to do ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ public:
|
||||||
int curreent_filamentstep;
|
int curreent_filamentstep;
|
||||||
int ams_humidity = 0;
|
int ams_humidity = 0;
|
||||||
|
|
||||||
bool parse_ams_info(Ams *ams, bool remain_flag = false);
|
bool parse_ams_info(Ams *ams, bool remain_flag = false, bool humidity_flag = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
|
|
Loading…
Reference in New Issue