X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=blobdiff_plain;f=StepSensor%2FStepSensors.groovy;h=d3edb7b4f6f9fc035374e54317c3fb5788dbac27;hp=fbfe70ff48fabd34813d64d2ee59e92af1b9097c;hb=ef89c03ba3f5c7b61f30c8948a9170c36c91647f;hpb=e560c2f1485f4e620e6d7085c82ce52c846bd727 diff --git a/StepSensor/StepSensors.groovy b/StepSensor/StepSensors.groovy index fbfe70f..d3edb7b 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 = 0 + } else { + this.goal = 60 + this.steps = 1 + } stepSensors.add(new StepSensor(id, label, displayName, this.steps, this.goal)) }