Skip to content

Commit

Permalink
Removed try/except and reverted clear on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Sep 6, 2016
1 parent f5191d8 commit 657c24a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
6 changes: 6 additions & 0 deletions library/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.1.0
-----

* Removed try/except from RPi.GPIO import, output was misleading at best
* Reverted default behaviour of clear on exit

0.0.9
-----

Expand Down
15 changes: 5 additions & 10 deletions library/blinkt.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import atexit

try:
import RPi.GPIO as GPIO
except ImportError as e:
print("\n\nThis library requires the RPi.GPIO module\nInstall with: sudo pip install RPi.GPIO\n\n")
raise ImportError(e)
import RPi.GPIO as GPIO


DAT = 23
Expand Down Expand Up @@ -112,16 +107,16 @@ def set_pixel(x, r, g, b, brightness=None):
def set_clear_on_exit(value=True):
"""Set whether Blinkt! should be cleared upon exit
By default Blinkt! will not turn off the pixels on exit, but calling::
By default Blinkt! will turn off the pixels on exit, but calling::
blinkt.set_clear_on_exit()
blinkt.set_clear_on_exit(False)
Will ensure that it does.
Will ensure that it does not.
:param value: True or False (default True)
"""
global _clear_on_exit
_clear_on_exit = value

atexit.register(_exit)
atexit.register(_exit)

2 changes: 1 addition & 1 deletion library/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

setup(
name = 'blinkt',
version = '0.0.9',
version = '0.1.0',
author = 'Philip Howard',
author_email = '[email protected]',
description = """Python library for driving Pimoroni Blinkt!""",
Expand Down
7 changes: 7 additions & 0 deletions packaging/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
blinkt (0.1.0) UNRELEASED; urgency=low

* Removed try/except from RPi.GPIO import, output was misleading at best
* Reverted default behaviour of clear on exit

-- Phil Howard <[email protected]> Wed, 06 Sep 2016 00:00:00 +0000

blinkt (0.0.9) UNRELEASED; urgency=low

* Added set_all method to set all pixels
Expand Down
7 changes: 7 additions & 0 deletions packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
blinkt (0.1.0) UNRELEASED; urgency=low

* Removed try/except from RPi.GPIO import, output was misleading at best
* Reverted default behaviour of clear on exit

-- Phil Howard <[email protected]> Wed, 06 Sep 2016 00:00:00 +0000

blinkt (0.0.9) UNRELEASED; urgency=low

* Added set_all method to set all pixels
Expand Down

0 comments on commit 657c24a

Please sign in to comment.