From efc8ee24c5332df69576e789a36c7f67f0874ca3 Mon Sep 17 00:00:00 2001 From: Chrome Legion Date: Tue, 29 May 2018 07:14:36 -0700 Subject: [PATCH] Qrome - updated PrintTimeLeft to report 0 when 100% done --- printermonitor/OctoPrintClient.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/printermonitor/OctoPrintClient.cpp b/printermonitor/OctoPrintClient.cpp index 2db4341..49577cf 100644 --- a/printermonitor/OctoPrintClient.cpp +++ b/printermonitor/OctoPrintClient.cpp @@ -210,7 +210,11 @@ String OctoPrintClient::getProgressPrintTime() { } String OctoPrintClient::getProgressPrintTimeLeft() { - return printerData.progressPrintTimeLeft; + String rtnValue = printerData.progressPrintTimeLeft; + if (getProgressCompletion() == "100") { + rtnValue = "0"; // Print is done so this should be 0 this is a fix for OctoPrint + } + return rtnValue; } String OctoPrintClient::getState() {