changes and data/eval files for new evaluations
[IRC.git] / Robust / src / Benchmarks / SSJava / JavaNator / MotorControl.java
index 0a879fa177d530bee636930144f7fcd8248a9aaa..fcc4e16929727550dcffdd26e6cb03dcce6267b3 100644 (file)
@@ -28,7 +28,7 @@
 @METHODDEFAULT("OUT<THIS,THIS<V,V<IN,V*,THISLOC=THIS,RETURNLOC=OUT")\r
 public class MotorControl {\r
   @LOC("T")\r
-  boolean DEBUG = false;\r
+  boolean DEBUG = true;\r
   @LOC("UP")\r
   int motorLeftUpTime = 150;\r
   @LOC("UP")\r
@@ -83,13 +83,17 @@ public class MotorControl {
       motorUpTime--;\r
     }\r
 \r
-    if (DEBUG) {\r
-      System.out.println("setSpeedSpinLeft: output-> = " + Integer.toString(motorUpTime));\r
-    }\r
+    // if (DEBUG) {\r
+    // System.out.println("setSpeedSpinLeft: output-> = " +\r
+    // Integer.toString(motorUpTime));\r
+    // }\r
     // synchronized (this) {\r
     /* Factor in the speed and agility factors */\r
     motorLeftUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setSpeedSpinLeft: output-> " + motorLeftUpTime);\r
+    }\r
   }\r
 \r
   /**\r
@@ -118,13 +122,17 @@ public class MotorControl {
       motorUpTime--;\r
     }\r
 \r
-    if (DEBUG) {\r
-      System.out.println("setSpeedSpinRight: output-> = " + Integer.toString(motorUpTime));\r
-    }\r
+    // if (DEBUG) {\r
+    // System.out.println("setSpeedSpinRight: output-> = " +\r
+    // Integer.toString(motorUpTime));\r
+    // }\r
     // synchronized (this) {\r
     /* Factor in the speed and agility factors */\r
     motorRightUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setSpeedSpinRight: output-> " + motorRightUpTime);\r
+    }\r
   }\r
 \r
   /**\r
@@ -151,13 +159,17 @@ public class MotorControl {
     } else if (motorUpTime == 1000000) {\r
       motorUpTime--;\r
     }\r
-    if (DEBUG) {\r
-      System.out.println("setSpeedTurnLeft: output-> = " + Integer.toString(motorUpTime));\r
-    }\r
+    // if (DEBUG) {\r
+    // System.out.println("setSpeedTurnLeft: output-> = " +\r
+    // Integer.toString(motorUpTime));\r
+    // }\r
     // synchronized (this) {\r
     /* Factor in the speed and agility factors */\r
     motorLeftUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setSpeedTurnLeft: output-> " + motorLeftUpTime);\r
+    }\r
   }\r
 \r
   /**\r
@@ -183,13 +195,13 @@ public class MotorControl {
       motorUpTime--;\r
     }\r
 \r
-    if (DEBUG) {\r
-      System.out.println("setSpeedTurnRight: output-> " + Integer.toString(motorUpTime));\r
-    }\r
     // synchronized (this) {\r
     /* Factor in the speed and agility factors */\r
     motorRightUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setSpeedTurnRight: output-> " + motorRightUpTime);\r
+    }\r
   }\r
 \r
   /**\r
@@ -221,13 +233,15 @@ public class MotorControl {
     } else if (motorUpTime == 1000000) {\r
       motorUpTime--;\r
     }\r
-    if (DEBUG) {\r
-      System.out.println("setSpeedLeft: output-> " + Integer.toString(motorUpTime));\r
-    }\r
+\r
     // synchronized (this) {\r
     /* Factor in speedFactor */\r
     motorLeftUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out\r
+          .println("MotorContol: setSpeedLeft: output-> " + Integer.toString(motorLeftUpTime));\r
+    }\r
   }\r
 \r
   /**\r
@@ -251,13 +265,13 @@ public class MotorControl {
     } else if (motorUpTime == 1000000) {\r
       motorUpTime--;\r
     }\r
-    if (DEBUG) {\r
-      System.out.println("setSpeedRight: output-> " + Integer.toString(motorUpTime));\r
-    }\r
     // synchronized (this) {\r
     /* Factor in speedFactor */\r
     motorRightUpTime = motorUpTime;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setSpeedRight: output-> " + motorRightUpTime);\r
+    }\r
   }\r
 \r
   public void setUrgentReverse() {\r
@@ -265,12 +279,20 @@ public class MotorControl {
     motorLeftUpTime = 1;\r
     motorRightUpTime = 1;\r
     // }\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setUrgentReverse: motorLeftUpTime-> " + motorLeftUpTime);\r
+      System.out.println("MotorControl: setUrgentReverse: motorRightUpTime-> " + motorRightUpTime);\r
+    }\r
   }\r
 \r
   public void setUrgentStraight() {\r
     // synchronized (this) {\r
     motorLeftUpTime = 99;\r
     motorRightUpTime = 99;\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: setUrgentStraight: motorLeftUpTime-> " + motorLeftUpTime);\r
+      System.out.println("MotorControl: setUrgentStraight: motorRightUpTime-> " + motorRightUpTime);\r
+    }\r
     // }\r
   }\r
 \r
@@ -278,6 +300,10 @@ public class MotorControl {
     // synchronized (this) {\r
     motorLeftUpTime = motorLeftUpTime;\r
     motorRightUpTime = motorRightUpTime;\r
+    if (DEBUG) {\r
+      System.out.println("MotorControl: justSync: motorLeftUpTime-> " + motorLeftUpTime);\r
+      System.out.println("MotorControl: justSync: motorRightUpTime-> " + motorRightUpTime);\r
+    }\r
     // }\r
   }\r
 \r