X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=StepSensor%2FStepSensors.groovy;h=d9200c6a24e258144af1c4ca66576836e6a407d6;hb=5661e02c23e94167de4f76e3ba0eb53e2d69fc94;hp=fbfe70ff48fabd34813d64d2ee59e92af1b9097c;hpb=eaa326d5f41665f412a4731e093ebe8695a1c6d7;p=smartthings-infrastructure.git diff --git a/StepSensor/StepSensors.groovy b/StepSensor/StepSensors.groovy index fbfe70f..d9200c6 100644 --- a/StepSensor/StepSensors.groovy +++ b/StepSensor/StepSensors.groovy @@ -2,9 +2,6 @@ package StepSensor import Timer.SimulatedTimer -//JPF's Verify API -import gov.nasa.jpf.vm.Verify - public class StepSensors { private int deviceNumbers private List stepSensors @@ -18,16 +15,18 @@ public class StepSensors { private int steps = 0 - StepSensors(Closure sendEvent, int deviceNumbers) { + StepSensors(Closure sendEvent, int deviceNumbers, boolean init) { this.sendEvent = sendEvent this.deviceNumbers = deviceNumbers this.stepSensors = [] - /*def initGoal = Verify.getIntFromList(1000, 2000, 3000) - this.goal = initGoal - def initSteps = Verify.getIntFromList(0, 1, 2) - this.steps = initSteps*/ - + if (init) { + this.goal = 50 + this.steps = 35 + } else { + this.goal = 40 + this.steps = 60 + } stepSensors.add(new StepSensor(id, label, displayName, this.steps, this.goal)) }