Made touchscreen a machine setting rather than a user setting
This commit is contained in:
parent
9e80776dfe
commit
27860fc9ea
7 changed files with 57 additions and 38 deletions
|
|
@ -91,7 +91,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
-10, -10, -10,
|
||||
20, 10, 10), .001));
|
||||
|
||||
union.Flatten(null);
|
||||
union.Apply(null);
|
||||
|
||||
Assert.AreEqual(1, root.Children.Count());
|
||||
var rootAabb = root.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -150,7 +150,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
20, 10, 10).Equals(rootAabb, .001));
|
||||
|
||||
var undoBuffer = new UndoBuffer();
|
||||
combine.Flatten(undoBuffer);
|
||||
combine.Apply(undoBuffer);
|
||||
|
||||
Assert.AreEqual(1, root.Descendants().Count());
|
||||
Assert.AreEqual(1, root.Children.Count());
|
||||
|
|
@ -185,7 +185,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
10, 10, 10).Equals(rootAabb, .001));
|
||||
|
||||
var undoBuffer = new UndoBuffer();
|
||||
combine.Remove(undoBuffer);
|
||||
combine.Cancel(undoBuffer);
|
||||
|
||||
Assert.AreEqual(2, root.Descendants().Count(), "Should have the 1 cubeA, 2 cubeB");
|
||||
rootAabb = root.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -218,7 +218,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
20, 10, 10).Equals(rootAabb, .001));
|
||||
|
||||
var undoBuffer = new UndoBuffer();
|
||||
combine.Remove(undoBuffer);
|
||||
combine.Cancel(undoBuffer);
|
||||
|
||||
Assert.AreEqual(4, root.Descendants().Count(), "Should have the 1 cubeA, 2 cubeB, 3 offset cubeB, 4 offset sourceItem");
|
||||
rootAabb = root.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -265,7 +265,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
union.Combine();
|
||||
Assert.AreEqual(8, root.Descendants().Count(), "group, union, wa, a, wtb, tb, b");
|
||||
|
||||
union.Flatten(null);
|
||||
union.Apply(null);
|
||||
Assert.AreEqual(1, root.Descendants().Count(), "Should have the union result");
|
||||
|
||||
Assert.AreEqual(1, root.Children.Count());
|
||||
|
|
@ -294,7 +294,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
root.Children.Add(subtract);
|
||||
|
||||
subtract.Subtract();
|
||||
subtract.Flatten(null);
|
||||
subtract.Apply(null);
|
||||
|
||||
Assert.AreEqual(1, root.Children.Count());
|
||||
var rootAabb = root.GetAxisAlignedBoundingBox();
|
||||
|
|
@ -614,7 +614,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
Assert.IsTrue(align.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(new Vector3(40, 0, 0), new Vector3(80, 70, 40)), 1.0));
|
||||
|
||||
// remove the align and assert stuff moved back to where it started
|
||||
align.Remove(null);
|
||||
align.Cancel(null);
|
||||
Assert.IsTrue(cube.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(new Vector3(40, 50, 0), new Vector3(60, 70, 20)), .01));
|
||||
Assert.IsTrue(bigCube.GetAxisAlignedBoundingBox().Equals(new AxisAlignedBoundingBox(new Vector3(0, 0, 0), new Vector3(40, 40, 40)), .01));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,28 @@ namespace MatterControl.Tests.MatterControl
|
|||
private static List<PrinterTestDetails> allPrinters;
|
||||
private static string printerSettingsDirectory = TestContext.CurrentContext.ResolveProjectPath(4, "StaticData", "Profiles");
|
||||
|
||||
private string pauseGCode = @"M76 ; pause print timer
|
||||
G91
|
||||
G1 Z10 E-5.0 F1800
|
||||
G90
|
||||
G1 X5
|
||||
|
||||
M300 S3000 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S3000 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S3000 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S3000 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S750 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S750 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S750 P30 ; Pause Tone
|
||||
M300 S1500 P30 ; Pause Tone
|
||||
M300 S750 P30 ; Pause Tone";
|
||||
|
||||
static OemProfileTests()
|
||||
{
|
||||
StaticData.RootPath = TestContext.CurrentContext.ResolveProjectPath(4, "StaticData");
|
||||
|
|
@ -35,6 +57,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
[Test, RunInApplicationDomain]
|
||||
public void ModifyPrinterProfiles()
|
||||
{
|
||||
// This is not really a test. It updaets our profiles with new settings
|
||||
return;
|
||||
|
||||
StaticData.RootPath = TestContext.CurrentContext.ResolveProjectPath(4, "StaticData");
|
||||
|
|
@ -51,6 +74,11 @@ namespace MatterControl.Tests.MatterControl
|
|||
PrinterSettings = PrinterSettings.LoadFile(printerFile.FullName)
|
||||
}).ToList();
|
||||
|
||||
string ConvertString(string input)
|
||||
{
|
||||
return input.Replace("\n", "\\n").Replace("\r", "");
|
||||
}
|
||||
|
||||
void ChangeSettings(PrinterSettings printerSettings)
|
||||
{
|
||||
var printerModel = printerSettings.GetValue(SettingsKey.model);
|
||||
|
|
@ -78,18 +106,13 @@ namespace MatterControl.Tests.MatterControl
|
|||
printerSettings.SetValue(SettingsKey.min_extrusion_before_retract, "0");
|
||||
printerSettings.SetValue(SettingsKey.retract_before_travel_avoid, "20");
|
||||
|
||||
if (string.IsNullOrEmpty(printerSettings.GetValue(SettingsKey.read_regex)))
|
||||
if (printerModel.Contains('E'))
|
||||
{
|
||||
if (printerModel.Contains('E'))
|
||||
{
|
||||
printerSettings.SetValue(SettingsKey.read_regex, "\"^(filament)\", \"ros_\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int ja = 0;
|
||||
printerSettings.SetValue(SettingsKey.read_regex, "\"^(filament)\", \"ros_\"");
|
||||
}
|
||||
|
||||
printerSettings.SetValue(SettingsKey.pause_gcode, ConvertString(pauseGCode));
|
||||
|
||||
// If the board is 32 bit we cannot update the firmware.
|
||||
if (printerModel.Contains('M') || printerModel.Contains('S'))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue