packed_converter.js: bugfix

This commit is contained in:
Klaus K Wilting 2019-01-01 13:48:32 +01:00
parent fadbd2d38d
commit a0a96b36dd

View File

@ -7,19 +7,19 @@ function Converter(decoded, port) {
var pax = 0;
if (port === 1) {
for (var x in converted) {
pax += converted[x];
if('wifi' in converted){
pax += converted.wifi
}
if('ble' in converted){
pax += converted.ble
}
converted.pax = pax;
}
if (port === 2) {
converted.voltage /= 1000;
}
return converted;
}