public int getWindowSize() { return windowSize.getValue(); }
public void update(int currentValue) { if (currentValue == previousPosition.getIntegerValue()) counter.increment(); else counter.set(0); if (counter.getIntegerValue() >= windowSize.getValue()) { set(currentValue); counter.set(0); } previousPosition.set(currentValue); }
private void updateInternal() { stageTime.add(Conversions.millisecondsToSeconds(tickDurationMs)); if (stageTime.getDoubleValue() > 20.0) { if (debug) PrintTools.info("Hard timeout at " + stageTime.getDoubleValue()); return; } sendMessageToUI( "Starting To Plan: " + planId.getValue() + " sequence: " + sequenceId.getValue() + ", using type " + activePlannerEnum.getValue().toString() + " on stage " + stageId); if (debug) PrintTools.info("Stage " + stageId + " planning steps."); stepPlanResult = plan(); if (stepPlanResult.validForExecution()) stepPlan.set(getPlanner().getPlan()); for (PlannerCompletionCallback completionCallback : completionCallbackList) completionCallback.stepPlanningIsComplete(stepPlanResult, this); }