incyclist-devices 2.3.0-beta.19 → 2.3.0-beta.20
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/README.MD +55 -0
- package/lib/ble/adapter-factory.d.ts +24 -20
- package/lib/ble/adapter-factory.js +36 -13
- package/lib/ble/base/comms.d.ts +74 -2
- package/lib/ble/base/comms.js +596 -3
- package/lib/ble/ble-interface.d.ts +4 -7
- package/lib/ble/ble-interface.js +2 -16
- package/lib/ble/ble-peripheral.d.ts +0 -1
- package/lib/ble/ble-peripheral.js +11 -7
- package/lib/ble/characteristics/csc/features.d.ts +10 -0
- package/lib/ble/characteristics/csc/features.js +19 -0
- package/lib/ble/characteristics/csc/measurement.d.ts +33 -0
- package/lib/ble/characteristics/csc/measurement.js +109 -0
- package/lib/ble/characteristics/types.d.ts +6 -0
- package/lib/ble/characteristics/types.js +2 -0
- package/lib/ble/consts.d.ts +1 -0
- package/lib/ble/consts.js +2 -1
- package/lib/ble/cp/comm.d.ts +1 -1
- package/lib/ble/cp/comm.js +2 -2
- package/lib/ble/csc/adapter.d.ts +17 -0
- package/lib/ble/csc/adapter.js +66 -0
- package/lib/ble/csc/index.d.ts +3 -0
- package/lib/ble/csc/index.js +19 -0
- package/lib/ble/csc/sensor.d.ts +21 -0
- package/lib/ble/csc/sensor.js +64 -0
- package/lib/ble/csc/types.d.ts +6 -0
- package/lib/ble/csc/types.js +2 -0
- package/lib/ble/elite/comms.d.ts +1 -1
- package/lib/ble/elite/comms.js +2 -2
- package/lib/ble/fm/comms.d.ts +1 -1
- package/lib/ble/fm/comms.js +3 -3
- package/lib/ble/hr/comm.d.ts +1 -1
- package/lib/ble/hr/comm.js +2 -2
- package/lib/ble/index.js +2 -0
- package/lib/ble/tacx/comms.d.ts +1 -1
- package/lib/ble/tacx/comms.js +2 -2
- package/lib/ble/tacx/sensor.js +1 -1
- package/lib/ble/types.d.ts +1 -1
- package/lib/ble/utils.d.ts +1 -0
- package/lib/ble/utils.js +5 -1
- package/lib/ble/wahoo/comms.d.ts +1 -1
- package/lib/ble/wahoo/comms.js +2 -2
- package/package.json +1 -1
package/lib/ble/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyFromVal = exports.propertyVal = exports.fullUUID = exports.beautifyUUID = exports.parseUUID = void 0;
|
|
3
|
+
exports.bit = exports.propertyFromVal = exports.propertyVal = exports.fullUUID = exports.beautifyUUID = exports.parseUUID = void 0;
|
|
4
4
|
exports.mapLegacyProfile = mapLegacyProfile;
|
|
5
5
|
exports.uuid = uuid;
|
|
6
6
|
exports.matches = matches;
|
|
@@ -138,3 +138,7 @@ const propertyFromVal = (val) => {
|
|
|
138
138
|
return res;
|
|
139
139
|
};
|
|
140
140
|
exports.propertyFromVal = propertyFromVal;
|
|
141
|
+
const bit = (nr) => {
|
|
142
|
+
return (1 << nr);
|
|
143
|
+
};
|
|
144
|
+
exports.bit = bit;
|
package/lib/ble/wahoo/comms.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LegacyProfile } from "../../antv2/types";
|
|
2
2
|
import { CrankData } from "../cp";
|
|
3
3
|
import { IndoorBikeData } from "../fm";
|
|
4
|
-
import BleFitnessMachineDevice from "../fm/
|
|
4
|
+
import BleFitnessMachineDevice from "../fm/comms";
|
|
5
5
|
import { BleProtocol, BleWriteProps, IBlePeripheralConnector } from "../types";
|
|
6
6
|
export declare const enum OpCode {
|
|
7
7
|
unlock = 32,
|
package/lib/ble/wahoo/comms.js
CHANGED
|
@@ -15,10 +15,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const _1 = require(".");
|
|
16
16
|
const consts_1 = require("../../base/consts");
|
|
17
17
|
const consts_2 = require("../consts");
|
|
18
|
-
const
|
|
18
|
+
const comms_1 = __importDefault(require("../fm/comms"));
|
|
19
19
|
const utils_1 = require("../utils");
|
|
20
20
|
const ErgWriteDelay = 2000;
|
|
21
|
-
class BleWahooDevice extends
|
|
21
|
+
class BleWahooDevice extends comms_1.default {
|
|
22
22
|
constructor(props) {
|
|
23
23
|
super(props);
|
|
24
24
|
this.prevCrankData = undefined;
|