mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: add log for cali
Jira: XXXX Change-Id: I4ba755e4700122bd331f8d95ec4b1a09f4b7b5f9 (cherry picked from commit ce2786ffe53aec1a6df1a33e50ec07572da5ad44)
This commit is contained in:
parent
5010994d88
commit
abca2007ab
3 changed files with 44 additions and 11 deletions
|
@ -154,6 +154,7 @@ void CalibrationWizard::on_device_connected(MachineObject* obj)
|
|||
BOOST_LOG_TRIVIAL(info) << "on_device_connected - machine object status:"
|
||||
<< " dev_id = " << obj->dev_id
|
||||
<< ", print_type = " << obj->printer_type
|
||||
<< ", printer_status = " << obj->print_status
|
||||
<< ", cali_finished = " << obj->cali_finished
|
||||
<< ", cali_version = " << obj->cali_version
|
||||
<< ", cache_flow_ratio = " << obj->cache_flow_ratio
|
||||
|
|
|
@ -143,6 +143,29 @@ void CalibrationCaliPage::clear_last_job_status()
|
|||
|
||||
void CalibrationCaliPage::update(MachineObject* obj)
|
||||
{
|
||||
if (this->IsShown()) {
|
||||
if (obj) {
|
||||
if (obj->print_status != "RUNNING") {
|
||||
BOOST_LOG_TRIVIAL(info) << "on_show_cali_page - machine object status:"
|
||||
<< " dev_id = " << obj->dev_id
|
||||
<< ", print_type = " << obj->printer_type
|
||||
<< ", printer_status = " << obj->print_status
|
||||
<< ", is_connected = " << obj->is_connected()
|
||||
<< ", m_is_between_start_and_running = " << m_is_between_start_and_running
|
||||
<< ", cali_finished = " << obj->cali_finished
|
||||
<< ", cali_version = " << obj->cali_version
|
||||
<< ", cache_flow_ratio = " << obj->cache_flow_ratio
|
||||
<< ", sub_task_name = " << obj->subtask_name
|
||||
<< ", gcode_file_name = " << obj->m_gcode_file
|
||||
<< ", get_pa_calib_result" << obj->get_pa_calib_result
|
||||
<< ", get_flow_calib_result" << obj->get_flow_calib_result;
|
||||
}
|
||||
}
|
||||
else {
|
||||
BOOST_LOG_TRIVIAL(info) << "on_show_cali_page - machine object is nullptr";
|
||||
}
|
||||
}
|
||||
|
||||
static int get_result_count = 0;
|
||||
// enable calibration when finished
|
||||
bool enable_cali = false;
|
||||
|
|
|
@ -979,6 +979,23 @@ void CalibUtils::process_and_store_3mf(Model* model, const DynamicPrintConfig& f
|
|||
|
||||
void CalibUtils::send_to_print(const CalibInfo &calib_info, std::string &error_message, int flow_ratio_mode)
|
||||
{
|
||||
{ // before send
|
||||
json j;
|
||||
j["print"]["cali_mode"] = calib_info.params.mode;
|
||||
j["print"]["start"] = calib_info.params.start;
|
||||
j["print"]["end"] = calib_info.params.end;
|
||||
j["print"]["step"] = calib_info.params.step;
|
||||
j["print"]["print_numbers"] = calib_info.params.print_numbers;
|
||||
j["print"]["flow_ratio_mode"] = flow_ratio_mode;
|
||||
j["print"]["tray_id"] = calib_info.select_ams;
|
||||
j["print"]["dev_id"] = calib_info.dev_id;
|
||||
j["print"]["bed_type"] = calib_info.bed_type;
|
||||
j["print"]["printer_prest"] = calib_info.printer_prest ? calib_info.printer_prest->name : "";
|
||||
j["print"]["filament_prest"] = calib_info.filament_prest ? calib_info.filament_prest->name : "";
|
||||
j["print"]["print_prest"] = calib_info.print_prest ? calib_info.print_prest->name : "";
|
||||
BOOST_LOG_TRIVIAL(info) << "send_cali_job - before send: " << j.dump();
|
||||
}
|
||||
|
||||
std::string dev_id = calib_info.dev_id;
|
||||
std::string select_ams = calib_info.select_ams;
|
||||
std::shared_ptr<ProgressIndicator> process_bar = calib_info.process_bar;
|
||||
|
@ -1065,19 +1082,11 @@ void CalibUtils::send_to_print(const CalibInfo &calib_info, std::string &error_m
|
|||
print_job->set_print_config(MachineBedTypeString[bed_type], true, false, false, false, true);
|
||||
print_job->set_print_job_finished_event(wxGetApp().plater()->get_send_calibration_finished_event(), print_job->m_project_name);
|
||||
|
||||
{ // record the print job
|
||||
{ // after send: record the print job
|
||||
json j;
|
||||
j["print"]["cali_type"] = calib_info.params.mode;
|
||||
j["print"]["flow_ratio_mode"] = flow_ratio_mode;
|
||||
j["print"]["tray_id"] = calib_info.select_ams;
|
||||
j["print"]["dev_id"] = calib_info.dev_id;
|
||||
j["print"]["start"] = calib_info.params.start;
|
||||
j["print"]["end"] = calib_info.params.end;
|
||||
j["print"]["step"] = calib_info.params.step;
|
||||
j["print"]["print_numbers"] = calib_info.params.print_numbers;
|
||||
j["print"]["cali_mode"] = int(cali_mode);
|
||||
j["print"]["project_name"] = print_job->m_project_name;
|
||||
BOOST_LOG_TRIVIAL(trace) << "send_cali_job: " << j.dump();
|
||||
j["print"]["is_cali_task"] = print_job->m_is_calibration_task;
|
||||
BOOST_LOG_TRIVIAL(info) << "send_cali_job - after send: " << j.dump();
|
||||
}
|
||||
|
||||
print_job->start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue