code: private static byte calculateLRC(byte[] data, int off, int length, int tailskip) {
          int lrc = 0;
          for (int i = off; i < length - tailskip; i++) {
              lrc += ((int) data[i]) & 0xFF;
          }
          return (byte) ((-lrc) & 0xff);
      }
docs: Calculates a LRC checksum
  
  @param data     Data to use
  @param off      Offset into byte array
  @param length   Number of bytes to use
  @param tailskip Bytes to skip at tail
  @return Checksum