mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH:optimized printer selection
STUDIO-3380 STUDIO-3532 Change-Id: Id145022072de9c9a0969bdefb4c98e01078b079c
This commit is contained in:
parent
bd4f3bec73
commit
b2a2636785
5 changed files with 72 additions and 94 deletions
|
@ -1477,6 +1477,7 @@ int MachineObject::command_request_push_all(bool request_now)
|
|||
{
|
||||
auto curr_time = std::chrono::system_clock::now();
|
||||
auto diff = std::chrono::duration_cast<std::chrono::milliseconds>(curr_time - last_request_push);
|
||||
|
||||
if (diff.count() < REQUEST_PUSH_MIN_TIME) {
|
||||
if (request_now) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "static: command_request_push_all, dev_id=" << dev_id;
|
||||
|
@ -1490,6 +1491,7 @@ int MachineObject::command_request_push_all(bool request_now)
|
|||
BOOST_LOG_TRIVIAL(trace) << "static: command_request_push_all, dev_id=" << dev_id;
|
||||
last_request_push = std::chrono::system_clock::now();
|
||||
}
|
||||
|
||||
json j;
|
||||
j["pushing"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
|
||||
j["pushing"]["command"] = "pushall";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue