@hangtime/grip-connect 0.5.2 → 0.5.4

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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/{download.d.ts → helpers/download.d.ts} +1 -1
  3. package/dist/helpers/is-device.d.ts +16 -16
  4. package/dist/helpers/is-device.js +18 -18
  5. package/dist/index.d.ts +4 -4
  6. package/dist/index.js +4 -5
  7. package/dist/interfaces/callback.interface.d.ts +49 -0
  8. package/dist/interfaces/command.interface.d.ts +85 -0
  9. package/dist/interfaces/device/forceboard.interface.d.ts +16 -0
  10. package/dist/interfaces/device.interface.d.ts +21 -21
  11. package/dist/models/device/entralpi.model.d.ts +1 -1
  12. package/dist/models/device/entralpi.model.js +19 -76
  13. package/dist/models/device/forceboard.model.d.ts +24 -0
  14. package/dist/models/device/forceboard.model.js +81 -23
  15. package/dist/models/device/kilterboard.model.d.ts +61 -2
  16. package/dist/models/device/kilterboard.model.js +91 -11
  17. package/dist/models/device/motherboard.model.d.ts +24 -1
  18. package/dist/models/device/motherboard.model.js +79 -100
  19. package/dist/models/device/progressor.model.d.ts +1 -1
  20. package/dist/models/device/progressor.model.js +76 -52
  21. package/dist/models/device/wh-c06.model.d.ts +7 -0
  22. package/dist/models/device/wh-c06.model.js +18 -17
  23. package/dist/models/device.model.d.ts +73 -24
  24. package/dist/models/device.model.js +125 -78
  25. package/package.json +1 -1
  26. package/src/{download.ts → helpers/download.ts} +1 -1
  27. package/src/helpers/is-device.ts +23 -23
  28. package/src/index.ts +4 -5
  29. package/src/interfaces/callback.interface.ts +56 -0
  30. package/src/interfaces/command.interface.ts +106 -0
  31. package/src/interfaces/device/forceboard.interface.ts +19 -0
  32. package/src/interfaces/device.interface.ts +24 -23
  33. package/src/models/device/entralpi.model.ts +19 -77
  34. package/src/models/device/forceboard.model.ts +93 -23
  35. package/src/models/device/kilterboard.model.ts +93 -13
  36. package/src/models/device/motherboard.model.ts +84 -105
  37. package/src/models/device/progressor.model.ts +79 -52
  38. package/src/models/device/wh-c06.model.ts +20 -18
  39. package/src/models/device.model.ts +143 -88
  40. package/dist/commands/climbro.d.ts +0 -6
  41. package/dist/commands/climbro.js +0 -5
  42. package/dist/commands/entralpi.d.ts +0 -6
  43. package/dist/commands/entralpi.js +0 -5
  44. package/dist/commands/forceboard.d.ts +0 -6
  45. package/dist/commands/forceboard.js +0 -5
  46. package/dist/commands/index.d.ts +0 -7
  47. package/dist/commands/index.js +0 -7
  48. package/dist/commands/kilterboard.d.ts +0 -35
  49. package/dist/commands/kilterboard.js +0 -65
  50. package/dist/commands/motherboard.d.ts +0 -6
  51. package/dist/commands/motherboard.js +0 -13
  52. package/dist/commands/mysmartboard.d.ts +0 -6
  53. package/dist/commands/mysmartboard.js +0 -5
  54. package/dist/commands/progressor.d.ts +0 -17
  55. package/dist/commands/progressor.js +0 -30
  56. package/dist/commands/wh-c06.d.ts +0 -6
  57. package/dist/commands/wh-c06.js +0 -5
  58. package/dist/types/commands.d.ts +0 -18
  59. package/dist/types/notify.d.ts +0 -14
  60. package/src/commands/climbro.ts +0 -6
  61. package/src/commands/entralpi.ts +0 -6
  62. package/src/commands/forceboard.ts +0 -6
  63. package/src/commands/index.ts +0 -13
  64. package/src/commands/kilterboard.ts +0 -64
  65. package/src/commands/motherboard.ts +0 -14
  66. package/src/commands/mysmartboard.ts +0 -6
  67. package/src/commands/progressor.ts +0 -31
  68. package/src/commands/wh-c06.ts +0 -6
  69. package/src/types/commands.ts +0 -21
  70. package/src/types/notify.ts +0 -14
  71. /package/dist/{download.js → helpers/download.js} +0 -0
  72. /package/dist/{is-active.d.ts → helpers/is-active.d.ts} +0 -0
  73. /package/dist/{is-active.js → helpers/is-active.js} +0 -0
  74. /package/dist/{tare.d.ts → helpers/tare.d.ts} +0 -0
  75. /package/dist/{tare.js → helpers/tare.js} +0 -0
  76. /package/dist/{types/commands.js → interfaces/callback.interface.js} +0 -0
  77. /package/dist/{types/download.js → interfaces/command.interface.js} +0 -0
  78. /package/dist/{types/download.d.ts → interfaces/download.interface.d.ts} +0 -0
  79. /package/dist/{types/notify.js → interfaces/download.interface.js} +0 -0
  80. /package/src/{is-active.ts → helpers/is-active.ts} +0 -0
  81. /package/src/{tare.ts → helpers/tare.ts} +0 -0
  82. /package/src/{types/download.ts → interfaces/download.interface.ts} +0 -0
