Skip to content

Commit

Permalink
added rising/falling edge and also fixed package bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Preston committed Sep 17, 2013
1 parent c58e3a0 commit 02967fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
Change Log
==========

v3.1.1
------
- Added IODIR_FALLING_EDGE and IODIR_RISING_EDGE to replace IODIR_ON and
IODIR_OFF respecitvley. IODIR_ON and IODIR_OFF can still be used in the same
way as before. Falling/Rising Edge are for physical level 1/0, On/Off are for
logical (programmer) level 1/0.

Physical Level (pifacecommon.read_bit):
IODIR_FALLING_EDGE: 1 -> 0
IODIR_RISING_EDGE: 0 -> 1
Logical Level (pifacedigitalio.PiFaceDigital().input_pins[0].value):
IODIR_ON: 0 -> 1
IODIR_OFF: 1 -> 0

Remember the difference:
# switch is unpressed
pifacecommon.read_bit(0, INPUT_PORT)
1 # physical
pifacedigitalio.PiFaceDigital().input_pins[0].value
0 # logical

- Fixed Debian package bug where setup script would not be executed.

v3.1.0
------
- Added debouncing with adjustable `settle time`.
Expand Down
4 changes: 2 additions & 2 deletions pifacecommon/interrupts.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@


# interrupts
IODIR_ON = 0
IODIR_OFF = 1
IODIR_FALLING_EDGE = IODIR_ON = 0
IODIR_RISING_EDGE = IODIR_OFF = 1
IODIR_BOTH = None
# IN_EVENT_DIR_OFF = INPUT_DIRECTION_OFF = 1
# IN_EVENT_DIR_BOTH = INPUT_DIRECTION_BOTH = None
Expand Down
2 changes: 1 addition & 1 deletion pifacecommon/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.1.0'
__version__ = '3.1.1'

0 comments on commit 02967fd

Please sign in to comment.