package com.easternedgerobotics.rov.io;

import com.easternedgerobotics.rov.io.pololu.PololuMaestroInputChannel;

public class MPX4250AP {
    /**
     * Scalar value for calculating pressure from voltage.
     */
    private static final float PRESSURE_SCALAR = 0.264909785f;

    /**
     * Offset value for calculating pressure from voltage.
     */
    private static final float PRESSURE_OFFSET = 54.20054200f;

    /**
     * The Pololu Maestro channel this device uses.
     */
    private final PololuMaestroInputChannel channel;

    /**
     * Constructs a new MPX4250AP sensor on the given channel.
     * @param channel the channel this device uses
     */
    public MPX4250AP(final PololuMaestroInputChannel channel) {
        this.channel = channel;
    }

    /**
     * Returns the pressure.
     * @return the pressure
     */
    public final float read() {
        return channel.voltage() * PRESSURE_OFFSET - PRESSURE_SCALAR;
    }
}

@@ -107,16 +107,128 @@
 annel;%0A%0A
+/**%0A * A MPX4250 is an absolute pressure (AP) sensor. See also: %3Ca href=%22http://goo.gl/n7c8tY%22%3EMPX4250%3C/a%3E.%0A */%0A
 public c

Add link to MPX4250 spec sheet