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