Skip to content

Commit

Permalink
fix: demo: nameFromUUID spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
larsthorup committed Jul 20, 2021
1 parent 8cd0772 commit 166855d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 521 deletions.
2 changes: 1 addition & 1 deletion demo/DeviceListApp/src/shared/bleConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const characteristic = {
},
};

export const nameFromUuid = {
export const nameFromUUID = {
...(Object.fromEntries(Object.values(service).map((s) => [s.uuid, s.name]))),
...(Object.fromEntries(Object.values(characteristic).map((c) => [c.uuid, c.name]))),
};
1 change: 1 addition & 0 deletions demo/DeviceListRecorder/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gradle
android/app/src/main/assets/index.android.bundle
build/
node_modules/
output

This file was deleted.

2 changes: 2 additions & 0 deletions demo/DeviceListRecorder/artifact/deviceList.recording.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
"value": "Kg=="
},
"debug": {
"serviceUUID": "Battery Service",
"characteristicUUID": "Battery Level",
"value": "<Buffer 2a> '*'"
}
},
Expand Down
2 changes: 1 addition & 1 deletion demo/DeviceListRecorder/src/shared/bleConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const characteristic = {
},
};

export const nameFromUuid = {
export const nameFromUUID = {
...(Object.fromEntries(Object.values(service).map((s) => [s.uuid, s.name]))),
...(Object.fromEntries(Object.values(characteristic).map((c) => [c.uuid, c.name]))),
};
4 changes: 2 additions & 2 deletions demo/DeviceListRecorder/src/test/deviceList.recorder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect } from 'chai';
import { BleManager } from 'react-native-ble-plx';

import * as bleService from '../shared/bleService';
import { characteristic, nameFromUuid, service } from '../shared/bleConstants';
import { characteristic, nameFromUUID, service } from '../shared/bleConstants';

import { base64FromUint8, uint8FromBase64 } from '../shared/base64';
import { BleRecorder } from 'react-native-ble-plx-mock-recorder';
Expand Down Expand Up @@ -33,7 +33,7 @@ describe(recordingName, () => {
bleManager: new BleManager(),
recordingName,
deviceMap,
nameFromUuid,
nameFromUUID,
});
bleRecorder.spec.deviceScan = { keep: 1 };
bleManager = bleRecorder.bleManagerSpy;
Expand Down
Binary file modified media/ble-mock-recorder-diagram.odp
Binary file not shown.

0 comments on commit 166855d

Please sign in to comment.