node-red-node-pi-gpio 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/nrgpio +6 -0
  2. package/package.json +2 -2
  3. package/testgpio +8 -2
package/nrgpio CHANGED
@@ -1,6 +1,12 @@
1
1
  #!/bin/bash
2
2
 
3
3
  python_cmd='python3'
4
+
5
+ revision=$(awk -F': ' '/^Revision/ {print $2; exit}' /proc/cpuinfo)
6
+ if [[ -n "$revision" && ${#revision} -eq 4 ]]; then
7
+ export RPI_LGPIO_REVISION="800012"
8
+ fi
9
+
4
10
  # Fallback to Python 2, if Python 3 is not available
5
11
  command -v python3 > /dev/null || python_cmd='python'
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-node-pi-gpio",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "The basic Node-RED node for Pi GPIO",
5
5
  "dependencies" : {
6
6
  },
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "author": {
19
19
  "name": "Dave Conway-Jones",
20
- "email": "ceejay@vnet.ibm.com",
20
+ "email": "dceejay@gmail.com",
21
21
  "url": "http://nodered.org"
22
22
  },
23
23
  "license": "Apache-2.0",
package/testgpio CHANGED
@@ -1,8 +1,14 @@
1
1
  #!/bin/bash
2
2
 
3
- python_cmd='python3'
3
+ python_cmd=python3
4
+
5
+ revision=$(awk -F': ' '/^Revision/ {print $2; exit}' /proc/cpuinfo)
6
+ if [[ -n "$revision" && ${#revision} -eq 4 ]]; then
7
+ export RPI_LGPIO_REVISION="800012"
8
+ fi
9
+
4
10
  # Fallback to Python 2, if Python 3 is not available
5
- command -v python3 > /dev/null || python_cmd='python'
11
+ command -v python3 > /dev/null || python_cmd=python
6
12
 
7
13
  BASEDIR=$(dirname $0)
8
14
  $python_cmd -u $BASEDIR/testgpio.py $@