mirror of
https://gitlab.silvrtree.co.uk/martind2000/bluetest.git
synced 2025-01-26 20:56:17 +00:00
process luxometer
This commit is contained in:
parent
fd09c21f8c
commit
fb91be3c1f
12
lib/index.js
12
lib/index.js
@ -31,10 +31,12 @@ bluetest = module.exports = function(options) {
|
||||
var p = data.lastIndexOf(10);
|
||||
var l = data.length - (p + 1);
|
||||
|
||||
var _data = data.toString('ascii',p + 1, l);
|
||||
logger.debug(data);
|
||||
logger.debug(_data);
|
||||
var wH = _data.slice(-5).split(' ');
|
||||
//var _data = data.toString('ascii',p + 1, l);
|
||||
var _data = data.toString('ascii');
|
||||
logger.debug('buffer:', data);
|
||||
logger.debug('ascii:', _data);
|
||||
|
||||
/* var wH = _data.slice(-5).split(' ');
|
||||
var wB = [];
|
||||
wB[0] = parseInt(wH[0], 16);
|
||||
wB[1] = parseInt(wH[1], 16);
|
||||
@ -54,7 +56,7 @@ bluetest = module.exports = function(options) {
|
||||
lux = m * (0.01 * Math.pow(2.0, e));
|
||||
|
||||
logger.info('Lux: ', lux);
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
core.enableLuxNotification = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user