| 727 | } |
| 728 | |
| 729 | int main(int argc, char **argv) |
| 730 | { |
| 731 | unsigned char buf[BUFSIZE]; |
| 732 | int fd = openPort(argv[1]); |
| 733 | |
| 734 | printf("%s: %s\n", argv[0], rig_version()); |
| 735 | #ifdef X25 |
| 736 | printf("x25/x26 command recognized\n"); |
| 737 | #else |
| 738 | printf("x25/x26 command rejected\n"); |
| 739 | #endif |
| 740 | #if defined(WIN32) || defined(_WIN32) |
| 741 | |
| 742 | if (argc != 2) |
| 743 | { |
| 744 | printf("Missing comport argument\n"); |
| 745 | printf("%s [comport]\n", argv[0]); |
| 746 | exit(1); |
| 747 | } |
| 748 | |
| 749 | #endif |
| 750 | |
| 751 | while (1) |
| 752 | { |
| 753 | int len = frameGet(fd, buf); |
| 754 | printf("#1 ========================================\n"); |
| 755 | |
| 756 | if (len <= 0) |
| 757 | { |
| 758 | printf("#2 ========================================"); |
| 759 | close(fd); |
| 760 | fd = openPort(argv[1]); |
| 761 | } |
| 762 | |
| 763 | if (powerstat) |
| 764 | { |
| 765 | frameParse(fd, buf, len); |
| 766 | } |
| 767 | else |
| 768 | { |
| 769 | hl_usleep(100 * 1000); |
| 770 | } |
| 771 | |
| 772 | printf("#3 ========================================"); |
| 773 | rigStatus(); |
| 774 | printf("#3 ========================================"); |
| 775 | } |
| 776 | |
| 777 | return 0; |
| 778 | } |
nothing calls this directly
no test coverage detected