| 524 | } |
| 525 | |
| 526 | int main(int argc, char **argv) |
| 527 | { |
| 528 | unsigned char buf[BUFSIZE]; |
| 529 | int fd = openPort(argv[1]); |
| 530 | |
| 531 | printf("%s: %s\n", argv[0], rig_version()); |
| 532 | #ifdef X25 |
| 533 | printf("x25/x26 command recognized\n"); |
| 534 | #else |
| 535 | printf("x25/x26 command rejected\n"); |
| 536 | #endif |
| 537 | #if defined(WIN32) || defined(_WIN32) |
| 538 | |
| 539 | if (argc != 2) |
| 540 | { |
| 541 | printf("Missing comport argument\n"); |
| 542 | printf("%s [comport]\n", argv[0]); |
| 543 | exit(1); |
| 544 | } |
| 545 | |
| 546 | #endif |
| 547 | |
| 548 | while (1) |
| 549 | { |
| 550 | int len = frameGet(fd, buf); |
| 551 | |
| 552 | if (len <= 0) |
| 553 | { |
| 554 | close(fd); |
| 555 | fd = openPort(argv[1]); |
| 556 | } |
| 557 | |
| 558 | if (powerstat) |
| 559 | { |
| 560 | frameParse(fd, buf, len); |
| 561 | } |
| 562 | else |
| 563 | { |
| 564 | hl_usleep(1000 * 1000); |
| 565 | } |
| 566 | |
| 567 | rigStatus(); |
| 568 | } |
| 569 | |
| 570 | return 0; |
| 571 | } |
nothing calls this directly
no test coverage detected