| 512 | } |
| 513 | |
| 514 | int main(int argc, char **argv) |
| 515 | { |
| 516 | unsigned char buf[BUFSIZE]; |
| 517 | int fd = openPort(argv[1]); |
| 518 | |
| 519 | printf("%s: %s\n", argv[0], rig_version()); |
| 520 | printf("x25/x26 command rejected\n"); |
| 521 | #if defined(WIN32) || defined(_WIN32) |
| 522 | |
| 523 | if (argc != 2) |
| 524 | { |
| 525 | printf("Missing comport argument\n"); |
| 526 | printf("%s [comport]\n", argv[0]); |
| 527 | exit(1); |
| 528 | } |
| 529 | |
| 530 | #endif |
| 531 | |
| 532 | while (1) |
| 533 | { |
| 534 | int len = frameGet(fd, buf); |
| 535 | |
| 536 | if (len <= 0) |
| 537 | { |
| 538 | close(fd); |
| 539 | fd = openPort(argv[1]); |
| 540 | } |
| 541 | |
| 542 | if (powerstat) |
| 543 | { |
| 544 | frameParse(fd, buf, len); |
| 545 | } |
| 546 | else |
| 547 | { |
| 548 | hl_usleep(1000 * 1000); |
| 549 | } |
| 550 | |
| 551 | rigStatus(); |
| 552 | } |
| 553 | |
| 554 | return 0; |
| 555 | } |
nothing calls this directly
no test coverage detected