| 1675 | } |
| 1676 | |
| 1677 | static int netrigctl_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, |
| 1678 | pbwidth_t *tx_width) |
| 1679 | { |
| 1680 | int ret; |
| 1681 | char cmd[CMD_MAX]; |
| 1682 | char buf[BUF_MAX]; |
| 1683 | char vfostr[16] = ""; |
| 1684 | |
| 1685 | rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 1686 | |
| 1687 | ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A); |
| 1688 | |
| 1689 | if (ret != RIG_OK) { return ret; } |
| 1690 | |
| 1691 | SNPRINTF(cmd, sizeof(cmd), "x%s\n", vfostr); |
| 1692 | |
| 1693 | ret = netrigctl_transaction(rig, cmd, strlen(cmd), buf); |
| 1694 | |
| 1695 | if (ret <= 0) |
| 1696 | { |
| 1697 | return (ret < 0) ? ret : -RIG_EPROTO; |
| 1698 | } |
| 1699 | |
| 1700 | if (buf[ret - 1] == '\n') { buf[ret - 1] = '\0'; } /* chomp */ |
| 1701 | |
| 1702 | *tx_mode = rig_parse_mode(buf); |
| 1703 | |
| 1704 | ret = read_string(RIGPORT(rig), (unsigned char *) buf, BUF_MAX, "\n", 1, |
| 1705 | 0, 1); |
| 1706 | |
| 1707 | if (ret <= 0) |
| 1708 | { |
| 1709 | return (ret < 0) ? ret : -RIG_EPROTO; |
| 1710 | } |
| 1711 | |
| 1712 | *tx_width = atoi(buf); |
| 1713 | |
| 1714 | return RIG_OK; |
| 1715 | } |
| 1716 | |
| 1717 | static int netrigctl_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, |
| 1718 | vfo_t tx_vfo) |
nothing calls this directly
no test coverage detected