bt-sensors-plugin-sk 1.2.6-beta-6 → 1.2.6-beta-6a
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bt-sensors-plugin-sk",
|
|
3
|
-
"version": "1.2.6-beta-
|
|
3
|
+
"version": "1.2.6-beta-6a",
|
|
4
4
|
"description": "Bluetooth Sensors for Signalk - see https://www.npmjs.com/package/bt-sensors-plugin-sk#supported-sensors for a list of supported sensors",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -69,6 +69,7 @@ class JikongBMS extends BTSensor {
|
|
|
69
69
|
}
|
|
70
70
|
static ImageFile = "JikongBMS.jpg";
|
|
71
71
|
connections = 0;
|
|
72
|
+
pollFreq = 30;
|
|
72
73
|
|
|
73
74
|
jikongCommand(command) {
|
|
74
75
|
var result = [
|
|
@@ -404,7 +405,7 @@ class JikongBMS extends BTSensor {
|
|
|
404
405
|
}
|
|
405
406
|
|
|
406
407
|
usingGATT() {
|
|
407
|
-
return
|
|
408
|
+
return true;
|
|
408
409
|
}
|
|
409
410
|
|
|
410
411
|
async getAndEmitBatteryInfo() {
|
|
@@ -482,12 +483,12 @@ class JikongBMS extends BTSensor {
|
|
|
482
483
|
|
|
483
484
|
async initGATTInterval(){
|
|
484
485
|
this.intervalID = setInterval(async () => {
|
|
485
|
-
this.
|
|
486
|
+
this._error = false
|
|
486
487
|
if (!(await this.device.isConnected())) {
|
|
487
488
|
await this.initGATTConnection(true);
|
|
488
489
|
}
|
|
489
490
|
await this.getAndEmitBatteryInfo();
|
|
490
|
-
}, this?.pollFreq??40 * 1000);
|
|
491
|
+
}, (this?.pollFreq??40) * 1000);
|
|
491
492
|
|
|
492
493
|
try {
|
|
493
494
|
await this.getAndEmitBatteryInfo();
|