| 798 | } |
| 799 | |
| 800 | int main(int argc, char **argv) |
| 801 | { |
| 802 | unsigned char buf[BUFSIZE]; |
| 803 | int fd = openPort(argv[1]); |
| 804 | |
| 805 | printf("%s: %s\n", argv[0], rig_version()); |
| 806 | printf("x25/x26 command rejected\n"); |
| 807 | #if defined(WIN32) || defined(_WIN32) |
| 808 | |
| 809 | if (argc != 2) |
| 810 | { |
| 811 | printf("Missing comport argument\n"); |
| 812 | printf("%s [comport]\n", argv[0]); |
| 813 | exit(1); |
| 814 | } |
| 815 | |
| 816 | #endif |
| 817 | |
| 818 | while (1) |
| 819 | { |
| 820 | int len = frameGet(fd, buf); |
| 821 | |
| 822 | if (len <= 0) |
| 823 | { |
| 824 | close(fd); |
| 825 | fd = openPort(argv[1]); |
| 826 | } |
| 827 | |
| 828 | if (powerstat) |
| 829 | { |
| 830 | frameParse(fd, buf, len); |
| 831 | } |
| 832 | else |
| 833 | { |
| 834 | hl_usleep(1000 * 1000); |
| 835 | } |
| 836 | |
| 837 | rigStatus(); |
| 838 | } |
| 839 | |
| 840 | return 0; |
| 841 | } |
nothing calls this directly
no test coverage detected