incyclist-devices 2.3.27 → 2.3.29
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/antv2/fe/adapter.d.ts +2 -1
- package/lib/antv2/fe/adapter.js +6 -0
- package/lib/antv2/types.d.ts +1 -1
- package/lib/base/adpater.d.ts +1 -0
- package/lib/base/adpater.js +21 -11
- package/lib/ble/base/adapter.js +2 -1
- package/lib/ble/base/interface.js +11 -4
- package/lib/ble/base/peripheral.d.ts +3 -2
- package/lib/ble/base/peripheral.js +62 -38
- package/lib/ble/base/sensor.d.ts +2 -0
- package/lib/ble/base/sensor.js +16 -4
- package/lib/ble/fm/adapter.js +8 -7
- package/lib/ble/index.js +2 -0
- package/lib/ble/types.d.ts +4 -2
- package/lib/ble/zwift/click/adapter.d.ts +19 -0
- package/lib/ble/zwift/click/adapter.js +74 -0
- package/lib/ble/zwift/click/index.d.ts +2 -0
- package/lib/ble/zwift/click/index.js +18 -0
- package/lib/ble/zwift/click/sensor.d.ts +40 -0
- package/lib/ble/zwift/click/sensor.js +221 -0
- package/lib/ble/zwift/play/adapter.d.ts +19 -0
- package/lib/ble/zwift/play/adapter.js +76 -0
- package/lib/ble/zwift/play/index.d.ts +2 -0
- package/lib/ble/zwift/play/index.js +18 -0
- package/lib/ble/zwift/play/sensor.d.ts +43 -0
- package/lib/ble/zwift/play/sensor.js +246 -0
- package/lib/modes/power-base.js +17 -3
- package/lib/serial/daum/DaumAdapter.d.ts +2 -1
- package/lib/serial/daum/DaumAdapter.js +5 -0
- package/lib/types/capabilities.d.ts +2 -1
- package/lib/types/capabilities.js +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { DaumSerialComms } from './types';
|
|
|
4
4
|
import { SerialIncyclistDevice } from '../base/adapter';
|
|
5
5
|
import SerialInterface from '../base/serial-interface';
|
|
6
6
|
import EventEmitter from 'events';
|
|
7
|
-
import { UpdateRequest } from '../../modes/types';
|
|
7
|
+
import ICyclingMode, { UpdateRequest } from '../../modes/types';
|
|
8
8
|
export default class DaumAdapter<S extends SerialDeviceSettings, P extends DeviceProperties, C extends DaumSerialComms> extends SerialIncyclistDevice<P> {
|
|
9
9
|
protected static controllers: ControllerConfig;
|
|
10
10
|
comms: C;
|
|
@@ -27,6 +27,7 @@ export default class DaumAdapter<S extends SerialDeviceSettings, P extends Devic
|
|
|
27
27
|
constructor(settings: S, props?: P);
|
|
28
28
|
getPort(): string;
|
|
29
29
|
getSerialInterface(): SerialInterface;
|
|
30
|
+
getDefaultCyclingMode(): ICyclingMode;
|
|
30
31
|
sendInitCommands(): Promise<boolean>;
|
|
31
32
|
getCurrentBikeData(): Promise<IncyclistBikeData>;
|
|
32
33
|
getComms(): C;
|
|
@@ -50,6 +50,11 @@ class DaumAdapter extends adapter_1.SerialIncyclistDevice {
|
|
|
50
50
|
var _a;
|
|
51
51
|
return (_a = this.comms) === null || _a === void 0 ? void 0 : _a.serial;
|
|
52
52
|
}
|
|
53
|
+
getDefaultCyclingMode() {
|
|
54
|
+
if (this.props.capabilities && this.props.capabilities.indexOf(types_1.IncyclistCapability.Control) === -1)
|
|
55
|
+
return new daum_power_1.default(this);
|
|
56
|
+
return super.getDefaultCyclingMode();
|
|
57
|
+
}
|
|
53
58
|
sendInitCommands() {
|
|
54
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
60
|
if (this.started && !this.stopped) {
|
|
@@ -8,4 +8,5 @@ var IncyclistCapability;
|
|
|
8
8
|
IncyclistCapability["Cadence"] = "cadence";
|
|
9
9
|
IncyclistCapability["HeartRate"] = "heartrate";
|
|
10
10
|
IncyclistCapability["Control"] = "control";
|
|
11
|
+
IncyclistCapability["AppControl"] = "app_control";
|
|
11
12
|
})(IncyclistCapability || (exports.IncyclistCapability = IncyclistCapability = {}));
|