mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-01 07:44:41 -07:00
ENH: add some log for traverse
jira: [STUDIO-13728] Change-Id: Ie4419ecd809bd4392035ad063849f271e687b0f0 (cherry picked from commit 7aa1916fe8491ca1653acc55ee3ac527415b6113)
This commit is contained in:
parent
41bfd5b8c2
commit
a12330f4e7
1 changed files with 32 additions and 5 deletions
|
|
@ -110,8 +110,12 @@ std::string DevPrinterConfigUtil::get_fan_text(const std::string& type_str, cons
|
|||
|
||||
std::map<std::string, std::vector<std::string>> DevPrinterConfigUtil::get_all_subseries(std::string type_str)
|
||||
{
|
||||
std::map<std::string, std::vector<std::string>> subseries;
|
||||
std::vector<wxString> m_files;
|
||||
std::map<std::string, std::vector<std::string>> subseries;
|
||||
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": path= " << m_resource_file_path + "/printers/";
|
||||
#endif
|
||||
|
||||
wxDir dir(m_resource_file_path + "/printers/");
|
||||
if (!dir.IsOpened()) { return subseries; }
|
||||
|
|
@ -137,7 +141,6 @@ std::map<std::string, std::vector<std::string>> DevPrinterConfigUtil::get_all_su
|
|||
json_file >> jj;
|
||||
if (jj.contains("00.00.00.00"))
|
||||
{
|
||||
|
||||
json const& printer = jj["00.00.00.00"];
|
||||
if (printer.contains("subseries"))
|
||||
{
|
||||
|
|
@ -153,12 +156,36 @@ std::map<std::string, std::vector<std::string>> DevPrinterConfigUtil::get_all_su
|
|||
}
|
||||
subseries.insert(make_pair(model_id, subs));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...) {}
|
||||
catch (...)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": failed to load " << file;
|
||||
}
|
||||
}
|
||||
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
wxString result_str;
|
||||
for (auto item : subseries)
|
||||
{
|
||||
wxString item_str = item.first;
|
||||
item_str += ": ";
|
||||
for (auto to_item : item.second)
|
||||
{
|
||||
item_str += to_item;
|
||||
item_str += " ";
|
||||
}
|
||||
|
||||
result_str += item_str + ", ";
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": result= " << result_str;
|
||||
#endif
|
||||
|
||||
if (subseries.empty())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": result= " << "empty";
|
||||
}
|
||||
|
||||
return subseries;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue