X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-view%2Faoview_main.c;h=64c1c0273a90c2c5e857af4b53d5fa07077a41db;hp=36a82e0e1212dc3da35006dc8e42708266495c51;hb=9b03d620722dc54630539afba40720c30de69b2d;hpb=7c790fe859dff062692964338091ffbbcdf63257;ds=sidebyside 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();