incyclist-devices 2.0.12 → 2.0.14
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.
|
@@ -57,7 +57,10 @@ class AntInterface extends events_1.default {
|
|
|
57
57
|
logEvent(event) {
|
|
58
58
|
if (this.logger)
|
|
59
59
|
this.logger.logEvent(event);
|
|
60
|
-
|
|
60
|
+
const w = global.window;
|
|
61
|
+
if ((w === null || w === void 0 ? void 0 : w.DEVICE_DEBUG) || process.env.ANT_DEBUG) {
|
|
62
|
+
console.log('~~~ ANT', event);
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
isConnected() {
|
|
63
66
|
return this.connectState.connected;
|
|
@@ -119,7 +119,6 @@ class Daum8i {
|
|
|
119
119
|
}
|
|
120
120
|
this.connected = false;
|
|
121
121
|
if (this.sp) {
|
|
122
|
-
console.log('~~~ removing all listeners');
|
|
123
122
|
this.sp.removeAllListeners();
|
|
124
123
|
this.sp = null;
|
|
125
124
|
}
|
|
@@ -155,7 +154,6 @@ class Daum8i {
|
|
|
155
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
155
|
this.connected = false;
|
|
157
156
|
if (this.sp) {
|
|
158
|
-
console.log('~~~ removing all listeners');
|
|
159
157
|
this.sp.removeAllListeners();
|
|
160
158
|
this.sp = null;
|
|
161
159
|
}
|
|
@@ -187,7 +187,6 @@ class SerialInterface extends events_1.default {
|
|
|
187
187
|
this.ports.splice(existing, 1);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
this.logEvent({ message: 'opening port - getSerialPort()', path });
|
|
191
190
|
const port = serialport_1.default.getInstance().getSerialPort(this.ifaceName, { path });
|
|
192
191
|
if (!port) {
|
|
193
192
|
this.logEvent({ message: 'opening port - port does not exist', path });
|