function toAcceleration(byte) {
  var data = parseInt(byte,16);
  if(data > 127) {
    return (data - 256) / 64;
  }
  return data / 64;
}
/**
 * Convert the given twos complement hexadecimal string to acceleration in g.
 * @param {String} byte The acceleration data byte as a string.
 */
Convert the given twos complement hexadecimal string to acceleration in g.
@param {String} byte The acceleration data byte as a string.
Convert the given twos complement hexadecimal string to acceleration in g . @param { String } byte The acceleration data byte as a string .
function toAcceleration(byte) {
  var data = parseInt(byte,16);
  if(data > 127) {
    return (data - 256) / 64;
  }
  return data / 64;
}
function toAcceleration ( byte ) { var data = parseInt ( byte , 16 ) ; if ( data > 127 ) { return ( data - 256 ) / 64 ; } return data / 64 ; }
Convert the given twos complement hexadecimal string to acceleration in g.
 @param {String} byte The acceleration data byte as a string.
Convert the given twos complement hexadecimal string to acceleration in g . @param { String } byte The acceleration data byte as a string .