X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosLink.java;h=cd8609c037a00dac6d81eddde1c0ce806ddca80d;hb=f078235803a80403014b3e54039fd2d0e0704367;hp=d3c178b7a6e6a095634ba35bd0fafe70dd64647c;hpb=21d176f161b90f18f236ef887cef9676d712eee3;p=fw%2Faltos diff --git a/altoslib/AltosLink.java b/altoslib/AltosLink.java index d3c178b7..cd8609c0 100644 --- a/altoslib/AltosLink.java +++ b/altoslib/AltosLink.java @@ -170,8 +170,8 @@ public abstract class AltosLink implements Runnable { boolean can_cancel = can_cancel_reply(); String reply = null; - if (!can_cancel && remote) - System.out.printf("Uh-oh, reading remote serial device from swing thread\n"); +// if (!can_cancel && remote) +// System.out.printf("Uh-oh, reading remote serial device from swing thread\n"); if (remote && can_cancel) { timeout = 500; @@ -539,15 +539,15 @@ public abstract class AltosLink implements Runnable { if (config_data.has_monitor_battery()) { try { - String[] items = adc(); - for (int i = 0; i < items.length;) { - if (items[i].equals("batt")) { - monitor_batt = Integer.parseInt(items[i+1]); - i += 2; - continue; + String[] items = adc(); + for (int i = 0; i < items.length;) { + if (items[i].equals("batt")) { + monitor_batt = Integer.parseInt(items[i+1]); + i += 2; + continue; + } + i++; } - i++; - } } catch (TimeoutException te) { } }