Commit f238d407 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Handle more than 7 channels

parent 64da2a2f
......@@ -73,16 +73,9 @@ void *Reader(void *argument) {
// Currently unused
} break;
}
} else {
switch (channel) {
case 0:{ printf("I0=%3d ", value); } break;
case 1:{ printf("I1=%3d ", value); } break;
case 2:{ printf("I2=%3d ", value); } break;
case 3:{ printf("I3=%3d ", value); } break;
case 4:{ printf("I4=%3d ", value); } break;
case 5:{ printf("I5=%3d ", value); } break;
case 6:{ printf("I6=%3d ", value); } break;
case 31:{
} else if (channel < 31) {
printf("I%d=%3d ", channel, value);
} else if (channel == 31) {
int kind = (value>>5)& 0x7;
int cmd = (value>>8)& 0x3;
int conf_channel = value & 0x1f;
......@@ -122,11 +115,6 @@ void *Reader(void *argument) {
case 2: { printf("max %d\n", millivolts(value>>10)); } break;
default: { printf("cmd %d %d\n", cmd, (value>>10)); } break;
}
} break;
default: {
printf("%d=%x (%d)\n", channel, value, length);
} break;
}
}
value = 0;
length = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment