node-red-node-pi-gpio 2.0.6 → 2.0.8

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.
package/36-rpi-gpio.html CHANGED
@@ -425,7 +425,7 @@
425
425
  '29':'5', '31':'6', '32':'12', '33':'13', '35':'19', '36':'16', '37':'26', '38':'20', '40':'21'
426
426
  }
427
427
  var pinsInUse = {};
428
- var validPinValues = Object.values(bcm2pin);
428
+ var validPinValues = Object.keys(bcm2pin);
429
429
  var isEnvVar = function (value) {
430
430
  var re = /^\${([0-9a-zA-Z_]+)}$/;
431
431
  var match = value.match(re);
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.8",
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 $@