diff --git a/resources/images/extra_icon.svg b/resources/images/extra_icon.svg new file mode 100644 index 000000000..eec95433f --- /dev/null +++ b/resources/images/extra_icon.svg @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/input_accesscode_help2.png b/resources/images/input_access_code_p1p_cn.png similarity index 100% rename from resources/images/input_accesscode_help2.png rename to resources/images/input_access_code_p1p_cn.png diff --git a/resources/images/input_access_code_p1p_en.png b/resources/images/input_access_code_p1p_en.png new file mode 100644 index 000000000..0bff847ce Binary files /dev/null and b/resources/images/input_access_code_p1p_en.png differ diff --git a/resources/images/input_access_code_cn.png b/resources/images/input_access_code_x1_cn.png similarity index 100% rename from resources/images/input_access_code_cn.png rename to resources/images/input_access_code_x1_cn.png diff --git a/resources/images/input_access_code_en.png b/resources/images/input_access_code_x1_en.png similarity index 100% rename from resources/images/input_access_code_en.png rename to resources/images/input_access_code_x1_en.png diff --git a/resources/images/input_accesscode_help1.png b/resources/images/lan_mode_help_x1.png similarity index 100% rename from resources/images/input_accesscode_help1.png rename to resources/images/lan_mode_help_x1.png diff --git a/resources/printers/BL-P001.json b/resources/printers/BL-P001.json index 3361ef700..c12776569 100644 --- a/resources/printers/BL-P001.json +++ b/resources/printers/BL-P001.json @@ -40,7 +40,9 @@ "model_id": "BL-P001", "compatible_machine":["BL-P002", "C11", "C12", "C13"], "printer_type": "3DPrinter-X1-Carbon", - "printer_thumbnail_image": "printer_thumbnail" + "printer_thumbnail_image": "printer_thumbnail", + "printer_connect_help_image": "input_access_code_x1", + "printer_use_ams_image":"ams_icon" }, "01.01.01.00": { "print": { diff --git a/resources/printers/BL-P002.json b/resources/printers/BL-P002.json index 334602f53..d38d930c8 100644 --- a/resources/printers/BL-P002.json +++ b/resources/printers/BL-P002.json @@ -40,7 +40,9 @@ "model_id": "BL-P002", "compatible_machine":["BL-P001", "C11", "C12", "C13"], "printer_type": "3DPrinter-X1", - "printer_thumbnail_image": "printer_thumbnail" + "printer_thumbnail_image": "printer_thumbnail", + "printer_connect_help_image": "input_access_code_x1", + "printer_use_ams_image":"ams_icon" }, "01.01.01.00": { "print": { diff --git a/resources/printers/C11.json b/resources/printers/C11.json index 4e5311740..bba1782a3 100644 --- a/resources/printers/C11.json +++ b/resources/printers/C11.json @@ -38,7 +38,9 @@ "compatible_machine":["BL-P001", "BL-P002", "C12", "C13"], "printer_type": "C11", "ftp_folder" : "sdcard/", - "printer_thumbnail_image": "printer_thumbnail_p1p" + "printer_thumbnail_image": "printer_thumbnail_p1p", + "printer_connect_help_image": "input_access_code_p1p", + "printer_use_ams_image":"ams_icon" }, "01.02.00.00": { "print": { diff --git a/resources/printers/C12.json b/resources/printers/C12.json index 8f7196e53..3bceec77b 100644 --- a/resources/printers/C12.json +++ b/resources/printers/C12.json @@ -38,7 +38,9 @@ "compatible_machine":["BL-P001", "BL-P002", "C11", "C13"], "printer_type": "C12", "ftp_folder" : "sdcard/", - "printer_thumbnail_image": "printer_thumbnail_p1p" + "printer_thumbnail_image": "printer_thumbnail_p1p", + "printer_connect_help_image": "input_access_code_p1p", + "printer_use_ams_image":"ams_icon" }, "01.02.99.10" : { "print": { diff --git a/resources/printers/C13.json b/resources/printers/C13.json new file mode 100644 index 000000000..6998d49f9 --- /dev/null +++ b/resources/printers/C13.json @@ -0,0 +1,54 @@ +{ + "00.00.00.00": { + "display_name": "Bambu Lab X1E", + "print": { + "ipcam": { + "resolution_supported": [ "720p", "1080p" ], + "virtual_camera": "enabled", + "liveview": { + "remote": "enabled" + }, + "file": { + "remote": "enabled" + } + }, + "support_motor_noise_cali":false, + "support_tunnel_mqtt":true, + "support_mqtt_alive":true, + "support_command_ams_switch":true, + "support_ssl_for_mqtt":true, + "support_cloud_print_only":false, + "support_1080dpi":true, + "support_prompt_sound":false, + "support_ams_humidity":true, + "support_auto_recovery_step_loss":true, + "support_auto_leveling":true, + "support_update_remain":true, + "support_timelapse":true, + "support_filament_backup":true, + "support_chamber_fan":true, + "support_aux_fan":true, + "support_send_to_sd":true, + "support_print_all":true, + "support_print_without_sd":true, + "support_flow_calibration":true, + "support_build_plate_marker_detect":true, + "support_lidar_calibration":true, + "support_ai_monitoring":true, + "support_first_layer_inspect":true, + "support_chamber_temp_edit":true, + "support_extrusion_cali":false, + "bed_temperature_limit": 110, + "nozzle_max_temperature": 330 + }, + "model_id": "C13", + "compatible_machine":["BL-P001", "BL-P002", "C11", "C12"], + "printer_type": "C13", + "printer_thumbnail_image": "printer_thumbnail", + "printer_connect_help_image": "input_access_code_x1", + "printer_use_ams_image":"ams_icon" + }, + "01.05.06.06": { + "rv2166": "00.00.21.20" + } +} \ No newline at end of file diff --git a/resources/printers/N1.json b/resources/printers/N1.json index 9026c80f8..f898a90f3 100644 --- a/resources/printers/N1.json +++ b/resources/printers/N1.json @@ -41,6 +41,8 @@ "printer_type": "N1", "ftp_folder" : "sdcard/", "printer_thumbnail_image": "printer_thumbnail_n1", + "printer_connect_help_image": "input_access_code_n1", + "printer_use_ams_image":"extra_icon", "printer_arch" : "i3" } } \ No newline at end of file diff --git a/src/slic3r/GUI/AMSSetting.cpp b/src/slic3r/GUI/AMSSetting.cpp index 3f6bfa3f7..ac62d1eba 100644 --- a/src/slic3r/GUI/AMSSetting.cpp +++ b/src/slic3r/GUI/AMSSetting.cpp @@ -192,8 +192,8 @@ void AMSSetting::create() wxPanel* m_panel_img = new wxPanel(m_panel_body, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_panel_img->SetBackgroundColour(AMS_SETTING_GREY200); wxBoxSizer *m_sizer_img = new wxBoxSizer(wxVERTICAL); - auto img = new wxStaticBitmap(m_panel_img, wxID_ANY, create_scaled_bitmap("ams_icon", nullptr, 126), wxDefaultPosition, wxDefaultSize); - m_sizer_img->Add(img, 0, wxALIGN_CENTER | wxTOP, 26); + m_am_img = new wxStaticBitmap(m_panel_img, wxID_ANY, create_scaled_bitmap("ams_icon", nullptr, 126), wxDefaultPosition, wxDefaultSize); + m_sizer_img->Add(m_am_img, 0, wxALIGN_CENTER | wxTOP, 26); m_sizer_img->Add(0, 0, 0, wxTOP, 18); m_panel_img->SetSizer(m_sizer_img); m_panel_img->Layout(); @@ -262,6 +262,11 @@ void AMSSetting::update_insert_material_read_mode(bool selected) Fit(); } +void AMSSetting::update_ams_img(std::string ams_icon_str) +{ + m_am_img->SetBitmap(create_scaled_bitmap(ams_icon_str, nullptr, 126)); +} + void AMSSetting::update_starting_read_mode(bool selected) { m_checkbox_starting_auto_read->SetValue(selected); diff --git a/src/slic3r/GUI/AMSSetting.hpp b/src/slic3r/GUI/AMSSetting.hpp index 0b227de29..4fddf4766 100644 --- a/src/slic3r/GUI/AMSSetting.hpp +++ b/src/slic3r/GUI/AMSSetting.hpp @@ -27,7 +27,8 @@ public: ~AMSSetting(); void create(); - void update_insert_material_read_mode(bool selected); + void update_insert_material_read_mode(bool selected); + void update_ams_img(std::string ams_icon_str); void update_starting_read_mode(bool selected); void update_remain_mode(bool selected); void update_switch_filament(bool selected); @@ -40,6 +41,7 @@ public: wxStaticText *append_text(wxString text); MachineObject *obj{nullptr}; bool ams_support_remain{false}; + wxStaticBitmap* m_am_img; int ams_id { 0 }; protected: diff --git a/src/slic3r/GUI/ConnectPrinter.cpp b/src/slic3r/GUI/ConnectPrinter.cpp index 8c9f79050..6b6497f65 100644 --- a/src/slic3r/GUI/ConnectPrinter.cpp +++ b/src/slic3r/GUI/ConnectPrinter.cpp @@ -117,14 +117,28 @@ void ConnectPrinterDialog::init_bitmap() { AppConfig *config = get_app_config(); std::string language = config->get("language"); - if (language == "zh_CN") { - m_diagram_bmp = create_scaled_bitmap("input_access_code_cn", nullptr, 190); + + if (m_obj) { + std::string img_str = DeviceManager::get_printer_diagram_img(m_obj->printer_type); + if(img_str.empty()){img_str = "input_access_code_x1"; } + + if (language == "zh_CN") { + m_diagram_bmp = create_scaled_bitmap(img_str+"_cn", nullptr, 190); + } + else { + m_diagram_bmp = create_scaled_bitmap(img_str+"_en", nullptr, 190); + } } else{ - m_diagram_bmp = create_scaled_bitmap("input_access_code_en", nullptr, 190); + if (language == "zh_CN") { + m_diagram_bmp = create_scaled_bitmap("input_access_code_x1_cn", nullptr, 190); + } + else { + m_diagram_bmp = create_scaled_bitmap("input_access_code_x1_en", nullptr, 190); + } } m_diagram_img = m_diagram_bmp.ConvertToImage(); - m_diagram_img.Rescale(FromDIP(340), FromDIP(190)); + m_diagram_img.Rescale(FromDIP(340), FromDIP(190)); } void ConnectPrinterDialog::set_machine_object(MachineObject* obj) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 2aec355d3..ca286b555 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -5162,6 +5162,18 @@ std::string DeviceManager::get_printer_thumbnail_img(std::string type_str) { return get_string_from_config(type_str, "printer_thumbnail_image"); } + +std::string DeviceManager::get_printer_diagram_img(std::string type_str) +{ + return get_string_from_config(type_str, "printer_connect_help_image"); +} + +std::string DeviceManager::get_printer_ams_img(std::string type_str) +{ + return get_string_from_config(type_str, "printer_use_ams_image"); +} + + bool DeviceManager::is_function_supported(std::string type_str, std::string function_name) { if (DeviceManager::function_table.contains("printers")) { diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 6bd2eaa06..18ce968cb 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -942,6 +942,8 @@ public: static std::string parse_printer_type(std::string type_str); static std::string get_printer_display_name(std::string type_str); static std::string get_printer_thumbnail_img(std::string type_str); + static std::string get_printer_diagram_img(std::string type_str); + static std::string get_printer_ams_img(std::string type_str); static PrinterArch get_printer_arch(std::string type_str); static std::string get_ftp_folder(std::string type_str); static bool is_function_supported(std::string type_str, std::string function_name); diff --git a/src/slic3r/GUI/ReleaseNote.cpp b/src/slic3r/GUI/ReleaseNote.cpp index 313637d48..bab8a90a7 100644 --- a/src/slic3r/GUI/ReleaseNote.cpp +++ b/src/slic3r/GUI/ReleaseNote.cpp @@ -1080,9 +1080,9 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent) m_tip3->SetMinSize(wxSize(FromDIP(352), -1)); m_tip3->SetMaxSize(wxSize(FromDIP(352), -1)); - m_img_help1 = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("input_accesscode_help1", this, 198), wxDefaultPosition, wxSize(FromDIP(352), FromDIP(198)), 0); + m_img_help1 = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("lan_mode_help_x1", this, 198), wxDefaultPosition, wxSize(FromDIP(352), FromDIP(198)), 0); - m_img_help2 = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("input_accesscode_help2", this, 118), wxDefaultPosition, wxSize(FromDIP(352), FromDIP(118)), 0); + m_img_help2 = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("input_access_code_p1p_en", this, 118), wxDefaultPosition, wxSize(FromDIP(352), FromDIP(118)), 0); m_img_help1->Hide(); m_img_help2->Hide(); diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index ad97f573f..730b8af1c 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -3130,6 +3130,7 @@ void StatusPanel::on_ams_setting_click(SimpleEvent &event) if (obj) { m_ams_setting_dlg->update_insert_material_read_mode(obj->ams_insert_flag); m_ams_setting_dlg->update_starting_read_mode(obj->ams_power_on_flag); + m_ams_setting_dlg->update_ams_img(DeviceManager::get_printer_ams_img(obj->printer_type)); std::string ams_id = m_ams_control->GetCurentShowAms(); if (obj->amsList.size() == 0) { /* wxString txt = _L("AMS settings are not supported for external spool"); diff --git a/src/slic3r/GUI/UpgradePanel.cpp b/src/slic3r/GUI/UpgradePanel.cpp index a165cb978..e0f71a099 100644 --- a/src/slic3r/GUI/UpgradePanel.cpp +++ b/src/slic3r/GUI/UpgradePanel.cpp @@ -309,7 +309,7 @@ void MachineInfoPanel::init_bitmaps() m_img_printer = ScalableBitmap(this, "printer_thumbnail", 160); m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams", 200); m_img_ext = ScalableBitmap(this, "monitor_upgrade_ext", 200); - m_img_extra_ams = ScalableBitmap(this, "monitor_upgrade_ams", 200); + m_img_extra_ams = ScalableBitmap(this, "extra_icon", 160); upgrade_green_icon = ScalableBitmap(this, "monitor_upgrade_online", 5); upgrade_gray_icon = ScalableBitmap(this, "monitor_upgrade_offline", 5); upgrade_yellow_icon = ScalableBitmap(this, "monitor_upgrade_busy", 5);