diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 63e3801..411c65b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,8 @@ +0.2.7 +---- +* Fix to the Enable 1.8V Pin code as it wasn't working due to bit shifting isn't allowed on a float. +* Updated README to denote the PocketCHIP Pin names better + 0.2.6 ---- * Fix to keep the GPIO value file open until the pin is unexported (issue #34) diff --git a/CHIP_IO/Utilities.py b/CHIP_IO/Utilities.py index e276ccf..4f6516e 100644 --- a/CHIP_IO/Utilities.py +++ b/CHIP_IO/Utilities.py @@ -35,7 +35,7 @@ def set_1v8_pin_voltage(voltage): return False if voltage < 1.8 or voltage > 3.3: return False - voltage=round((voltage - 1.8) / 0.1) << 4 + voltage=int(round((voltage - 1.8) / 0.1)) << 4 if subprocess.call(["/usr/sbin/i2cset", "-f", "-y" ,"0", "0x34", "0x90", "0x03"]): return False if subprocess.call(["/usr/sbin/i2cset", "-f", "-y", "0", "0x34", "0x91", str(voltage)]): diff --git a/setup.py b/setup.py index 7fd87d2..bdc68bd 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ classifiers = ['Development Status :: 3 - Alpha', 'Topic :: System :: Hardware'] setup(name = 'CHIP_IO', - version = '0.2.6', + version = '0.2.7', author = 'Robert Wolterman', author_email = 'robert.wolterman@gmail.com', description = 'A module to control CHIP IO channels', diff --git a/source/constants.c b/source/constants.c index 4a29b0e..f09122d 100644 --- a/source/constants.c +++ b/source/constants.c @@ -76,6 +76,6 @@ void define_constants(PyObject *module) both_edge = Py_BuildValue("i", BOTH_EDGE); PyModule_AddObject(module, "BOTH", both_edge); - version = Py_BuildValue("s", "0.2.6"); + version = Py_BuildValue("s", "0.2.7"); PyModule_AddObject(module, "VERSION", version); }