altoslib: Only list flight logs for boards that we know have them
authorKeith Packard <keithp@keithp.com>
Sat, 15 Dec 2012 03:27:56 +0000 (19:27 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 15 Dec 2012 03:27:56 +0000 (19:27 -0800)
Boards that don't have flight logs will generate a nice 'Syntax Error'
and fail to initialize.

Signed-off-by: Keith Packard <keithp@keithp.com>

altoslib/AltosConfigData.java

index 515ff48..758953e 100644 (file)
@@ -469,13 +469,15 @@ public class AltosConfigData implements Iterable<String> {
                reset();
                link.printf("c s\nf\nv\n");
                read_link(link, "software-version");
+               System.out.printf("Log format %d\n", log_format);
                switch (log_format) {
-               case AltosLib.AO_LOG_FORMAT_TELEMETRY:
-               case AltosLib.AO_LOG_FORMAT_TELESCIENCE:
-                       break;
-               default:
+               case AltosLib.AO_LOG_FORMAT_FULL:
+               case AltosLib.AO_LOG_FORMAT_TINY:
+               case AltosLib.AO_LOG_FORMAT_MEGAMETRUM:
                        link.printf("l\n");
                        read_link(link, "done");
+               default:
+                       break;
                }
        }