Expand test coverage, bugfix
[EVA-2020-02-2.git] / library / enviroplus / gas.py
index aa6ac55c62d91999134d362bdb9e0d9d206374e6..584317b6af2dd0ab5d9f2380d69cb3ce37f62bff 100644 (file)
@@ -6,7 +6,7 @@ import ads1015
 import RPi.GPIO as GPIO
 
 MICS6814_HEATER_PIN = 24
-MICS6814_GAIN = 6.148
+MICS6814_GAIN = 6.144
 
 ads1015.I2C_ADDRESS_DEFAULT = ads1015.I2C_ADDRESS_ALTERNATE
 _is_setup = False
@@ -132,3 +132,9 @@ def read_nh3():
     """Return gas resistance for nh3/ammonia"""
     setup()
     return read_all().nh3
+
+
+def read_adc():
+    """Return spare ADC channel value"""
+    setup()
+    return read_all().adc