Skip to content

Commit

Permalink
Merge branch 'chars'
Browse files Browse the repository at this point in the history
  • Loading branch information
jones139 committed Oct 4, 2023
2 parents dd1b52e + 35f8646 commit d12722d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion apps/openseizure/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
0.06: Changed heart rate characteristic to use the official UUIDs.
0.07: Removed OSD HR Char
0.08: Changed OSD UUIDs
0.09: Added lwatch ID char.
0.09: Added watch ID char.
0.10: Added watch FW version char
0.11: Moved FW version to const to make it easier to change
2 changes: 1 addition & 1 deletion apps/openseizure/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "openseizure",
"name": "OpenSeizureDetector Widget",
"shortName": "OSD",
"version": "0.09",
"version": "0.11",
"description": "[BETA!] A widget to work alongside [OpenSeizureDetector](https://www.openseizuredetector.org.uk/)",
"icon": "widget.png",
"type": "widget",
Expand Down
17 changes: 13 additions & 4 deletions apps/openseizure/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
* 03 Oct 2023 - Graham Jones: Added heart rate data service
*/

const WATCH_FW = "0.11";
const WATCH_ID = "BangleJs";

const SERV_OSD = "000085e9-0000-1000-8000-00805f9b34fb";
const CHAR_OSD_ACC_DATA = "000085e9-0001-1000-8000-00805f9b34fb";
const CHAR_OSD_BAT_DATA = "000085e9-0002-1000-8000-00805f9b34fb";
const CHAR_OSD_WATCH_ID = "000085e9-0003-1000-8000-00805f9b34fb";
const CHAR_OSD_WATCH_FW = "000085e9-0004-1000-8000-00805f9b34fb";

// Official BLE UUIDs from https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Assigned_Numbers.pdf
// Also based on bootgathrm bangle app.
Expand Down Expand Up @@ -100,10 +104,14 @@ const CHAR_HR_LOC = 0x2A38; // Official BLE Sensor Location UUID
notify : true
};
var charOsdWatchId = {
value : "BangleJs",
maxLen : 20,
readable : true,
notify : true
value : WATCH_ID,
maxLen : 10,
readable : true
};
var charOsdWatchFw = {
value : WATCH_FW,
maxLen : 8,
readable : true
};
var charBleHrm = {
value : [0x06, 0], // Check what 0x06 is?
Expand All @@ -118,6 +126,7 @@ const CHAR_HR_LOC = 0x2A38; // Official BLE Sensor Location UUID
servOsd[CHAR_OSD_ACC_DATA] = charOsdAccData;
servOsd[CHAR_OSD_BAT_DATA] = charOsdBatData;
servOsd[CHAR_OSD_WATCH_ID] = charOsdWatchId;
servOsd[CHAR_OSD_WATCH_FW] = charOsdWatchFw;
var servHrm = {};
servHrm[CHAR_HRM] = charBleHrm;
servHrm[CHAR_HR_LOC] = charBleHrLoc;
Expand Down

0 comments on commit d12722d

Please sign in to comment.