Skip to content

Commit 938995d

Browse files
committed
fixing pylint errors
1 parent c2e1e32 commit 938995d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

examples/ina219_simpletest.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
"""Sample code and test for adafruit_in219"""
2+
13
import time
24
import board
3-
from adafruit_ina219 import *
5+
from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219
6+
47

58
i2c_bus = board.I2C()
69

@@ -9,13 +12,13 @@
912
print("ina219 test")
1013

1114
# display some of the advanced field (just to test)
12-
print( "Config register:")
13-
print( " bus_voltage_range: 0x%1X" % ina219.bus_voltage_range )
14-
print( " gain: 0x%1X" % ina219.gain )
15-
print( " bus_adc_resolution: 0x%1X" % ina219.bus_adc_resolution )
16-
print( " shunt_adc_resolution: 0x%1X" % ina219.shunt_adc_resolution )
17-
print( " mode: 0x%1X" % ina219.mode )
18-
print ("")
15+
print("Config register:")
16+
print(" bus_voltage_range: 0x%1X" % ina219.bus_voltage_range)
17+
print(" gain: 0x%1X" % ina219.gain)
18+
print(" bus_adc_resolution: 0x%1X" % ina219.bus_adc_resolution)
19+
print(" shunt_adc_resolution: 0x%1X" % ina219.shunt_adc_resolution)
20+
print(" mode: 0x%1X" % ina219.mode)
21+
print("")
1922

2023
# optional : change configuration to use 32 samples averaging for both bus voltage and shunt voltage
2124
ina219.bus_adc_resolution = ADCResolution.ADCRES_12BIT_32S

0 commit comments

Comments
 (0)