From 71f36e809b37850c0acb4711f1cd3878598f3057 Mon Sep 17 00:00:00 2001
From: Thomas Oster <thomas.oster@rwth-aachen.de>
Date: Sat, 29 Dec 2012 22:36:55 +0100
Subject: [PATCH] Remove LAOS workarounds because bug has been fixed

---
 .../liblasercut/drivers/LaosCutter.java       | 22 -------------------
 1 file changed, 22 deletions(-)

diff --git a/src/com/t_oster/liblasercut/drivers/LaosCutter.java b/src/com/t_oster/liblasercut/drivers/LaosCutter.java
index a01b26d..41d59dc 100644
--- a/src/com/t_oster/liblasercut/drivers/LaosCutter.java
+++ b/src/com/t_oster/liblasercut/drivers/LaosCutter.java
@@ -303,13 +303,6 @@ public class LaosCutter extends LaserCutter
   {
     if (currentPower != power)
     {
-      if (currentPower == -1)
-      {
-        //Workaround. There seems to be a bug in LAOS, which causes the first
-        //Power line to be ignored. Thus we send it twice
-        //see http://http://redmine.laoslaser.org/issues/63
-        out.printf("7 101 %d\n", (int) (power * 100));
-      }
       out.printf("7 101 %d\n", (int) (power * 100));
       currentPower = power;
     }
@@ -318,13 +311,6 @@ public class LaosCutter extends LaserCutter
   private float currentSpeed = -1;
   private void setSpeed(PrintStream out, float speed)
   {
-    if (currentSpeed == -1)
-    {
-      //Workaround. There seems to be a bug in LAOS, which causes the first
-      //speed line to be ignored. Thus we send it twice
-      //see http://http://redmine.laoslaser.org/issues/63
-      out.printf("7 100 %d\n", (int) (speed * 100));
-    }
     if (currentSpeed != speed)
     {
       out.printf("7 100 %d\n", (int) (speed * 100));
@@ -595,14 +581,6 @@ public class LaosCutter extends LaserCutter
   {
     ByteArrayOutputStream result = new ByteArrayOutputStream();
     PrintStream out = new PrintStream(result, true, "US-ASCII");
-    //some dummy power speed output, so that the real ones are not ignored
-    //Workaround. There seems to be a bug in LAOS, which causes the first
-    //Power line to be ignored. Thus we send it twice
-    //see http://http://redmine.laoslaser.org/issues/63
-    this.setSpeed(out, 1);
-    this.setPower(out, 1);
-    this.setSpeed(out, 2);
-    this.setPower(out, 2);
     return result.toByteArray();
   }
 
-- 
GitLab