incyclist-devices 3.0.35 → 3.0.37
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.
|
@@ -46,7 +46,8 @@ class BleAdapter extends adpater_js_1.default {
|
|
|
46
46
|
return p;
|
|
47
47
|
}
|
|
48
48
|
async waitForPeripheral() {
|
|
49
|
-
|
|
49
|
+
const settings = { ...this.settings };
|
|
50
|
+
this.logEvent({ message: 'waiting for sensor ...', device: this.getName(), interface: this.getInterface(), address: settings.address });
|
|
50
51
|
const ble = this.getBle();
|
|
51
52
|
const peripheral = await ble.waitForPeripheral(this.settings);
|
|
52
53
|
this.updateSensor(peripheral);
|
|
@@ -209,7 +210,7 @@ class BleAdapter extends adpater_js_1.default {
|
|
|
209
210
|
const ble = this.getBle();
|
|
210
211
|
ble.once('disconnect-done', this.onDisconnectDoneHandler);
|
|
211
212
|
this.startTask = new task_js_1.InteruptableTask(this.startAdapter(startProps), {
|
|
212
|
-
timeout: startProps?.timeout,
|
|
213
|
+
timeout: startProps?.timeout ?? this.getDefaultStartupTimeout(),
|
|
213
214
|
name: 'start',
|
|
214
215
|
errorOnTimeout: false,
|
|
215
216
|
log: this.logEvent.bind(this)
|
|
@@ -41,7 +41,8 @@ export default class BleAdapter extends IncyclistDevice {
|
|
|
41
41
|
return p;
|
|
42
42
|
}
|
|
43
43
|
async waitForPeripheral() {
|
|
44
|
-
|
|
44
|
+
const settings = { ...this.settings };
|
|
45
|
+
this.logEvent({ message: 'waiting for sensor ...', device: this.getName(), interface: this.getInterface(), address: settings.address });
|
|
45
46
|
const ble = this.getBle();
|
|
46
47
|
const peripheral = await ble.waitForPeripheral(this.settings);
|
|
47
48
|
this.updateSensor(peripheral);
|
|
@@ -204,7 +205,7 @@ export default class BleAdapter extends IncyclistDevice {
|
|
|
204
205
|
const ble = this.getBle();
|
|
205
206
|
ble.once('disconnect-done', this.onDisconnectDoneHandler);
|
|
206
207
|
this.startTask = new InteruptableTask(this.startAdapter(startProps), {
|
|
207
|
-
timeout: startProps?.timeout,
|
|
208
|
+
timeout: startProps?.timeout ?? this.getDefaultStartupTimeout(),
|
|
208
209
|
name: 'start',
|
|
209
210
|
errorOnTimeout: false,
|
|
210
211
|
log: this.logEvent.bind(this)
|
|
@@ -368,6 +368,7 @@ export class DirectConnectPeripheral {
|
|
|
368
368
|
this.socket.on('end', this.onPortCloseHandler);
|
|
369
369
|
resolve(true);
|
|
370
370
|
});
|
|
371
|
+
this.logEvent({ message: 'connecting to wifi peripheral', path: this.getPath() });
|
|
371
372
|
this.socket.connect(port, address);
|
|
372
373
|
});
|
|
373
374
|
}
|