brilliantsole 0.0.20 → 0.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brilliantsole",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "JavaScript SDK for BrilliantSole Smart Insoles",
5
5
  "main": "./build/brilliantsole.module.js",
6
6
  "module": "./build/brilliantsole.module.js",
@@ -85,13 +85,18 @@ class NobleScanner extends BaseScanner {
85
85
  }
86
86
 
87
87
  let deviceType;
88
- const serviceData = noblePeripheral.advertisement.serviceData;
88
+ const { manufacturerData, serviceData } = noblePeripheral.advertisement;
89
+ if (manufacturerData) {
90
+ _console.log("manufacturerData", manufacturerData);
91
+ const deviceTypeEnum = manufacturerData.readUint8(0);
92
+ deviceType = DeviceTypes[deviceTypeEnum];
93
+ }
89
94
  if (serviceData) {
90
- //_console.log("serviceData", serviceData);
95
+ _console.log("serviceData", serviceData);
91
96
  const deviceTypeServiceData = serviceData.find((serviceDatum) => {
92
97
  return serviceDatum.uuid == serviceDataUUID;
93
98
  });
94
- //_console.log("deviceTypeServiceData", deviceTypeServiceData);
99
+ _console.log("deviceTypeServiceData", deviceTypeServiceData);
95
100
  if (deviceTypeServiceData) {
96
101
  const deviceTypeEnum = deviceTypeServiceData.data.readUint8(0);
97
102
  deviceType = DeviceTypes[deviceTypeEnum];