Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1688 → Rev 1689

/dongfang_FC_rewrite_tool/src/dongfang/mkt/comm/MKOutputStream.java
39,6 → 39,11
inbuf[inbufptr++] = b;
}
 
void writeSignedByte(int b) throws IOException {
if (b<0) b+= 256;
writeByte(b);
}
 
public void writeBytes(int[] bs) throws IOException {
for (int i=0; i<bs.length; i++)
writeByte(bs[i]);
171,13 → 176,16
 
public void visit(WriteMotorMixerRequestFrame f) throws IOException {
writeByte('m');
writeByte(f.getConfigurationVersion());
writeByte(f.getDataLength());
base64OutputStream.writeByte(f.getMotorMixerVersionNumber());
base64OutputStream.writeByte(f.getDataLength());
base64OutputStream.writeChars(f.getName());
for(int i=0; i<f.getMatrix().length; i++) {
int[] row = f.getMatrix()[i];
for(int j=0; j<row.length; j++) {
base64OutputStream.writeByte(row[j]);
base64OutputStream.writeSignedByte(row[j]);
//System.out.print(row[j] + " ");
}
//System.out.println();
}
/*
for(int i=0; i<f.getOppositeMotors().length; i++) {