1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

and finally fix the gpio labels

This commit is contained in:
Dave Conway-Jones 2017-07-02 10:04:43 +01:00
parent 63657c18e2
commit 87ac0507d9
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D

View File

@ -207,7 +207,7 @@
var suf = ""; var suf = "";
if (this.intype === "up") { suf = "↑ "} if (this.intype === "up") { suf = "↑ "}
if (this.intype === "down") { suf = "↓ "} if (this.intype === "down") { suf = "↓ "}
return this.name || "PIN: "+suf+bcm2pin[this.pin] ; return this.name || "PIN: "+suf+this.pin ;
}, },
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
@ -469,12 +469,12 @@
}, },
align: "right", align: "right",
label: function() { label: function() {
if (this.out === "pwm") { return this.name || "PWM: "+bcm2pin[this.pin]; } if (this.out === "pwm") { return this.name || "PWM: "+this.pin; }
else if (this.out === "ser") { return this.name || "Servo: "+bcm2pin[this.pin]; } else if (this.out === "ser") { return this.name || "Servo: "+this.pin; }
else { else {
var suf = ""; var suf = "";
if (this.set == true) { suf = (this.level === "1") ? " ¹" : " ₀"; } if (this.set == true) { suf = (this.level === "1") ? " ¹" : " ₀"; }
return this.name||"PIN: "+ bcm2pin[this.pin] + suf ; return this.name||"PIN: "+ this.pin + suf ;
} }
}, },
labelStyle: function() { labelStyle: function() {