From 15985a26caf053d72a2195e6975b1640c77103e7 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 30 May 2021 16:19:04 -0400 Subject: [PATCH] no Error 3 print --- python/voltcurrent.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/python/voltcurrent.py b/python/voltcurrent.py index 7a38f6b1..468b655e 100644 --- a/python/voltcurrent.py +++ b/python/voltcurrent.py @@ -75,7 +75,8 @@ if __name__ == "__main__": ina219_one.bus_voltage_range = BusVoltageRange.RANGE_16V one = 1 except: - print("Python Error 3", file=sys.stderr, flush=True) +# print("Python Error 3", file=sys.stderr, flush=True) + one = 0 try: ina219_two = INA219(i2c_one, addresses[1]) ina219_two.bus_adc_resolution = ADCResolution.ADCRES_12BIT_32S # 1S @@ -83,7 +84,9 @@ if __name__ == "__main__": ina219_two.bus_voltage_range = BusVoltageRange.RANGE_16V two = 1 except: - print("Python Error 3", file=sys.stderr, flush=True) +# print("Python Error 3", file=sys.stderr, flush=True) + two = 0 + try: ina219_three = INA219(i2c_one, addresses[2]) ina219_three.bus_adc_resolution = ADCResolution.ADCRES_12BIT_32S # 1S @@ -91,15 +94,18 @@ if __name__ == "__main__": ina219_three.bus_voltage_range = BusVoltageRange.RANGE_16V three = 1 except: - print("Python Error 3", file=sys.stderr, flush=True) - try: +# print("Python Error 3", file=sys.stderr, flush=True) + three = 0 + + try: ina219_four= INA219(i2c_one, addresses[3]) ina219_four.bus_adc_resolution = ADCResolution.ADCRES_12BIT_32S # 1S ina219_four.shunt_adc_resolution = ADCResolution.ADCRES_12BIT_32S # 1S ina219_four.bus_voltage_range = BusVoltageRange.RANGE_16V four = 1 except: - print("Python Error 3", file=sys.stderr, flush=True) + four = 0 +# print("Python Error 3", file=sys.stderr, flush=True) except: print("Python Error 5", file=sys.stderr, flush=True)