MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / dummy_set_split_vfo

Function dummy_set_split_vfo

rigs/dummy/dummy.c:1137–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135}
1136
1137static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
1138{
1139 struct dummy_priv_data *priv = (struct dummy_priv_data *)STATE(rig)->priv;
1140
1141 ENTERFUNC;
1142 rig_debug(RIG_DEBUG_VERBOSE, "%s: split=%d, vfo=%s, tx_vfo=%s\n",
1143 __func__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo));
1144
1145 switch (split)
1146 {
1147 case RIG_SPLIT_OFF:
1148 priv->split = RIG_SPLIT_OFF;
1149 break;
1150
1151 case RIG_SPLIT_ON:
1152 priv->split = RIG_SPLIT_ON;
1153 break;
1154
1155 default:
1156 rig_debug(RIG_DEBUG_ERR, "%s: unsupported split %d", __func__, split);
1157 RETURNFUNC(-RIG_EINVAL);
1158 }
1159
1160 if (tx_vfo == RIG_VFO_NONE || tx_vfo == RIG_VFO_CURR) { tx_vfo = priv->curr_vfo; }
1161
1162 if (tx_vfo == RIG_VFO_CURR || tx_vfo == RIG_VFO_TX) { tx_vfo = vfo_fixup(rig, vfo, CACHE(rig)->split); }
1163
1164 priv->tx_vfo = tx_vfo;
1165
1166 RETURNFUNC(RIG_OK);
1167}
1168
1169
1170static int dummy_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,

Callers

nothing calls this directly

Calls 3

rig_debugFunction · 0.85
rig_strvfoFunction · 0.85
vfo_fixupFunction · 0.85

Tested by

no test coverage detected