function processSensors(advertiserData) {
  var sensors = {};
  var data = advertiserData.manufacturerSpecificData.data;

  var status = data.substr(2,1);
  sensors.motion = ((status & 0x1) === 0x01);
  sensors.temperature = toTemperature(data.substr(4,2) + data.substr(3,1));
  sensors.accelerationX = toAcceleration(data.substr(6,2));
  sensors.accelerationY = toAcceleration(data.substr(8,2));
  sensors.accelerationZ = toAcceleration(data.substr(10,2));

  advertiserData.manufacturerSpecificData.sensors = sensors;
}
/**
 * Parse Motsai manufacturer specific data.
 * @param {Object} advertiserData The object containing all parsed data.
 */
Parse Motsai manufacturer specific data.
@param {Object} advertiserData The object containing all parsed data.
Parse Motsai manufacturer specific data . @param { Object } advertiserData The object containing all parsed data .
function processSensors(advertiserData) {
  var sensors = {};
  var data = advertiserData.manufacturerSpecificData.data;
  var status = data.substr(2,1);
  sensors.motion = ((status & 0x1) === 0x01);
  sensors.temperature = toTemperature(data.substr(4,2) + data.substr(3,1));
  sensors.accelerationX = toAcceleration(data.substr(6,2));
  sensors.accelerationY = toAcceleration(data.substr(8,2));
  sensors.accelerationZ = toAcceleration(data.substr(10,2));
  advertiserData.manufacturerSpecificData.sensors = sensors;
}
function processSensors ( advertiserData ) { var sensors = { } ; var data = advertiserData . manufacturerSpecificData . data ; var status = data . substr ( 2 , 1 ) ; sensors . motion = ( ( status & 0x1 ) === 0x01 ) ; sensors . temperature = toTemperature ( data . substr ( 4 , 2 ) + data . substr ( 3 , 1 ) ) ; sensors . accelerationX = toAcceleration ( data . substr ( 6 , 2 ) ) ; sensors . accelerationY = toAcceleration ( data . substr ( 8 , 2 ) ) ; sensors . accelerationZ = toAcceleration ( data . substr ( 10 , 2 ) ) ; advertiserData . manufacturerSpecificData . sensors = sensors ; }
Parse Motsai manufacturer specific data.
Parse Motsai manufacturer specific data .