package com.frc2013.rmr662.wrappers;

import edu.wpi.first.wpilibj.DigitalInput;

/**
 * @author Dan Mercer
 *
 */
public class RMRDigitalInput extends DigitalInput implements Invertable {
	public final boolean inverted;

	/**
	 * @param channel
	 * @param inverted
	 */
	public RMRDigitalInput(int channel, boolean inverted) {
		super(channel);
		this.inverted = true;
	}

	/**
	 * @param moduleNumber
	 * @param channel
	 * @param inverted
	 */
	public RMRDigitalInput(int moduleNumber, int channel, boolean inverted) {
		super(moduleNumber, channel);
		this.inverted = inverted;
	}

	public boolean get() {
		final boolean b = super.get();
		if (inverted) {
			return !b;
		} else {
			return b;
		}
	}

	public boolean isInverted() {
		return inverted;
	}
	
}

@@ -361,12 +361,16 @@
 d = 
-true
+inverted
 ;%0A%09%7D

Fix Inversions in DigitalInput