X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Fao-postflight%2Fao-postflight.c;h=ed91be15a40e9f62011d587bb39c7bff59271e25;hp=7cedaa5b79ecb0cd36b42e5001ebfbc06de808b4;hb=1e7fb61700f1f6f2ed5fdbc4380d7187b0cd187b;hpb=199f0cecae22645140185238682b9e1aba0e5715 diff --git a/ao-tools/ao-postflight/ao-postflight.c b/ao-tools/ao-postflight/ao-postflight.c index 7cedaa5b..ed91be15 100644 --- a/ao-tools/ao-postflight/ao-postflight.c +++ b/ao-tools/ao-postflight/ao-postflight.c @@ -451,12 +451,14 @@ static const struct option options[] = { { .name = "raw", .has_arg = 2, .val = 'r' }, { .name = "gps", .has_arg = 2, .val = 'g' }, { .name = "kml", .has_arg = 2, .val = 'k' }, + { .name = "all", .has_arg = 0, .val = 'a' }, { 0, 0, 0, 0}, }; static void usage(char *program) { fprintf(stderr, "usage: %s\n" + "\t[--all] [-a]\n" "\t[--summary=] [-s ]\n" "\t[--detail=]\n" "\t[--raw= -r serial) raw->serial = serial; - analyse_flight(raw, summary_file, detail_file, raw_file, plot_name, gps_file, kml_file); + analyse_flight(raw, summary_file, detail_file, raw_file, this_plot_name, gps_file, kml_file); cc_flightraw_free(raw); if (has_summary && !summary_name) { fclose(summary_file); summary_file = NULL; @@ -606,7 +618,10 @@ main (int argc, char **argv) if (has_detail && !detail_name) { fclose(detail_file); detail_file = NULL; } - if (has_summary && !raw_name) { + if (this_plot_name && this_plot_name != plot_name) { + free (this_plot_name); this_plot_name = NULL; + } + if (has_raw && !raw_name) { fclose(raw_file); raw_file = NULL; } if (has_gps && !gps_name) {