Exchanging cameras between benchmarks; updating database
[iot2.git] / benchmarks / Java / IrrigationController / IrrigationController.java
index c06646f..4bcec62 100644 (file)
@@ -257,18 +257,18 @@ public class IrrigationController extends UnicastRemoteObject implements Weather
                }
 
                System.out.println("DEBUG: Waiting for phone to send weather information");
-               while (waitingForInterface.get()) {
-                       try {
-                               Thread.sleep(1000);
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                       }
-               }
+               //while (waitingForInterface.get()) {
+               //      try {
+               //              Thread.sleep(1000);
+               //      } catch (Exception e) {
+               //              e.printStackTrace();
+               //      }
+               //}
                // TODO: Use a phone input interface later
-               //inchesPerWeek = 20.00;
-               //weatherZipCode = 92612;
-               //daysToWaterOn = 255;
-               //inchesPerMinute.add(1.50);
+               inchesPerWeek = 20.00;
+               weatherZipCode = 92612;
+               daysToWaterOn = 255;
+               inchesPerMinute.add(1.50);
 
                System.out.println("DEBUG: inchesPerWeek: " + inchesPerWeek);
                System.out.println("DEBUG: weatherZipCode: " + weatherZipCode);
@@ -330,6 +330,8 @@ public class IrrigationController extends UnicastRemoteObject implements Weather
                        // init the sprinkler controller, do it here since it only needs to be done once per controller
                        try {
                                spr.init();
+                               // Wait until sprinkler is active
+                               Thread.sleep(30000);
                        } catch (Exception e) {
                                e.printStackTrace();
                        }