Merge pull request #1953 from larsbrubaker/1.7

Only show whole numbers on printing screen
This commit is contained in:
johnlewin 2017-02-24 14:18:51 -08:00 committed by GitHub
commit ab020ee8d6
3 changed files with 8 additions and 8 deletions

View file

@ -64,12 +64,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
public override void UpdateTemperatures()
{
double targetValue = PrinterConnectionAndCommunication.Instance.TargetBedTemperature;
double actualValue = PrinterConnectionAndCommunication.Instance.ActualBedTemperature;
double actualValue = Math.Max(0, PrinterConnectionAndCommunication.Instance.ActualBedTemperature);
progressBar.RatioComplete = targetValue != 0 ? actualValue / targetValue : 1;
this.actualTemp.Text = $"{actualValue:0.#}°";
this.targetTemp.Text = $"{targetValue:0.#}°";
this.actualTemp.Text = $"{actualValue:0}".PadLeft(3, (char)0x2007) + "°"; // put in padding spaces to make it at least 3 characters
this.targetTemp.Text = $"{targetValue:0}".PadLeft(3, (char)0x2007) + "°"; // put in padding spaces to make it at least 3 characters
}
}
@ -91,12 +91,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
public override void UpdateTemperatures()
{
double targetValue = PrinterConnectionAndCommunication.Instance.GetTargetExtruderTemperature(extruderIndex);
double actualValue = PrinterConnectionAndCommunication.Instance.GetActualExtruderTemperature(extruderIndex);
double actualValue = Math.Max(0, PrinterConnectionAndCommunication.Instance.GetActualExtruderTemperature(extruderIndex));
progressBar.RatioComplete = targetValue != 0 ? actualValue / targetValue : 1;
this.actualTemp.Text = $"{actualValue:0.#}°";
this.targetTemp.Text = $"{targetValue:0.#}°";
this.actualTemp.Text = $"{actualValue:0}".PadLeft(3, (char)0x2007) + "°"; // put in padding spaces to make it at least 3 characters
this.targetTemp.Text = $"{targetValue:0}".PadLeft(3, (char)0x2007) + "°"; // put in padding spaces to make it at least 3 characters
}
}

@ -1 +1 @@
Subproject commit 2554b06f10df85926c35ec018d450f2a4cece199
Subproject commit 5f1a8da0909640654d4faf953d5efd73d121ea82

@ -1 +1 @@
Subproject commit 5ce6224fed7caf5d6c2faf5d409f758c80c46118
Subproject commit 5456a59e4c2b96d858be28f9b60baa7a45466f0c