mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
let Hypriot on Pi detect gpio correctly
clean up duplicate labels
This commit is contained in:
parent
7029541b4f
commit
1d15ee7034
@ -218,7 +218,6 @@
|
|||||||
var pinsInUse = {};
|
var pinsInUse = {};
|
||||||
RED.nodes.registerType('rpi-gpio out',{
|
RED.nodes.registerType('rpi-gpio out',{
|
||||||
category: 'Raspberry Pi',
|
category: 'Raspberry Pi',
|
||||||
label: 'Raspberry Pi',
|
|
||||||
color:"#c6dbef",
|
color:"#c6dbef",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value:"" },
|
name: { value:"" },
|
||||||
@ -351,7 +350,6 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('rpi-mouse',{
|
RED.nodes.registerType('rpi-mouse',{
|
||||||
category: 'Raspberry Pi',
|
category: 'Raspberry Pi',
|
||||||
label: 'Raspberry Pi',
|
|
||||||
color:"#c6dbef",
|
color:"#c6dbef",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value:"" },
|
name: { value:"" },
|
||||||
@ -390,7 +388,6 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('rpi-keyboard',{
|
RED.nodes.registerType('rpi-keyboard',{
|
||||||
category: 'Raspberry Pi',
|
category: 'Raspberry Pi',
|
||||||
label: 'Raspberry Pi',
|
|
||||||
color:"#c6dbef",
|
color:"#c6dbef",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value:"" }
|
name: { value:"" }
|
||||||
|
@ -37,8 +37,13 @@ module.exports = function(RED) {
|
|||||||
fs.statSync("/usr/lib/python2.7/site-packages/RPi/GPIO"); // test on Arch
|
fs.statSync("/usr/lib/python2.7/site-packages/RPi/GPIO"); // test on Arch
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
RED.log.warn(RED._("rpi-gpio.errors.libnotfound"));
|
try {
|
||||||
throw "Warning : "+RED._("rpi-gpio.errors.libnotfound");
|
fs.statSync("/usr/lib/python2.7/dist-packages/RPi/GPIO"); // test on Hypriot
|
||||||
|
}
|
||||||
|
catch(err) {
|
||||||
|
RED.log.warn(RED._("rpi-gpio.errors.libnotfound"));
|
||||||
|
throw "Warning : "+RED._("rpi-gpio.errors.libnotfound");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user