// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java
// public interface MutableDouble {
// 	double getValue();
// 	void setValue(double v);
// 	
// 	/**
// 	 * Returns a proxy MutableDouble that is a two-way calibrated representation of this value.
// 	 */
// 	default MutableDouble calibrated(DoubleConverter calibration) {
// 		return new CalibratedMutableDouble(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/impl/CalibratedAnalogIO.java
// public class CalibratedAnalogIO extends Delegator<AnalogIO> implements AnalogIO {
// 	
// 	private final AnalogIOCalibration calibration;
// 	
// 	public CalibratedAnalogIO(AnalogIO target, AnalogIOCalibration calibration) {
// 		super(target);
// 		this.calibration = calibration;
// 	}
// 	
// 	@Override
// 	public MutableDouble value() {
// 		return delegate().value().calibrated(calibration().value());
// 	}
// 
// 	protected AnalogIOCalibration calibration() {
// 		return calibration;
// 	}
// }
// 
// Path: public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/Servo.java
// public interface Servo extends AnalogIO, ServoFeatures<MutableDouble> {
// 
// 	/**
// 	 * Returns a proxy {@link Servo} that is two-way calibrated representation of this instance.
// 	 */
// 	default Servo calibrated(ServoCalibration calibration) {
// 		return new CalibratedServo(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/ServoCalibration.java
// public interface ServoCalibration extends AnalogIOCalibration, ServoFeatures<DoubleConverter> {
// 	static ServoCalibration IDENTITY = new ImmutableServoCalibration(DoubleConverter.IDENTITY);
// }


import com.iamcontent.core.math.MutableDouble;
import com.iamcontent.device.io.analog.impl.CalibratedAnalogIO;
import com.iamcontent.device.servo.Servo;
import com.iamcontent.device.servo.ServoCalibration;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU General Public License as published by the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.device.servo.impl;


/**
 * A MutableDouble that is a calibrated proxy for another (target) MutableDouble.
 * @author Greg Elderfield
 */
public class CalibratedServo extends CalibratedAnalogIO implements Servo {
	
	public CalibratedServo(Servo target, ServoCalibration calibration) {
		super(target, calibration);
	}
	
	@Override

// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java
// public interface MutableDouble {
// 	double getValue();
// 	void setValue(double v);
// 	
// 	/**
// 	 * Returns a proxy MutableDouble that is a two-way calibrated representation of this value.
// 	 */
// 	default MutableDouble calibrated(DoubleConverter calibration) {
// 		return new CalibratedMutableDouble(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/impl/CalibratedAnalogIO.java
// public class CalibratedAnalogIO extends Delegator<AnalogIO> implements AnalogIO {
// 	
// 	private final AnalogIOCalibration calibration;
// 	
// 	public CalibratedAnalogIO(AnalogIO target, AnalogIOCalibration calibration) {
// 		super(target);
// 		this.calibration = calibration;
// 	}
// 	
// 	@Override
// 	public MutableDouble value() {
// 		return delegate().value().calibrated(calibration().value());
// 	}
// 
// 	protected AnalogIOCalibration calibration() {
// 		return calibration;
// 	}
// }
// 
// Path: public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/Servo.java
// public interface Servo extends AnalogIO, ServoFeatures<MutableDouble> {
// 
// 	/**
// 	 * Returns a proxy {@link Servo} that is two-way calibrated representation of this instance.
// 	 */
// 	default Servo calibrated(ServoCalibration calibration) {
// 		return new CalibratedServo(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/ServoCalibration.java
// public interface ServoCalibration extends AnalogIOCalibration, ServoFeatures<DoubleConverter> {
// 	static ServoCalibration IDENTITY = new ImmutableServoCalibration(DoubleConverter.IDENTITY);
// }


// Path: public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/impl/CalibratedServo.java
import com.iamcontent.core.math.MutableDouble;
import com.iamcontent.device.io.analog.impl.CalibratedAnalogIO;
import com.iamcontent.device.servo.Servo;
import com.iamcontent.device.servo.ServoCalibration;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU General Public License as published by the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.device.servo.impl;


/**
 * A MutableDouble that is a calibrated proxy for another (target) MutableDouble.
 * @author Greg Elderfield
 */
public class CalibratedServo extends CalibratedAnalogIO implements Servo {
	
	public CalibratedServo(Servo target, ServoCalibration calibration) {
		super(target, calibration);
	}
	
	@Override

	public MutableDouble value() {
