incyclist-services 1.0.41 → 1.0.42
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.
|
@@ -59,7 +59,7 @@ export declare class DevicePairingService extends EventEmitter {
|
|
|
59
59
|
protected onConfigurationUpdate(newCapabilities: DeviceConfigurationInfo): void;
|
|
60
60
|
protected onInterfaceStateChanged(ifName: any, ifDetails: any, interfacesNew?: any): Promise<any>;
|
|
61
61
|
protected isInterfaceEnabled(target: string | InterfaceSetting): boolean;
|
|
62
|
-
protected logCapabilities(capabilities
|
|
62
|
+
protected logCapabilities(capabilities?: Array<CapabilityData>): CapabilityData[];
|
|
63
63
|
protected initPairingCallbacks(): void;
|
|
64
64
|
protected removePairingCallbacks(): void;
|
|
65
65
|
protected initScanningCallbacks(): void;
|
|
@@ -97,6 +97,7 @@ class DevicePairingService extends events_1.default {
|
|
|
97
97
|
this.state.canStartRide = this.configuration.canStartRide();
|
|
98
98
|
this.state.stopRequested = false;
|
|
99
99
|
this.state.stopped = false;
|
|
100
|
+
this.logCapabilities();
|
|
100
101
|
this.state.interfaces.forEach(i => {
|
|
101
102
|
if (!this.isInterfaceEnabled(i.name))
|
|
102
103
|
this.disableAdaptersOnInterface(i.name);
|
|
@@ -316,16 +317,16 @@ class DevicePairingService extends events_1.default {
|
|
|
316
317
|
this.onScanningDataHandler = this.rideService.onData.bind(this.rideService);
|
|
317
318
|
this.configuration = this.configuration || (0, configuration_1.useDeviceConfiguration)();
|
|
318
319
|
if (this.configuration.isInitialized()) {
|
|
319
|
-
this.logCapabilities(this.state.capabilities);
|
|
320
320
|
this.state.initialized = true;
|
|
321
321
|
return done();
|
|
322
322
|
}
|
|
323
|
-
|
|
324
|
-
this.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
else {
|
|
324
|
+
this.configuration.once('initialized', (capabilitiesLoaded, interfacesLoaded) => {
|
|
325
|
+
this.onConfigLoaded(capabilitiesLoaded, interfacesLoaded);
|
|
326
|
+
done();
|
|
327
|
+
});
|
|
328
|
+
this.configuration.init();
|
|
329
|
+
}
|
|
329
330
|
});
|
|
330
331
|
}
|
|
331
332
|
getExternaState(toEmit) {
|
|
@@ -452,7 +453,7 @@ class DevicePairingService extends events_1.default {
|
|
|
452
453
|
return interfaces.find(i => i.name === name && i.enabled && i.state !== 'unavailable') !== undefined;
|
|
453
454
|
}
|
|
454
455
|
logCapabilities(capabilities) {
|
|
455
|
-
const ci = capabilities ||
|
|
456
|
+
const ci = capabilities || this.state.capabilities;
|
|
456
457
|
ci.forEach(c => {
|
|
457
458
|
var _a;
|
|
458
459
|
const { devices = [], disabled } = c;
|