diff --git a/PrintrBotPlugin/PrintrBotPanel.cs b/PrintrBotPlugin/PrintrBotPanel.cs index e094281..d501fd9 100644 --- a/PrintrBotPlugin/PrintrBotPanel.cs +++ b/PrintrBotPlugin/PrintrBotPanel.cs @@ -389,6 +389,7 @@ private void buttonCalibrate_Click(object sender, EventArgs e) this.calibrating = true; /* STEP 1 */ + buttonCalibrate.Enabled = false; buttonCalibrate.Text = Properties.Resources.CalibrateButton_Cancel; labelCalibration.Text = Properties.Resources.Calibrate_Step1; @@ -405,8 +406,6 @@ private void buttonCalibrate_Click(object sender, EventArgs e) this.injectCommand("G28 Z0"); this.injectCommand("G29"); - System.Threading.Thread.Sleep(3); // Wait for G29 a bit - /* STEP 2 */ // Then run job var context = TaskScheduler.FromCurrentSynchronizationContext(); @@ -419,6 +418,7 @@ private void buttonCalibrate_Click(object sender, EventArgs e) double count = 0.0; while ((line = reader.ReadLine()) != null && this.calibrating == true) { + buttonCalibrate.Enabled = true; count++; var token = Task.Factory.CancellationToken; Task.Factory.StartNew(() => diff --git a/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.dll b/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.dll index 5718070..3b9b30b 100644 Binary files a/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.dll and b/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.dll differ diff --git a/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.pdb b/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.pdb index 0501026..1970a06 100644 Binary files a/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.pdb and b/PrintrBotPlugin/obj/Debug Repetier/PrintrBotPlugin.pdb differ