Skip to content

Commit 02967fd

Browse files
author
Thomas Preston
committed
added rising/falling edge and also fixed package bug
1 parent c58e3a0 commit 02967fd

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

CHANGELOG

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
Change Log
22
==========
33

4+
v3.1.1
5+
------
6+
- Added IODIR_FALLING_EDGE and IODIR_RISING_EDGE to replace IODIR_ON and
7+
IODIR_OFF respecitvley. IODIR_ON and IODIR_OFF can still be used in the same
8+
way as before. Falling/Rising Edge are for physical level 1/0, On/Off are for
9+
logical (programmer) level 1/0.
10+
11+
Physical Level (pifacecommon.read_bit):
12+
IODIR_FALLING_EDGE: 1 -> 0
13+
IODIR_RISING_EDGE: 0 -> 1
14+
Logical Level (pifacedigitalio.PiFaceDigital().input_pins[0].value):
15+
IODIR_ON: 0 -> 1
16+
IODIR_OFF: 1 -> 0
17+
18+
Remember the difference:
19+
# switch is unpressed
20+
pifacecommon.read_bit(0, INPUT_PORT)
21+
1 # physical
22+
pifacedigitalio.PiFaceDigital().input_pins[0].value
23+
0 # logical
24+
25+
- Fixed Debian package bug where setup script would not be executed.
26+
427
v3.1.0
528
------
629
- Added debouncing with adjustable `settle time`.

pifacecommon/interrupts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020

2121
# interrupts
22-
IODIR_ON = 0
23-
IODIR_OFF = 1
22+
IODIR_FALLING_EDGE = IODIR_ON = 0
23+
IODIR_RISING_EDGE = IODIR_OFF = 1
2424
IODIR_BOTH = None
2525
# IN_EVENT_DIR_OFF = INPUT_DIRECTION_OFF = 1
2626
# IN_EVENT_DIR_BOTH = INPUT_DIRECTION_BOTH = None

pifacecommon/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.1.0'
1+
__version__ = '3.1.1'

0 commit comments

Comments
 (0)