for (int i = 0; i < line_count; i++)
line = line + line_bytes[i];
}
- if (line.startsWith("VERSION")) {
+ if (line.startsWith("VERSION") || line.startsWith("CRC")) {
for (int e = 0; e < monitors.size(); e++) {
LinkedBlockingQueue<String> q = monitors.get(e);
q.put(line);
public void set_channel(int channel) {
if (altos != null) {
+ if (monitor_mode) {
+ printf("m 0\n");
+ flush_input();
+ }
+ printf("c r %d\n", channel);
if (monitor_mode)
- printf("m 0\nc r %d\nm 1\n", channel);
- else
- printf("c r %d\n", channel);
+ printf("m 1\n");
+ flush_input();
}
}
if (altos != null) {
if (monitor)
printf("m 1\n");
- else
+ else {
printf("m 0\n");
+ flush_input();
+ }
}
}