public void calculateChecksum (Patch p) { calculateChecksum (p,checksumStart,checksumEnd,checksumOffset);
public void calculateChecksum (Patch p,int start,int end,int ofs) { int i; int sum=0; ErrorMsg.reportStatus ("Driver:calcChecksum:1st byte is "+p.sysex[start]); ErrorMsg.reportStatus ("Last byte is "+p.sysex[end]); ErrorMsg.reportStatus ("Checksum was "+p.sysex[ofs]); for (i=start;i<=end;i++) sum+=p.sysex[i]; p.sysex[ofs]=(byte)(sum % 128); p.sysex[ofs]=(byte)(p.sysex[ofs]^127); p.sysex[ofs]=(byte)(p.sysex[ofs]+1); p.sysex[ofs]=(byte)(p.sysex[ofs]&127); ErrorMsg.reportStatus ("Checksum is now "+p.sysex[ofs]);
    public void calculateChecksum (Patch p)    { calculateChecksum (p,checksumStart,checksumEnd,checksumOffset);    }