1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-19 20:33:21 +00:00

Fixing issue with the enable 1.8v pin code. Updating version to 0.2.7

This commit is contained in:
Robert Wolterman
2017-01-03 00:07:40 +00:00
parent 1d641ecdff
commit d0ed4665aa
4 changed files with 8 additions and 3 deletions

View File

@ -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)

View File

@ -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)]):

View File

@ -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',

View File

@ -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);
}