FreeCalypso > hg > freecalypso-sw
diff rvinterf/lowlevel/rvifmain.c @ 908:ed5dcc53e0b3
rvinterf: hook for fc-lcdemu implemented
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 07 Sep 2015 10:55:01 +0000 |
parents | 4423039aeb4b |
children | 16ed75e266f2 |
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvifmain.c Mon Sep 07 10:35:20 2015 +0000 +++ b/rvinterf/lowlevel/rvifmain.c Mon Sep 07 10:55:01 2015 +0000 @@ -17,6 +17,7 @@ extern int target_fd, listener; extern char *baudrate_name; +extern char *extlcd_program; extern u_char rxpkt[]; extern size_t rxpkt_len; @@ -43,7 +44,7 @@ fd_set fds; struct client *cli, **clip; - while ((c = getopt(argc, argv, "bB:d:l:ns:S:w:")) != EOF) + while ((c = getopt(argc, argv, "bB:d:l:ns:S:w:X:")) != EOF) switch (c) { case 'b': background++; @@ -69,6 +70,9 @@ case 'w': wakeup_after_sec = strtoul(optarg, 0, 0); continue; + case 'X': + extlcd_program = optarg; + continue; case '?': default: usage: fprintf(stderr, @@ -81,6 +85,8 @@ open_target_serial(argv[optind]); } max_fd = target_fd; + if (extlcd_program) + open_extlcd_pipe(); set_serial_nonblock(0); setlinebuf(stdout); @@ -182,10 +188,10 @@ case RVT_EXTUI_HEADER: if (rxpkt_len < 5 || !(rxpkt_len & 1)) goto unknown; - if (!no_output || logF) + if (extlcd_program) + output_to_extlcd(); + else report_extui_packet(); - if (client_head) - forward_nonrvt_pkt(); return; case '*': print_fc_lld_msg();