process luxometer

This commit is contained in:
Martin Donnelly 2016-07-07 11:26:07 +01:00
parent fd09c21f8c
commit fb91be3c1f

View File

@ -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() {