+ /* early prototypes had a 3.0V regulator */
+ if (serial < 1000)
+ supply = 3.0;
+
+ /* Purple v1.0 boards had the sensor after the
+ * blocking diode, which drops about 150mV
+ */
+ if (serial < 1665)
+ diode_offset = 0.150;
+
+ return sensor / 32767.0 * supply * 127/27 + diode_offset;