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

Function init_chan

rigs/dummy/dummy.c:148–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146/********************************************************************/
147
148static void init_chan(RIG *rig, vfo_t vfo, channel_t *chan)
149{
150 chan->channel_num = 0;
151 chan->vfo = vfo;
152 strcpy(chan->channel_desc, rig_strvfo(vfo));
153
154 switch (vfo)
155 {
156 case RIG_VFO_A:
157 case RIG_VFO_MAIN_A:
158 chan->freq = MHz(145);
159 break;
160
161 case RIG_VFO_B:
162 case RIG_VFO_MAIN_B:
163 chan->freq = MHz(146);
164 break;
165
166 case RIG_VFO_SUB_A:
167 chan->freq = MHz(147);
168 break;
169
170 case RIG_VFO_SUB_B:
171 chan->freq = MHz(148);
172 break;
173
174 case RIG_VFO_C:
175 chan->freq = MHz(149);
176 break;
177
178 default:
179 rig_debug(RIG_DEBUG_ERR, "%s(%d) unknown vfo=%s\n", __FILE__, __LINE__,
180 rig_strvfo(vfo));
181 }
182
183 chan->mode = RIG_MODE_FM;
184 chan->width = rig_passband_normal(rig, RIG_MODE_FM);
185 chan->tx_freq = chan->freq;
186 chan->tx_mode = chan->mode;
187 chan->tx_width = chan->width;
188 chan->split = RIG_SPLIT_OFF;
189 chan->tx_vfo = vfo;
190
191 chan->rptr_shift = RIG_RPT_SHIFT_NONE;
192 chan->rptr_offs = 0;
193 chan->ctcss_tone = 0;
194 chan->dcs_code = 0;
195 chan->ctcss_sql = 0;
196 chan->dcs_sql = 0;
197 chan->rit = 0;
198 chan->xit = 0;
199 chan->tuning_step = 0;
200 chan->ant = RIG_ANT_NONE;
201
202 chan->funcs = (setting_t)0;
203 memset(chan->levels, 0, RIG_SETTING_MAX * sizeof(value_t));
204}
205

Callers 1

dummy_initFunction · 0.70

Calls 3

rig_strvfoFunction · 0.85
rig_debugFunction · 0.85
rig_passband_normalFunction · 0.85

Tested by

no test coverage detected