@ncd-io/node-red-enterprise-sensors 1.0.6 → 1.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/lib/WirelessGateway.js +179 -37
- package/package.json +1 -1
- package/wireless.html +610 -62
- package/wireless.js +152 -46
package/lib/WirelessGateway.js
CHANGED
|
@@ -142,13 +142,13 @@ module.exports = class WirelessSensor{
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
// #OTF
|
|
145
|
-
var otf_devices = [23,26,39,45,48,52,58,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
145
|
+
var otf_devices = [23,26,32,33,39,44,45,48,52,53,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,202,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
146
146
|
var device_type = msbLsb(frame.data[6], frame.data[7]);
|
|
147
147
|
// var device_type = frame.data[7];
|
|
148
148
|
|
|
149
149
|
if(mode == "RUN"){
|
|
150
150
|
if(frame.data[9] == 70 && frame.data[10] == 76 && frame.data[11] == 89) {
|
|
151
|
-
var broadcast_otf_devices = [101,102];
|
|
151
|
+
var broadcast_otf_devices = [101,102,202];
|
|
152
152
|
mode = "FLY";
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -294,7 +294,7 @@ module.exports = class WirelessSensor{
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// #OTF
|
|
297
|
-
var otf_devices = [23,26,39,45,48,52,58,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
297
|
+
var otf_devices = [23,26,32,33,39,44,45,48,52,53,58,74,76,78,79,80,81,82,84,88,89,90,91,101,102,105,106,107,108,110,111,112,114,180,181,202,519,520,521,531,535,537,538,539,540,1010,1011];
|
|
298
298
|
if(otf_devices.includes(parsed.sensor_type)){
|
|
299
299
|
// If the message says FLY and there is not FLY timer in progress.
|
|
300
300
|
if(payload[8] == 70 && payload[9] == 76 && payload[10] == 89) {
|
|
@@ -712,7 +712,7 @@ module.exports = class WirelessSensor{
|
|
|
712
712
|
data: payload.slice(8)
|
|
713
713
|
};
|
|
714
714
|
// #OTF
|
|
715
|
-
}else if(parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 180 || parsed.sensor_type == 181 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 531 || parsed.sensor_type == 537 || parsed.sensor_type == 538){
|
|
715
|
+
}else if(parsed.sensor_type == 33 || parsed.sensor_type == 80 || parsed.sensor_type == 81 || parsed.sensor_type == 82 || parsed.sensor_type == 84 || parsed.sensor_type == 110 || parsed.sensor_type == 111 || parsed.sensor_type == 112 || parsed.sensor_type == 114 || parsed.sensor_type == 180 || parsed.sensor_type == 181 || parsed.sensor_type == 515 || parsed.sensor_type == 519 || parsed.sensor_type == 531 || parsed.sensor_type == 537 || parsed.sensor_type == 538){
|
|
716
716
|
parsed.sensor_data = this.sensor_types[parsed.sensor_type].parse(payload, parsed, frame.mac);
|
|
717
717
|
if(!parsed.sensor_data){
|
|
718
718
|
return;
|
|
@@ -795,11 +795,26 @@ module.exports = class WirelessSensor{
|
|
|
795
795
|
return this.config_send(sensor_mac, packet);
|
|
796
796
|
}
|
|
797
797
|
config_set_change_detection(sensor_mac, enabled, perc, interval){
|
|
798
|
+
console.log('config_set_change_detection_ch1');
|
|
798
799
|
if(!perc) perc = 0;
|
|
799
800
|
if(!interval) interval = 0;
|
|
800
801
|
var packet = [247, 7, 0, 0, 0, enabled, perc, interval >> 16, (interval >> 8) & 255, interval & 255];
|
|
801
802
|
return this.config_send(sensor_mac, packet);
|
|
802
803
|
}
|
|
804
|
+
config_set_change_detection_ch2(sensor_mac, enabled, perc, interval){
|
|
805
|
+
console.log('config_set_change_detection_ch2');
|
|
806
|
+
if(!perc) perc = 0;
|
|
807
|
+
if(!interval) interval = 0;
|
|
808
|
+
var packet = [247, 8, 0, 0, 0, enabled, perc, interval >> 16, (interval >> 8) & 255, interval & 255];
|
|
809
|
+
return this.config_send(sensor_mac, packet);
|
|
810
|
+
}
|
|
811
|
+
config_set_change_detection_ch3(sensor_mac, enabled, perc, interval){
|
|
812
|
+
console.log('config_set_change_detection_ch3');
|
|
813
|
+
if(!perc) perc = 0;
|
|
814
|
+
if(!interval) interval = 0;
|
|
815
|
+
var packet = [247, 9, 0, 0, 0, enabled, perc, interval >> 16, (interval >> 8) & 255, interval & 255];
|
|
816
|
+
return this.config_send(sensor_mac, packet);
|
|
817
|
+
}
|
|
803
818
|
config_set_bp_altitude(sensor_mac, alt){
|
|
804
819
|
var packet = [244, 1, 0, 0, 0, alt >> 8, alt & 255];
|
|
805
820
|
return this.config_send(sensor_mac, packet);
|
|
@@ -1016,6 +1031,12 @@ module.exports = class WirelessSensor{
|
|
|
1016
1031
|
console.log(packet);
|
|
1017
1032
|
return this.config_send(sensor_mac, packet);
|
|
1018
1033
|
}
|
|
1034
|
+
config_set_sampling_interval_202(sensor_mac, sampling_interval){
|
|
1035
|
+
console.log('config_set_sampling_interval_202');
|
|
1036
|
+
var packet = [244, 0, 0, 0, 0, sampling_interval];
|
|
1037
|
+
console.log(packet);
|
|
1038
|
+
return this.config_send(sensor_mac, packet);
|
|
1039
|
+
}
|
|
1019
1040
|
config_get_sampling_interval_101(sensor_mac, sampling_interval){
|
|
1020
1041
|
console.log('config_get_sampling_interval_101');
|
|
1021
1042
|
var packet = [244, 79, 0, 0, 101, 7];
|
|
@@ -1157,6 +1178,15 @@ module.exports = class WirelessSensor{
|
|
|
1157
1178
|
delete this.fly_101_in_progress;
|
|
1158
1179
|
return this.config_send(sensor_mac, packet);
|
|
1159
1180
|
}
|
|
1181
|
+
config_set_rtc_202(sensor_mac){
|
|
1182
|
+
console.log('config_set_rtc_202');
|
|
1183
|
+
console.log(sensor_mac);
|
|
1184
|
+
var date = new Date();
|
|
1185
|
+
var packet = [244, 8, 0, 0, 0, date.getHours(), date.getMinutes(), date.getSeconds()];
|
|
1186
|
+
console.log(packet);
|
|
1187
|
+
delete this.fly_101_in_progress;
|
|
1188
|
+
return this.config_send(sensor_mac, packet);
|
|
1189
|
+
}
|
|
1160
1190
|
config_set_roll_threshold_47(sensor_mac, threshold){
|
|
1161
1191
|
console.log('config_set_roll_threshold_47');
|
|
1162
1192
|
var packet = [244, 1, 0, 0, 47, 0, threshold];
|
|
@@ -1219,6 +1249,12 @@ module.exports = class WirelessSensor{
|
|
|
1219
1249
|
console.log(packet);
|
|
1220
1250
|
return this.config_send(sensor_mac, packet);
|
|
1221
1251
|
}
|
|
1252
|
+
config_set_push_notification_108(sensor_mac, value){
|
|
1253
|
+
console.log('config_set_push_notification_108');
|
|
1254
|
+
var packet = [244, 45, 0, 0, 0, value];
|
|
1255
|
+
console.log(packet);
|
|
1256
|
+
return this.config_send(sensor_mac, packet);
|
|
1257
|
+
}
|
|
1222
1258
|
config_set_sensor_boot_time_420ma(sensor_mac, value){
|
|
1223
1259
|
console.log('sensor_boot_time_420ma');
|
|
1224
1260
|
var packet = [244, 68, 0, 0, 45, value];
|
|
@@ -1419,7 +1455,6 @@ module.exports = class WirelessSensor{
|
|
|
1419
1455
|
}
|
|
1420
1456
|
config_set_current_calibration_13(sensor_mac, calib){
|
|
1421
1457
|
console.log('config_set_current_calibration_13');
|
|
1422
|
-
calib = calib * 100;
|
|
1423
1458
|
var packet = [244, 1, 0, 0, 0];
|
|
1424
1459
|
var cal_val = int2Bytes(calib, 4);
|
|
1425
1460
|
packet.push(...cal_val);
|
|
@@ -1428,7 +1463,6 @@ module.exports = class WirelessSensor{
|
|
|
1428
1463
|
}
|
|
1429
1464
|
config_set_current_calibration_ch2_19(sensor_mac, calib){
|
|
1430
1465
|
console.log('config_set_current_calibration_ch2_19');
|
|
1431
|
-
calib = calib * 100;
|
|
1432
1466
|
var packet = [244, 3, 0, 0, 0];
|
|
1433
1467
|
var cal_val = int2Bytes(calib, 4);
|
|
1434
1468
|
packet.push(...cal_val);
|
|
@@ -1437,13 +1471,36 @@ module.exports = class WirelessSensor{
|
|
|
1437
1471
|
}
|
|
1438
1472
|
config_set_current_calibration_ch3_28(sensor_mac, calib){
|
|
1439
1473
|
console.log('cconfig_set_current_calibration_ch3_28');
|
|
1440
|
-
calib = calib * 100;
|
|
1441
1474
|
var packet = [244, 5, 0, 0, 0];
|
|
1442
1475
|
var cal_val = int2Bytes(calib, 4);
|
|
1443
1476
|
packet.push(...cal_val);
|
|
1444
1477
|
console.log(packet);
|
|
1445
1478
|
return this.config_send(sensor_mac, packet);
|
|
1446
1479
|
}
|
|
1480
|
+
config_set_current_calibration_13_dep(sensor_mac, calib){
|
|
1481
|
+
console.log('config_set_current_calibration_13_dep');
|
|
1482
|
+
var packet = [244, 1, 0, 0, 0];
|
|
1483
|
+
var cal_val = int2Bytes(calib, 2);
|
|
1484
|
+
packet.push(...cal_val);
|
|
1485
|
+
console.log(packet);
|
|
1486
|
+
return this.config_send(sensor_mac, packet);
|
|
1487
|
+
}
|
|
1488
|
+
config_set_current_calibration_ch2_19_dep(sensor_mac, calib){
|
|
1489
|
+
console.log('config_set_current_calibration_ch2_19_dep');
|
|
1490
|
+
var packet = [244, 3, 0, 0, 0];
|
|
1491
|
+
var cal_val = int2Bytes(calib, 2);
|
|
1492
|
+
packet.push(...cal_val);
|
|
1493
|
+
console.log(packet);
|
|
1494
|
+
return this.config_send(sensor_mac, packet);
|
|
1495
|
+
}
|
|
1496
|
+
config_set_current_calibration_ch3_28_dep(sensor_mac, calib){
|
|
1497
|
+
console.log('cconfig_set_current_calibration_ch3_28_dep');
|
|
1498
|
+
var packet = [244, 5, 0, 0, 0];
|
|
1499
|
+
var cal_val = int2Bytes(calib, 2);
|
|
1500
|
+
packet.push(...cal_val);
|
|
1501
|
+
console.log(packet);
|
|
1502
|
+
return this.config_send(sensor_mac, packet);
|
|
1503
|
+
}
|
|
1447
1504
|
config_set_rx485_timeout_1011(sensor_mac, value){
|
|
1448
1505
|
console.log('config_set_Rx485_timeout_1011');
|
|
1449
1506
|
var packet = [244, 48, 0, 0, 23, value];
|
|
@@ -1464,6 +1521,24 @@ module.exports = class WirelessSensor{
|
|
|
1464
1521
|
console.log(packet);
|
|
1465
1522
|
return this.config_send(sensor_mac, packet);
|
|
1466
1523
|
}
|
|
1524
|
+
config_set_stop_bit_1011(sensor_mac, value){
|
|
1525
|
+
console.log('config_set_stop_bit_1011');
|
|
1526
|
+
var packet = [244, 34, 0, 0, 23, value];
|
|
1527
|
+
console.log(packet);
|
|
1528
|
+
return this.config_send(sensor_mac, packet);
|
|
1529
|
+
}
|
|
1530
|
+
config_set_parity_1011(sensor_mac, value){
|
|
1531
|
+
console.log('config_set_parity_1011');
|
|
1532
|
+
var packet = [244, 33, 0, 0, 23, value];
|
|
1533
|
+
console.log(packet);
|
|
1534
|
+
return this.config_send(sensor_mac, packet);
|
|
1535
|
+
}
|
|
1536
|
+
config_set_reboot_1011(sensor_mac){
|
|
1537
|
+
console.log('config_set_reboot_1011');
|
|
1538
|
+
var packet = [247, 64, 0, 0, 0, 5, 22, 23];
|
|
1539
|
+
console.log(packet);
|
|
1540
|
+
return this.config_send(sensor_mac, packet);
|
|
1541
|
+
}
|
|
1467
1542
|
config_set_operation_mode_531(sensor_mac, mode){
|
|
1468
1543
|
console.log('config_set_operation_mode_531');
|
|
1469
1544
|
console.log(mode);
|
|
@@ -1471,6 +1546,58 @@ module.exports = class WirelessSensor{
|
|
|
1471
1546
|
console.log(packet);
|
|
1472
1547
|
return this.config_send(sensor_mac, packet);
|
|
1473
1548
|
}
|
|
1549
|
+
config_set_calibration_58(sensor_mac){
|
|
1550
|
+
console.log('config_set_calibration_58');
|
|
1551
|
+
var packet = [244, 32, 0, 0, 23];
|
|
1552
|
+
console.log(packet);
|
|
1553
|
+
return this.config_send(sensor_mac, packet);
|
|
1554
|
+
}
|
|
1555
|
+
config_set_factory_reset_tank_probe_58(sensor_mac){
|
|
1556
|
+
console.log('config_set_factory_reset_tank_probe_58');
|
|
1557
|
+
var packet = [244, 33, 0, 0, 23];
|
|
1558
|
+
console.log(packet);
|
|
1559
|
+
return this.config_send(sensor_mac, packet);
|
|
1560
|
+
}
|
|
1561
|
+
config_set_max_range_58(sensor_mac, value){
|
|
1562
|
+
console.log('config_set_max_range_58');
|
|
1563
|
+
var packet = [244, 34, 0, 0, 23, 39, 16];
|
|
1564
|
+
var max = int2Bytes(value, 2);
|
|
1565
|
+
packet.push(...max);
|
|
1566
|
+
console.log(packet);
|
|
1567
|
+
return this.config_send(sensor_mac, packet);
|
|
1568
|
+
}
|
|
1569
|
+
config_set_clear_counter_33(sensor_mac){
|
|
1570
|
+
console.log('config_clear_counter_33');
|
|
1571
|
+
var packet = [244, 36, 0, 0, 0, 31];
|
|
1572
|
+
console.log(packet);
|
|
1573
|
+
return this.config_send(sensor_mac, packet);
|
|
1574
|
+
}
|
|
1575
|
+
config_set_push_notification_33(sensor_mac, value){
|
|
1576
|
+
console.log('config_set_push_notification_33');
|
|
1577
|
+
var packet = [244, 45, 0, 0, 0, value];
|
|
1578
|
+
console.log(packet);
|
|
1579
|
+
return this.config_send(sensor_mac, packet);
|
|
1580
|
+
}
|
|
1581
|
+
config_set_fly_interval_110(sensor_mac, value){
|
|
1582
|
+
console.log('config_set_fly_interval');
|
|
1583
|
+
var packet = [244, 79, 0, 0, 101, 81];
|
|
1584
|
+
let value_ = int2Bytes((value), 2);
|
|
1585
|
+
packet.push(...value_);
|
|
1586
|
+
console.log(packet);
|
|
1587
|
+
return this.config_send(sensor_mac, packet);
|
|
1588
|
+
}
|
|
1589
|
+
config_set_scd_skip_samples_44(sensor_mac, value){
|
|
1590
|
+
console.log('config_set_scd_skip_samples');
|
|
1591
|
+
var packet = [244, 34, 0, 0, 53, value];
|
|
1592
|
+
console.log(packet);
|
|
1593
|
+
return this.config_send(sensor_mac, packet);
|
|
1594
|
+
}
|
|
1595
|
+
config_set_sps_skip_samples_32(sensor_mac, value){
|
|
1596
|
+
console.log('config_set_scd_skip_samples');
|
|
1597
|
+
var packet = [244, 32, 0, 0, 53, value];
|
|
1598
|
+
console.log(packet);
|
|
1599
|
+
return this.config_send(sensor_mac, packet);
|
|
1600
|
+
}
|
|
1474
1601
|
config_get_delay(sensor_mac){
|
|
1475
1602
|
return new Promise((fulfill, reject) => {
|
|
1476
1603
|
this.config_send(sensor_mac, [247, 21, 0, 0, 0]).then((res) => {
|
|
@@ -2350,9 +2477,18 @@ function sensor_types(parent){
|
|
|
2350
2477
|
},
|
|
2351
2478
|
'33': {
|
|
2352
2479
|
name: 'AC Current Detect Sensor',
|
|
2353
|
-
parse: (
|
|
2354
|
-
|
|
2355
|
-
|
|
2480
|
+
parse: (payload, parsed, mac) => {
|
|
2481
|
+
if(parsed.firmware > 3){
|
|
2482
|
+
return {
|
|
2483
|
+
input_1: payload[8],
|
|
2484
|
+
current_detect: payload[9],
|
|
2485
|
+
total_uptime: payload.slice(10, 14).reduce(msbLsb),
|
|
2486
|
+
total_cycle_count: payload.slice(14, 18).reduce(msbLsb)
|
|
2487
|
+
};
|
|
2488
|
+
}else{
|
|
2489
|
+
return {
|
|
2490
|
+
input_1: payload[8]
|
|
2491
|
+
};
|
|
2356
2492
|
};
|
|
2357
2493
|
}
|
|
2358
2494
|
},
|
|
@@ -2571,12 +2707,8 @@ function sensor_types(parent){
|
|
|
2571
2707
|
return {
|
|
2572
2708
|
adc1: adc1,
|
|
2573
2709
|
adc2: adc2,
|
|
2574
|
-
mA1: adc1 * 0.0006863,
|
|
2575
|
-
mA2: adc2 * 0.0006863
|
|
2576
|
-
byteOne: d[0],
|
|
2577
|
-
byteTwo: d[1],
|
|
2578
|
-
byteThree: d[2],
|
|
2579
|
-
byteFour: d[3]
|
|
2710
|
+
mA1: parseFloat((adc1 * 0.0006863).toFixed(2)),
|
|
2711
|
+
mA2: parseFloat((adc2 * 0.0006863).toFixed(2))
|
|
2580
2712
|
};
|
|
2581
2713
|
},
|
|
2582
2714
|
'parse_fly': (frame) => {
|
|
@@ -2657,12 +2789,8 @@ function sensor_types(parent){
|
|
|
2657
2789
|
return {
|
|
2658
2790
|
adc1: adc1,
|
|
2659
2791
|
adc2: adc2,
|
|
2660
|
-
VDC1: adc1 * 0.00034122,
|
|
2661
|
-
VDC2: adc2 * 0.00034122
|
|
2662
|
-
byteOne: d[0],
|
|
2663
|
-
byteTwo: d[1],
|
|
2664
|
-
byteThree: d[2],
|
|
2665
|
-
byteFour: d[3]
|
|
2792
|
+
VDC1: parseFloat((adc1 * 0.00034122).toFixed(2)),
|
|
2793
|
+
VDC2: parseFloat((adc2 * 0.00034122).toFixed(2))
|
|
2666
2794
|
};
|
|
2667
2795
|
}
|
|
2668
2796
|
},
|
|
@@ -2673,12 +2801,13 @@ function sensor_types(parent){
|
|
|
2673
2801
|
filtered_range: d.slice(0, 2).reduce(msbLsb),
|
|
2674
2802
|
long_range_algorithm: d.slice(2, 4).reduce(msbLsb),
|
|
2675
2803
|
second_chance: d.slice(4, 6).reduce(msbLsb),
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2804
|
+
second_reading: d.slice(6, 8).reduce(msbLsb),
|
|
2805
|
+
compare_reading: d.slice(8, 10).reduce(msbLsb),
|
|
2806
|
+
short_range_algorithm: d.slice(10, 12).reduce(msbLsb),
|
|
2807
|
+
trusted_reading: d.slice(12, 14).reduce(msbLsb),
|
|
2808
|
+
final_filter: d.slice(14, 16).reduce(msbLsb),
|
|
2809
|
+
raw_final: d.slice(16, 18).reduce(msbLsb),
|
|
2810
|
+
final_index: d.slice(18, 20).reduce(msbLsb),
|
|
2682
2811
|
};
|
|
2683
2812
|
}
|
|
2684
2813
|
},
|
|
@@ -2813,6 +2942,22 @@ function sensor_types(parent){
|
|
|
2813
2942
|
};
|
|
2814
2943
|
}
|
|
2815
2944
|
},
|
|
2945
|
+
'74': {
|
|
2946
|
+
name: 'Wireless Temp Humidity Pressure Air quality Sensor',
|
|
2947
|
+
parse: (d) => {
|
|
2948
|
+
return {
|
|
2949
|
+
temperature: signInt(d.slice(0, 2).reduce(msbLsb), 16) *100,
|
|
2950
|
+
pressure: d.slice(2, 6).reduce(msbLsb) * 100,
|
|
2951
|
+
humidity: d.slice(6, 10).reduce(msbLsb) * 1000,
|
|
2952
|
+
resistance: d.slice(10, 14).reduce(msbLsb),
|
|
2953
|
+
iaq: d.slice(14, 16).reduce(msbLsb),
|
|
2954
|
+
co2_eqv: d.slice(16, 18).reduce(msbLsb),
|
|
2955
|
+
breath_voc: d.slice(18, 22).reduce(msbLsb)* 100,
|
|
2956
|
+
static_iaq: d.slice(22, 26).reduce(msbLsb)* 100,
|
|
2957
|
+
iaq_accuracy: d[27]
|
|
2958
|
+
};
|
|
2959
|
+
}
|
|
2960
|
+
},
|
|
2816
2961
|
'75': {
|
|
2817
2962
|
name: 'Siemens Air Velocity Probe',
|
|
2818
2963
|
parse: (d) => {
|
|
@@ -4294,6 +4439,7 @@ function sensor_types(parent){
|
|
|
4294
4439
|
'destination_address': toMac(frame.slice(12, 16)),
|
|
4295
4440
|
'mode': frame_data.mode,
|
|
4296
4441
|
'odr_1': frame_data.odr_1+'Hz',
|
|
4442
|
+
'odr_2': frame_data.odr_2+'Hz',
|
|
4297
4443
|
'sampling_duration_1': frame_data.sampling_duration_1,
|
|
4298
4444
|
'sampling_duration_2': frame_data.sampling_duration_2,
|
|
4299
4445
|
'filter_status': frame_data.filter_status,
|
|
@@ -4314,6 +4460,7 @@ function sensor_types(parent){
|
|
|
4314
4460
|
'destination_address': toMac(frame.slice(12, 16), false),
|
|
4315
4461
|
'mode': frame[16],
|
|
4316
4462
|
'odr_1': frame[17],
|
|
4463
|
+
'odr_2': frame[18],
|
|
4317
4464
|
'sampling_duration_1': frame[19],
|
|
4318
4465
|
'sampling_duration_2': frame[20],
|
|
4319
4466
|
'filter_status': frame[21],
|
|
@@ -5704,7 +5851,8 @@ function sensor_types(parent){
|
|
|
5704
5851
|
accelerometer_counter: d.slice(24, 28).reduce(msbLsb),
|
|
5705
5852
|
accelerometer_uptime: d.slice(28, 32).reduce(msbLsb),
|
|
5706
5853
|
magnetometer_counter: d.slice(32, 36).reduce(msbLsb),
|
|
5707
|
-
magnetometer_uptime: d.slice(36, 40).reduce(msbLsb)
|
|
5854
|
+
magnetometer_uptime: d.slice(36, 40).reduce(msbLsb),
|
|
5855
|
+
io_states: d[40]
|
|
5708
5856
|
};
|
|
5709
5857
|
}
|
|
5710
5858
|
},
|
|
@@ -8382,15 +8530,9 @@ function sensor_types(parent){
|
|
|
8382
8530
|
adc1: adc1,
|
|
8383
8531
|
adc2: adc2,
|
|
8384
8532
|
dac1: dac1,
|
|
8385
|
-
mA1: adc1/100.00,
|
|
8533
|
+
mA1: parseFloat((adc1/100.00).toFixed(2)),
|
|
8386
8534
|
raw_adc: adc2,
|
|
8387
|
-
raw_dac: dac1
|
|
8388
|
-
byteOne: d[0],
|
|
8389
|
-
byteTwo: d[1],
|
|
8390
|
-
byteThree: d[2],
|
|
8391
|
-
byteFour: d[3],
|
|
8392
|
-
byteFive: d[4],
|
|
8393
|
-
byteSix: d[5]
|
|
8535
|
+
raw_dac: dac1
|
|
8394
8536
|
};
|
|
8395
8537
|
}
|
|
8396
8538
|
},
|