@@ -1,64 +0,0 @@
1
- /**
2
- * For API level 2 and API level 3.
3
- * The first byte in the data is dependent on where the packet is in the message as a whole.
4
- * More details: https://github.com/1-max-1/fake_kilter_board
5
- */
6
- export enum KilterBoardPacket {
7
- /** If this packet is in the middle, the byte gets set to 77 (M). */
8
- V2_MIDDLE = 77,
9
- /** If this packet is the first packet in the message, then this byte gets set to 78 (N). */
10
- V2_FIRST,
11
- /** If this is the last packet in the message, this byte gets set to 79 (0). */
12
- V2_LAST,
13
- /** If this packet is the only packet in the message, the byte gets set to 80 (P). Note that this takes priority over the other conditions. */
14
- V2_ONLY,
15
- /** If this packet is in the middle, the byte gets set to 81 (Q). */
16
- V3_MIDDLE,
17
- /** If this packet is the first packet in the message, then this byte gets set to 82 (R). */
18
- V3_FIRST,
19
- /** If this is the last packet in the message, this byte gets set to 83 (S). */
20
- V3_LAST,
21
- /** If this packet is the only packet in the message, the byte gets set to 84 (T). Note that this takes priority over the other conditions. */
22
- V3_ONLY,
23
- }
24
- /**
25
- * Extracted from placement_roles database table.
26
- */
27
- export const KilterBoardPlacementRoles = [
28
- {
29
- id: 12,
30
- product_id: 1,
31
- position: 1,
32
- name: "start",
33
- full_name: "Start",
34
- led_color: "00FF00",
35
- screen_color: "00DD00",
36
- },
37
- {
38
- id: 13,
39
- product_id: 1,
40
- position: 2,
41
- name: "middle",
42
- full_name: "Middle",
43
- led_color: "00FFFF",
44
- screen_color: "00FFFF",
45
- },
46
- {
47
- id: 14,
48
- product_id: 1,
49
- position: 3,
50
- name: "finish",
51
- full_name: "Finish",
52
- led_color: "FF00FF",
53
- screen_color: "FF00FF",
54
- },
55
- {
56
- id: 15,
57
- product_id: 1,
58
- position: 4,
59
- name: "foot",
60
- full_name: "Foot Only",
61
- led_color: "FFB600",
62
- screen_color: "FFA500",
63
- },
64
- ]
@@ -1,14 +0,0 @@
1
- import type { Commands } from "../types/commands"
2
- /**
3
- * Warning:
4
- * Using other commands can seriously harm your device
5
- */
6
- export const MotherboardCommands: Commands = {
7
- GET_SERIAL: "#",
8
- START_WEIGHT_MEAS: "S30",
9
- STOP_WEIGHT_MEAS: "", // All commands will stop the data stream.
10
- GET_CALIBRATION: "C",
11
- SLEEP: 0,
12
- GET_TEXT: "T",
13
- DEBUG_STREAM: "D",
14
- }
@@ -1,6 +0,0 @@
1
- import type { Commands } from "../types/commands"
2
- /**
3
- * Warning:
4
- * Using other commands can seriously harm your device
5
- */
6
- export const mySmartBoardCommands: Commands = {}
@@ -1,31 +0,0 @@
1
- import type { Commands } from "../types/commands"
2
- /**
3
- * Warning:
4
- * Using other commands can seriously harm your device
5
- */
6
- export const ProgressorCommands: Commands = {
7
- TARE_SCALE: "d", // 0x64,
8
- START_WEIGHT_MEAS: "e", // 0x65,
9
- STOP_WEIGHT_MEAS: "f", // 0x66,
10
- START_PEAK_RFD_MEAS: "g", // 0x67,
11
- START_PEAK_RFD_MEAS_SERIES: "h", // 0x68,
12
- ADD_CALIB_POINT: "i", // 0x69,
13
- SAVE_CALIB: "j", // 0x6a,
14
- GET_FW_VERSION: "k", // 0x6b,
15
- GET_ERR_INFO: "l", // 0x6c,
16
- CLR_ERR_INFO: "m", // 0x6d,
17
- SLEEP: "n", // 0x6e,
18
- GET_BATT_VLTG: "o", // 0x6f,
19
- }
20
-
21
- /**
22
- * The Progressor returns a Uint8Array.
23
- * The first item [0] is the type of response it returns
24
- */
25
- export enum ProgressorResponses {
26
- COMMAND_RESPONSE,
27
- WEIGHT_MEASURE,
28
- PEAK_RFD_MEAS,
29
- PEAK_RFD_MEAS_SERIES,
30
- LOW_BATTERY_WARNING,
31
- }
@@ -1,6 +0,0 @@
1
- import type { Commands } from "../types/commands"
2
- /**
3
- * Warning:
4
- * Using other commands can seriously harm your device
5
- */
6
- export const WHC06Commands: Commands = {}
@@ -1,21 +0,0 @@
1
- export interface Commands {
2
- // Motherboard, Progressor
3
- START_WEIGHT_MEAS?: string
4
- STOP_WEIGHT_MEAS?: string
5
- SLEEP?: number | string
6
- GET_SERIAL?: string
7
- // Griptonite Motherboard
8
- GET_TEXT?: string
9
- DEBUG_STREAM?: string
10
- GET_CALIBRATION?: string
11
- // Tindeq Progressor
12
- TARE_SCALE?: string
13
- START_PEAK_RFD_MEAS?: string
14
- START_PEAK_RFD_MEAS_SERIES?: string
15
- ADD_CALIB_POINT?: string
16
- SAVE_CALIB?: string
17
- GET_FW_VERSION?: string
18
- GET_ERR_INFO?: string
19
- CLR_ERR_INFO?: string
20
- GET_BATT_VLTG?: string
21
- }
@@ -1,14 +0,0 @@
1
- export interface massObject {
2
- /** The total mass. */
3
- massTotal: string
4
- /** The total maximum mass. */
5
- massMax: string
6
- /** The total average mass. */
7
- massAverage: string
8
- /** The mass on the left side (optional: Motherboard). */
9
- massLeft?: string
10
- /** The mass at the center (optional: Motherboard). */
11
- massCenter?: string
12
- /** The mass on the right side (optional: Motherboard). */
13
- massRight?: string
14
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes