@Test void setSteerValue() { carControl.setSteerValue(STEER_VALUE + 1); assertEquals(carControl.getLastSteer(), STEER_VALUE + 1); }
@Override public synchronized void setSteerValue(int value) { if (value != currentSteerValue) { currentSteerValue = constrainInRange(value,MIN_STEER,MAX_STEER); } }
CarControlImpl implements CarControl { @Override public synchronized void setSteerValue(int value) { if (value != currentSteerValue) { currentSteerValue = constrainInRange(value,MIN_STEER,MAX_STEER); } } }
CarControlImpl implements CarControl { @Override public synchronized void setSteerValue(int value) { if (value != currentSteerValue) { currentSteerValue = constrainInRange(value,MIN_STEER,MAX_STEER); } } CarControlImpl(ArduinoCommunicator arduinoInstance); }
CarControlImpl implements CarControl { @Override public synchronized void setSteerValue(int value) { if (value != currentSteerValue) { currentSteerValue = constrainInRange(value,MIN_STEER,MAX_STEER); } } CarControlImpl(ArduinoCommunicator arduinoInstance); @Override int getLastThrottle(); @Override int getLastSteer(); @Override synchronized void setThrottle(int value); @Override synchronized void setSteerValue(int value); @Override synchronized void addThrottle(int value); @Override synchronized void addSteer(int value); }
CarControlImpl implements CarControl { @Override public synchronized void setSteerValue(int value) { if (value != currentSteerValue) { currentSteerValue = constrainInRange(value,MIN_STEER,MAX_STEER); } } CarControlImpl(ArduinoCommunicator arduinoInstance); @Override int getLastThrottle(); @Override int getLastSteer(); @Override synchronized void setThrottle(int value); @Override synchronized void setSteerValue(int value); @Override synchronized void addThrottle(int value); @Override synchronized void addSteer(int value);  }