ENH: add info log
jira: [none] Change-Id: Ieb6f2127d2e1b5ff5033dd903987ec44ca1af959
This commit is contained in:
parent
c38eb761c6
commit
3d83cd4442
|
@ -3099,11 +3099,15 @@ bool MachineObject::is_camera_busy_off()
|
||||||
|
|
||||||
int MachineObject::publish_json(std::string json_str, int qos, int flag)
|
int MachineObject::publish_json(std::string json_str, int qos, int flag)
|
||||||
{
|
{
|
||||||
|
int rtn = 0;
|
||||||
if (is_lan_mode_printer()) {
|
if (is_lan_mode_printer()) {
|
||||||
return local_publish_json(json_str, qos, flag);
|
rtn = local_publish_json(json_str, qos, flag);
|
||||||
} else {
|
} else {
|
||||||
return cloud_publish_json(json_str, qos, flag);
|
rtn = cloud_publish_json(json_str, qos, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_LOG_TRIVIAL(trace) << "publish_json: " << json_str << " code: " << rtn;
|
||||||
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MachineObject::cloud_publish_json(std::string json_str, int qos, int flag)
|
int MachineObject::cloud_publish_json(std::string json_str, int qos, int flag)
|
||||||
|
@ -5436,6 +5440,7 @@ int MachineObject::publish_gcode(std::string gcode_str)
|
||||||
t["gcode"] = j.dump();
|
t["gcode"] = j.dump();
|
||||||
m_agent->track_event("cmd_gcode_line", t.dump());
|
m_agent->track_event("cmd_gcode_line", t.dump());
|
||||||
}
|
}
|
||||||
|
|
||||||
return publish_json(j.dump(), 0);
|
return publish_json(j.dump(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue