Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1689 → Rev 1688

/dongfang_FC_rewrite_tool/src/dongfang/mkt/comm/MKInputStream.java
264,8 → 264,6
case 'M': {
WriteMotorMixerResponseFrame f = new WriteMotorMixerResponseFrame(address);
f.setWasAccepted(base64InputStream.readByte() != 0);
result = f;
break;
}
case 'N': {
int numMotors = 12;
273,21 → 271,18
f.setConfigurationVersion(base64InputStream.readByte());
int length = base64InputStream.readByte();
f.setDataLength(length);
int testLength = 12; // the name is first!
char[] name = base64InputStream.readChars(12);
f.setName(name);
int testLength = 0;
int[][] matrix = new int[numMotors][];
for(int i=0; i<numMotors; i++) {
int[] row = new int[5];
matrix[i] = row;
for(int j=0; j<5; j++) {
row[j] = base64InputStream.readSignedByte();
int[] row = new int[4];
for(int j=0; j<4; j++) {
matrix[i][j] = base64InputStream.readByte();
testLength++;
}
}
if (length != testLength)
throw new IOException("Length of motor mixer data was not as expected (" + testLength + " vs. " + length + ").");
throw new IOException("Length of motor mixer data was not as expected.");
/*
int[] opposite = new int[numMotors];
for(int i=0; i<numMotors; i++) {
294,9 → 289,10
opposite[i] = base64InputStream.readByte();
}
*/
f.setMatrix(matrix);
 
result = f;
break;
}
case 'O': {
OSDDataResponseFrame f = new OSDDataResponseFrame(address);