Qrome - updated PrintTimeLeft to report 0 when 100% done

pull/14/head
Chrome Legion 2018-05-29 07:14:36 -07:00
parent 4feb52b748
commit efc8ee24c5
1 changed files with 5 additions and 1 deletions

View File

@ -210,7 +210,11 @@ String OctoPrintClient::getProgressPrintTime() {
} }
String OctoPrintClient::getProgressPrintTimeLeft() { 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() { String OctoPrintClient::getState() {