package com.easternedgerobotics.rov.io;

public final class TMP36 {
    /**
     * Linear + 10-mV/°C scale factor.
     */
    private static final float TEMPERATURE_CELSIUS_SCALAR = 100f;

    private static final float VOLTAGE_OFFSET = 0.5f;

    /**
     * The ADC this device uses.
     */
    private final ADC channel;

    /**
     * Constructs a new TMP36 sensor using the given ADC.
     * @param channel the ADC instance
     */
    public TMP36(final ADC channel) {
        this.channel = channel;
    }

    /**
     * Returns the temperature.
     * @return the temperature
     */
    public final float read() {
        return (channel.voltage() - VOLTAGE_OFFSET) * TEMPERATURE_CELSIUS_SCALAR;
    }
}

@@ -34,16 +34,39 @@
 ov.io;%0A%0A
+import rx.Observable;%0A%0A
 public f
@@ -257,24 +257,512 @@
 ET = 0.5f;%0A%0A
+    @SuppressWarnings(%22checkstyle:MagicNumber%22)%0A    public static final Observable.Transformer%3CDouble, Double%3E CALIBRATION = source -%3E source.map(%0A        x -%3E (%0A              -0.00000019445948205160 * Math.pow(x, 5)%0A            +  0.00002993174785553830 * Math.pow(x, 4)%0A            + -0.00157485910080997000 * Math.pow(x, 3)%0A            +  0.03450025313268360000 * Math.pow(x, 2)%0A            +  0.58578793256563300000 * Math.pow(x, 1)%0A            +  1.29831273496726000000%0A        ));%0A%0A
     /**%0A    

Add calibration transformer for TMP36