lib/znp/ZNPSerial.js
function calculateFCS(buffer) {
  var fcs = 0;

  for (var i = 0; i < buffer.length; i++) {
    fcs ^= buffer[i];
  }

  return fcs;
}
function calculateFCS(buffer) {
  var fcs = 0;

  for (var i = 0; i < buffer.length; i++) {
    fcs ^= buffer[i];
  }

  return fcs;
}
function calculateFCS ( buffer ) { var fcs = 0 ; for ( var i = 0 ; i < buffer . length ; i ++ ) { fcs ^= buffer [ i ] ; } return fcs ; }
Calculates the FCS for a given buffer.
@param  {Buffer} buffer
@return {Integer} FCS
Calculates the FCS for a given buffer .