From e82f62133ae319d5bf3c3173cee85a080aadf76e Mon Sep 17 00:00:00 2001 From: Robert Wolterman Date: Sat, 31 Dec 2016 02:19:57 +0000 Subject: [PATCH] Closing out #17 and #18, version upped to 0.2.4 --- CHANGELOG.rst | 7 +++++++ setup.py | 2 +- source/c_pwm.c | 6 ++---- source/constants.c | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17e9c76..ca6b069 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,10 @@ +0.2.4 +---- +* HW PWM Fixed + - Start/Stop/Duty Cycle/Frequency settings work + - Polarity cannot be changed, so don't bother setting it to 1 in start() +* Added the unexport_all() function to Utilites + 0.2.3 ---- * LRADC Support diff --git a/setup.py b/setup.py index e626b6a..4154836 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.3', + version = '0.2.4', author = 'Robert Wolterman', author_email = 'robert.wolterman@gmail.com', description = 'A module to control CHIP IO channels', diff --git a/source/c_pwm.c b/source/c_pwm.c index 25730ae..88f8f9d 100644 --- a/source/c_pwm.c +++ b/source/c_pwm.c @@ -385,10 +385,8 @@ int pwm_start(const char *key, float duty, float freq, int polarity) //rtnval = pwm_set_polarity(key, polarity); //rtnval = 0; rtnval = pwm_set_duty_cycle(key, duty); - rtnval = 0; - // TODO: SET RETURN BASED UPON 4 FUNCTIONS ABOVE - return 1; + return rtnval; } int pwm_disable(const char *key) @@ -403,7 +401,7 @@ int pwm_disable(const char *key) // Disable the PWM pwm_set_frequency(key, 0); - pwm_set_polarity(key, 0); + //pwm_set_polarity(key, 0); pwm_set_duty_cycle(key, 0); pwm_set_enable(key, DISABLE); diff --git a/source/constants.c b/source/constants.c index 88d2745..7c7a0f8 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.3"); + version = Py_BuildValue("s", "0.2.4"); PyModule_AddObject(module, "VERSION", version); }