mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Fix device popup, mapping, and status-parse defects
- Allow mapping to EMPTY trays only from the multi-machine send page and keep both panels pickable in the LEFT_AND_RIGHT view - Guard the error-dialog cloud snapshot against stale callbacks and fall back to the local illustration on timeout - Parse the ipcam storage-check ack and axis/chamber pushes defensively - Strip fan-control telemetry, initialize the upgrade error code, restore the .json filter in the model-id scan - Fix best-position popup tray lookup, gradient placement, and colour-list ownership - Cover switch binding sets and invalid-track transients in DevMapping tests
This commit is contained in:
@@ -61,6 +61,8 @@ std::map<std::string, std::string> DevPrinterConfigUtil::get_all_model_id_with_n
|
||||
|
||||
for (wxString file : m_files)
|
||||
{
|
||||
if (!file.Lower().ends_with(".json")) continue;
|
||||
|
||||
std::string config_file = m_resource_file_path + "/printers/" + file.ToStdString();
|
||||
boost::nowide::ifstream json_file(config_file.c_str());
|
||||
|
||||
|
||||
@@ -46,29 +46,11 @@ void Slic3r::DevFan::converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_
|
||||
}
|
||||
}
|
||||
|
||||
static std::string _get_string_from_fantype(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case 1: return "cooling_fan";
|
||||
case 2: return "big_cooling_fan";
|
||||
case 3: return "chamber_fan";
|
||||
default: return "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// Old protocol
|
||||
int Slic3r::DevFan::command_control_fan(int fan_type, int val)
|
||||
{
|
||||
// Orca: strip analytics telemetry
|
||||
std::string gcode = (boost::format("M106 P%1% S%2% \n") % (int) fan_type % (val)).str();
|
||||
try {
|
||||
json j;
|
||||
j["ctrl_type"] = _get_string_from_fantype(fan_type);
|
||||
j["value"] = val;
|
||||
|
||||
NetworkAgent *agent = GUI::wxGetApp().getAgent();
|
||||
if (agent) agent->track_event("printer_control", j.dump());
|
||||
} catch (...) {}
|
||||
return m_owner->publish_gcode(gcode);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ private:
|
||||
std::map<std::string, DevFirmwareVersionInfo> m_new_ver_list; // some protcols have version list
|
||||
DevFirmwareUpgradeState m_upgrade_display_state = DevFirmwareUpgradeState::DC;
|
||||
|
||||
int m_upgrade_err_code;
|
||||
int m_upgrade_err_code = 0;
|
||||
std::string m_upgrade_status;
|
||||
std::string m_upgrade_progress;
|
||||
std::string m_upgrade_message;
|
||||
|
||||
Reference in New Issue
Block a user