mirror of
https://gitlab.silvrtree.co.uk/martind2000/censis-archive.git
synced 2025-02-10 23:09:16 +00:00
”2016-06-29”
This commit is contained in:
parent
f69c53bfde
commit
ec5ec939fc
@ -19,7 +19,10 @@ var DEVICEINFO = function(p) {
|
||||
service: '180A', manufacturer_name_string: '2A29', model_number_string: '2A24', system_id: '2A23',
|
||||
};
|
||||
|
||||
|
||||
this.data = {
|
||||
manufacturerName: '',
|
||||
modelNumber: ''
|
||||
};
|
||||
|
||||
this.onSystemID = function(data) {
|
||||
'use strict';
|
||||
@ -28,7 +31,9 @@ var DEVICEINFO = function(p) {
|
||||
|
||||
this.onModelNumberString = function(data) {
|
||||
'use strict';
|
||||
this.readRaw('ModelNumberString', data);
|
||||
var a = new Uint8Array(data);
|
||||
this.data.modelNumber = this.arrayToAscii(a);
|
||||
console.log('Model Number', this.data.modelNumber);
|
||||
};
|
||||
|
||||
|
||||
@ -51,9 +56,6 @@ var DEVICEINFO = function(p) {
|
||||
this.onError);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
this.startService = function() {
|
||||
'use strict';
|
||||
if (this.deviceID !== null) {
|
||||
|
@ -19,25 +19,82 @@ var GENERICACCESS = function(p) {
|
||||
};
|
||||
|
||||
this.data = {
|
||||
ppcp: {
|
||||
min_conn_int: 0,
|
||||
max_conn_int: 0,
|
||||
slave_latency: 0,
|
||||
conn_super_timout_multi: 0
|
||||
}
|
||||
};
|
||||
deviceName: '',
|
||||
appearance: '',
|
||||
ppcp: {
|
||||
min_conn_int: 0,
|
||||
max_conn_int: 0,
|
||||
slave_latency: 0,
|
||||
conn_super_timeout_multi: 0
|
||||
}
|
||||
};
|
||||
|
||||
this.appearance_category = {
|
||||
0: 'Unknown None',
|
||||
64: 'Generic Phone',
|
||||
128: 'Generic Computer ',
|
||||
192: 'Generic Watch ',
|
||||
193: 'Watch: Sports Watch ',
|
||||
256: 'Generic Clock ',
|
||||
320: 'Generic Display ',
|
||||
384: 'Generic Remote Control ',
|
||||
448: 'Generic Eye-glasses ',
|
||||
512: 'Generic Tag ',
|
||||
576: 'Generic Keyring ',
|
||||
640: 'Generic Media Player ',
|
||||
704: 'Generic Barcode Scanner ',
|
||||
768: 'Generic Thermometer ',
|
||||
769: 'Thermometer: Ear ',
|
||||
832: 'Generic Heart rate Sensor ',
|
||||
833: 'Heart Rate Sensor: Heart Rate Belt ',
|
||||
896: 'Generic Blood Pressure ',
|
||||
897: 'Blood Pressure: Arm Blood ',
|
||||
898: 'Blood Pressure: Wrist Blood ',
|
||||
960: 'Human Interface Device (HID) ',
|
||||
961: 'Keyboard ',
|
||||
962: 'Mouse ',
|
||||
963: 'Joystick ',
|
||||
964: 'Gamepad ',
|
||||
965: 'Digitizer Tablet ',
|
||||
966: 'Card Reader ',
|
||||
967: 'Digital Pen ',
|
||||
968: 'Barcode Scanner ',
|
||||
1024: 'Generic Glucose Meter ',
|
||||
1088: 'Generic: Running Walking Sensor ',
|
||||
1089: 'Running Walking Sensor: In-Shoe Running ',
|
||||
1090: 'Running Walking Sensor: On-Shoe Running ',
|
||||
1091: 'Running Walking Sensor: On-Hip Running ',
|
||||
1152: 'Generic: Cycling ',
|
||||
1153: 'Cycling: Cycling Computer ',
|
||||
1154: 'Cycling: Speed Sensor ',
|
||||
1155: 'Cycling: Cadence Sensor ',
|
||||
1156: 'Cycling: Power Sensor ',
|
||||
1157: 'Cycling: Speed and Cadence Sensor ',
|
||||
3136: 'Generic: Pulse Oximeter ',
|
||||
3137: 'Fingertip ',
|
||||
3138: 'Wrist Worn ',
|
||||
3200: 'Generic: Weight Scale ',
|
||||
5184: 'Generic: Outdoor Sports Activity ',
|
||||
5185: 'Location Display Device ',
|
||||
5186: 'Location and Navigation Display Device ',
|
||||
5187: 'Location Pod ',
|
||||
5188: 'Location and Navigation Pod '
|
||||
};
|
||||
|
||||
this.onDeviceName = function(data) {
|
||||
this.readRaw('DeviceName', data);
|
||||
var a = new Uint8Array(data);
|
||||
this.data.deviceName = this.arrayToAscii(a);
|
||||
console.log('Device Name', this.data.deviceName);
|
||||
};
|
||||
|
||||
this.onAppearance = function(data) {
|
||||
this.readRaw('Appearance', data);
|
||||
var a = new Uint16Array(data);
|
||||
var id = a[0];
|
||||
this.data.appearance = this.appearance_category[id];
|
||||
console.log('Appearance', this.data.appearance);
|
||||
};
|
||||
|
||||
this.onPPCP = function(data) {
|
||||
this.readRaw('PPCP', data);
|
||||
|
||||
var a = new Uint16Array(data);
|
||||
|
||||
this.data = {
|
||||
@ -45,11 +102,11 @@ var GENERICACCESS = function(p) {
|
||||
min_conn_int: (a[0] * 1.25),
|
||||
max_conn_int: (a[1] * 1.25),
|
||||
slave_latency: a[2],
|
||||
conn_super_timout_multi: a[3]
|
||||
conn_super_timeout_multi: a[3]
|
||||
}
|
||||
};
|
||||
|
||||
console.log(id, this.data.ppcp);
|
||||
console.log('PPCP', this.data.ppcp);
|
||||
};
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -19,7 +19,10 @@ var DEVICEINFO = function(p) {
|
||||
service: '180A', manufacturer_name_string: '2A29', model_number_string: '2A24', system_id: '2A23',
|
||||
};
|
||||
|
||||
|
||||
this.data = {
|
||||
manufacturerName: '',
|
||||
modelNumber: ''
|
||||
};
|
||||
|
||||
this.onSystemID = function(data) {
|
||||
'use strict';
|
||||
@ -28,7 +31,9 @@ var DEVICEINFO = function(p) {
|
||||
|
||||
this.onModelNumberString = function(data) {
|
||||
'use strict';
|
||||
this.readRaw('ModelNumberString', data);
|
||||
var a = new Uint8Array(data);
|
||||
this.data.modelNumber = this.arrayToAscii(a);
|
||||
console.log('Model Number', this.data.modelNumber);
|
||||
};
|
||||
|
||||
|
||||
@ -51,9 +56,6 @@ var DEVICEINFO = function(p) {
|
||||
this.onError);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
this.startService = function() {
|
||||
'use strict';
|
||||
if (this.deviceID !== null) {
|
||||
|
Loading…
Reference in New Issue
Block a user