-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (23 loc) · 996 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module.exports = {
methods: {
on: function (periph) {
var value = new Buffer([0x41, 0x54, 0x43, 0x50, 0x00, 0x01, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x87, 0x12, 0x8d, 0x01, 0x00, 0x00, 0x00]);
periph.write('0xf110', '0xf111', value);
},
off: function (periph) {
var value = new Buffer([0x41, 0x54, 0x43, 0x50, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x87, 0x12, 0x8d, 0x01, 0x00, 0x00, 0x00]);
periph.write('0xf110', '0xf111', value);
}
},
examine: function (periph, basicInfo) {
var isMine = false;
if (basicInfo.manufacturer === 'reIDEA' &&
basicInfo.devName === 'bPoint_Plug' &&
basicInfo.model === 'bPoint001' &&
basicInfo.fwRev === 'bPointFW V1503.04' &&
basicInfo.hwRev === 'Hardware Revision' &&
basicInfo.swRev === 'Software Revision')
isMine = true;
return isMine;
}
};