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.
Files changed (43) hide show
  1. package/README.MD +55 -0
  2. package/lib/ble/adapter-factory.d.ts +24 -20
  3. package/lib/ble/adapter-factory.js +36 -13
  4. package/lib/ble/base/comms.d.ts +74 -2
  5. package/lib/ble/base/comms.js +596 -3
  6. package/lib/ble/ble-interface.d.ts +4 -7
  7. package/lib/ble/ble-interface.js +2 -16
  8. package/lib/ble/ble-peripheral.d.ts +0 -1
  9. package/lib/ble/ble-peripheral.js +11 -7
  10. package/lib/ble/characteristics/csc/features.d.ts +10 -0
  11. package/lib/ble/characteristics/csc/features.js +19 -0
  12. package/lib/ble/characteristics/csc/measurement.d.ts +33 -0
  13. package/lib/ble/characteristics/csc/measurement.js +109 -0
  14. package/lib/ble/characteristics/types.d.ts +6 -0
  15. package/lib/ble/characteristics/types.js +2 -0
  16. package/lib/ble/consts.d.ts +1 -0
  17. package/lib/ble/consts.js +2 -1
  18. package/lib/ble/cp/comm.d.ts +1 -1
  19. package/lib/ble/cp/comm.js +2 -2
  20. package/lib/ble/csc/adapter.d.ts +17 -0
  21. package/lib/ble/csc/adapter.js +66 -0
  22. package/lib/ble/csc/index.d.ts +3 -0
  23. package/lib/ble/csc/index.js +19 -0
  24. package/lib/ble/csc/sensor.d.ts +21 -0
  25. package/lib/ble/csc/sensor.js +64 -0
  26. package/lib/ble/csc/types.d.ts +6 -0
  27. package/lib/ble/csc/types.js +2 -0
  28. package/lib/ble/elite/comms.d.ts +1 -1
  29. package/lib/ble/elite/comms.js +2 -2
  30. package/lib/ble/fm/comms.d.ts +1 -1
  31. package/lib/ble/fm/comms.js +3 -3
  32. package/lib/ble/hr/comm.d.ts +1 -1
  33. package/lib/ble/hr/comm.js +2 -2
  34. package/lib/ble/index.js +2 -0
  35. package/lib/ble/tacx/comms.d.ts +1 -1
  36. package/lib/ble/tacx/comms.js +2 -2
  37. package/lib/ble/tacx/sensor.js +1 -1
  38. package/lib/ble/types.d.ts +1 -1
  39. package/lib/ble/utils.d.ts +1 -0
  40. package/lib/ble/utils.js +5 -1
  41. package/lib/ble/wahoo/comms.d.ts +1 -1
  42. package/lib/ble/wahoo/comms.js +2 -2
  43. 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;
@@ -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/sensor";
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,
@@ -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 sensor_1 = __importDefault(require("../fm/sensor"));
18
+ const comms_1 = __importDefault(require("../fm/comms"));
19
19
  const utils_1 = require("../utils");
20
20
  const ErgWriteDelay = 2000;
21
- class BleWahooDevice extends sensor_1.default {
21
+ class BleWahooDevice extends comms_1.default {
22
22
  constructor(props) {
23
23
  super(props);
24
24
  this.prevCrankData = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "2.3.0-beta.19",
3
+ "version": "2.3.0-beta.20",
4
4
  "dependencies": {
5
5
  "@serialport/bindings-interface": "^1.2.2",
6
6
  "@serialport/parser-byte-length": "^9.0.1",