diff options
author | Bdale Garbee <bdale@gag.com> | 2009-08-18 18:09:38 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2009-08-18 18:09:38 -0600 |
commit | 4685fc541466afbeefc151bcb64cd054739c048b (patch) | |
tree | d7e0f521bd51897a59dd9c355d74218132da4b75 /ao-view/aoview_main.c | |
parent | 1c2a0b6653623b689d68d7349a6b2dce3e20a4a6 (diff) | |
parent | c29275b72438637d46d7a50742882d2736eb176a (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Conflicts:
ao-tools/ao-bitbang/Makefile.am
ao-tools/ao-eeprom/Makefile.am
ao-tools/ao-load/Makefile.am
ao-tools/ao-load/ao-load.c
ao-tools/ao-rawload/Makefile.am
Diffstat (limited to 'ao-view/aoview_main.c')
-rw-r--r-- | ao-view/aoview_main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ao-view/aoview_main.c b/ao-view/aoview_main.c index 36a82e0e..64c1c027 100644 --- a/ao-view/aoview_main.c +++ b/ao-view/aoview_main.c @@ -32,29 +32,29 @@ static void destroy_event(GtkWidget *widget, gpointer data) } extern int _Xdebug; +char *aoview_tty = NULL; int main(int argc, char **argv) { GladeXML *xml = NULL; GtkWidget *mainwindow; - char *device = NULL; GtkAboutDialog *about_dialog; static struct option long_options[] = { - { "device", 1, 0, 'd'}, + { "tty", 1, 0, 'T'}, { "sync", 0, 0, 's'}, { 0, 0, 0, 0 } }; for (;;) { int c, temp; - c = getopt_long_only(argc, argv, "sd:", long_options, &temp); + c = getopt_long_only(argc, argv, "sT:", long_options, &temp); if (c == -1) break; switch (c) { - case 'd': - device = optarg; + case 'T': + aoview_tty = optarg; break; case 's': _Xdebug = 1; @@ -102,6 +102,12 @@ int main(int argc, char **argv) aoview_label_init(xml); + if (aoview_tty) { + if (!aoview_monitor_connect(aoview_tty)) { + perror(aoview_tty); + exit(1); + } + } aoview_voice_speak("rocket flight monitor ready\n"); gtk_main(); |