Several improvements to the print job queue

This commit is contained in:
Alessandro Ranellucci 2015-11-02 01:18:05 +01:00
parent 9b21ac877a
commit fc1a7471cf
13 changed files with 174 additions and 65 deletions

View file

@ -158,6 +158,18 @@ GCodeSender::resume_queue()
this->send();
}
void
GCodeSender::purge_queue()
{
boost::lock_guard<boost::mutex> l(this->queue_mutex);
{
// clear queue
std::queue<std::string> empty;
std::swap(this->queue, empty);
}
this->queue_paused = false;
}
// purge log and return its contents
std::vector<std::string>
GCodeSender::purge_log()