Skip to content

Commit d2f6e7f

Browse files
committed
Update version to 1.2.2
1 parent 8c2846e commit d2f6e7f

9 files changed

+16
-17
lines changed

Diff for: ADS1x15/ADS1x15.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from smbus2 import SMBus
22
import time
33

4-
# Library version
5-
LIB_VERSION = "1.2.1"
6-
74
# ADS1x15 default i2c address
85
I2C_address = 0x48
96

@@ -309,7 +306,7 @@ class ADS1013(ADS1x15) :
309306
"ADS1013 class derifed from general ADS1x15 class"
310307

311308
def __init__(self, busId: int, address: int = I2C_address) :
312-
"Constructor with SMBus ID and I2C address input and configuration for ADS1013"
309+
"Initialize ADS1013 with SMBus ID and I2C address configuration"
313310
self.i2c = SMBus(busId)
314311
self._address = address
315312
self._conversionDelay = 2
@@ -322,7 +319,7 @@ class ADS1014(ADS1x15) :
322319
"ADS1014 class derifed from general ADS1x15 class"
323320

324321
def __init__(self, busId: int, address: int = I2C_address) :
325-
"Constructor with SMBus ID and I2C address input and configuration for ADS1014"
322+
"Initialize ADS1014 with SMBus ID and I2C address configuration"
326323
self.i2c = SMBus(busId)
327324
self._address = address
328325
self._conversionDelay = 2
@@ -335,7 +332,7 @@ class ADS1015(ADS1x15) :
335332
"ADS1015 class derifed from general ADS1x15 class"
336333

337334
def __init__(self, busId: int, address: int = I2C_address) :
338-
"Constructor with SMBus ID and I2C address input and configuration for ADS1015"
335+
"Initialize ADS1015 with SMBus ID and I2C address configuration"
339336
self.i2c = SMBus(busId)
340337
self._address = address
341338
self._conversionDelay = 2
@@ -375,7 +372,7 @@ class ADS1113(ADS1x15) :
375372
"ADS1113 class derifed from general ADS1x15 class"
376373

377374
def __init__(self, busId: int, address: int = I2C_address) :
378-
"Constructor with SMBus ID and I2C address input and configuration for ADS1113"
375+
"Initialize ADS1113 with SMBus ID and I2C address configuration"
379376
self.i2c = SMBus(busId)
380377
self._address = address
381378
self._conversionDelay = 8
@@ -388,7 +385,7 @@ class ADS1114(ADS1x15) :
388385
"ADS1114 class derifed from general ADS1x15 class"
389386

390387
def __init__(self, busId: int, address: int = I2C_address) :
391-
"Constructor with SMBus ID and I2C address input and configuration for ADS1114"
388+
"Initialize ADS1114 with SMBus ID and I2C address configuration"
392389
self.i2c = SMBus(busId)
393390
self._address = address
394391
self._conversionDelay = 8
@@ -401,7 +398,7 @@ class ADS1115(ADS1x15) :
401398
"ADS1115 class derifed from general ADS1x15 class"
402399

403400
def __init__(self, busId: int, address: int = I2C_address) :
404-
"Constructor with SMBus ID and I2C address input and configuration for ADS1115"
401+
"Initialize ADS1115 with SMBus ID and I2C address configuration"
405402
self.i2c = SMBus(busId)
406403
self._address = address
407404
self._conversionDelay = 8

Diff for: ADS1x15/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# __init__.py
2-
from .ADS1x15 import LIB_VERSION
2+
3+
__version__ = "1.2.2"
4+
35
from .ADS1x15 import ADS1x15
46
from .ADS1x15 import ADS1013
57
from .ADS1x15 import ADS1014

Diff for: examples/ADS_comparator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ADS = ADS1x15.ADS1115(1, 0x48)
2626

2727
print(os.path.basename(__file__))
28-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
28+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
2929

3030
# set gain to 4.096V max
3131
ADS.setGain(ADS.PGA_4_096V)

Diff for: examples/ADS_continuous.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ADS = ADS1x15.ADS1115(1, 0x48)
2828

2929
print(os.path.basename(__file__))
30-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
30+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
3131

3232
ADS.setGain(ADS.PGA_4_096V)
3333
ADS.setDataRate(ADS.DR_ADS111X_128)

Diff for: examples/ADS_differential.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
ADS = ADS1x15.ADS1115(1, 0x48)
3434

3535
print(os.path.basename(__file__))
36-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
36+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
3737

3838
# set gain to 4.096V max
3939
ADS.setGain(ADS.PGA_4_096V)

Diff for: examples/ADS_minimum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ADS = ADS1x15.ADS1115(1, 0x48)
2828

2929
print(os.path.basename(__file__))
30-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
30+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
3131

3232
# set gain to 4.096V max
3333
ADS.setGain(ADS.PGA_4_096V)

Diff for: examples/ADS_read.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ADS = ADS1x15.ADS1115(1, 0x48)
2828

2929
print(os.path.basename(__file__))
30-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
30+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
3131

3232
# set gain to 4.096V max
3333
ADS.setGain(ADS.PGA_4_096V)

Diff for: examples/ADS_read_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ADS = ADS1x15.ADS1115(1, 0x48)
2828

2929
print(os.path.basename(__file__))
30-
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION))
30+
print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__))
3131

3232
# set gain to 4.096V max
3333
ADS.setGain(ADS.PGA_4_096V)

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = ADS1x15-ADC
3-
version = 1.2.1
3+
version = 1.2.2
44
author = Chandra Wijaya Sentosa
55
author_email = [email protected]
66
description = Python library used for ADS1x15 analog to digital converter (ADC)

0 commit comments

Comments
 (0)