| 470 | } |
| 471 | |
| 472 | int main(int argc, char **argv) |
| 473 | { |
| 474 | unsigned char buf[BUFSIZE]; |
| 475 | int fd = openPort(argv[1]); |
| 476 | |
| 477 | printf("%s: %s\n", argv[0], rig_version()); |
| 478 | printf("x25/x26 command rejected\n"); |
| 479 | #if defined(WIN32) || defined(_WIN32) |
| 480 | |
| 481 | if (argc != 2) |
| 482 | { |
| 483 | printf("Missing comport argument\n"); |
| 484 | printf("%s [comport]\n", argv[0]); |
| 485 | exit(1); |
| 486 | } |
| 487 | |
| 488 | #endif |
| 489 | |
| 490 | while (1) |
| 491 | { |
| 492 | int len = frameGet(fd, buf); |
| 493 | |
| 494 | if (len <= 0) |
| 495 | { |
| 496 | close(fd); |
| 497 | fd = openPort(argv[1]); |
| 498 | } |
| 499 | |
| 500 | if (powerstat) |
| 501 | { |
| 502 | frameParse(fd, buf, len); |
| 503 | } |
| 504 | else |
| 505 | { |
| 506 | hl_usleep(1000 * 1000); |
| 507 | } |
| 508 | |
| 509 | rigStatus(); |
| 510 | } |
| 511 | |
| 512 | return 0; |
| 513 | } |
nothing calls this directly
no test coverage detected