packed_converter.js: bugfix
This commit is contained in:
1 parent
fadbd2d38d
commit
a0a96b36dd
1 file changed
+5
-5
@@ -7,19 +7,19 @@ function Converter(decoded, port) {
|
|||||||
var pax = 0;
|
var pax = 0;
|
||||||
|
|
||||||
if (port === 1) {
|
if (port === 1) {
|
||||||
|
if('wifi' in converted){
|
||||||
for (var x in converted) {
|
pax += converted.wifi
|
||||||
pax += converted[x];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if('ble' in converted){
|
||||||
|
pax += converted.ble
|
||||||
|
}
|
||||||
converted.pax = pax;
|
converted.pax = pax;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (port === 2) {
|
if (port === 2) {
|
||||||
converted.voltage /= 1000;
|
converted.voltage /= 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return converted;
|
return converted;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user