Skip to content

Commit 856ff29

Browse files
committed
Fix setting antenna number 3 for Yaesu FTDX3000
The argument ant_t ant is a bit mask, not a scalar. Also use the defines instead of magic naumbers.
1 parent 93a2435 commit 856ff29

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rigs/yaesu/ft3000.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,21 @@ static int ft3000_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
155155

156156
switch (ant)
157157
{
158-
case 1:
158+
case RIG_ANT_1:
159159
cmd = "AN01;"; // R3/1 ANT1/ANT3
160160
break;
161161

162-
case 2:
162+
case RIG_ANT_2:
163163
cmd = "AN02;"; // RE/2 ANT2/ANT3
164164
break;
165165

166-
case 3:
166+
case RIG_ANT_3:
167167
cmd = "AN03;"; // TRX ANT3
168168
break;
169169

170170
default:
171-
rig_debug(RIG_DEBUG_ERR, "%s: expected 1,2,3 got %u\n", __func__, ant);
171+
rig_debug(RIG_DEBUG_ERR, "%s: expected one of %u,%u,%u got %u\n", __func__,
172+
RIG_ANT_1, RIG_ANT_2, RIG_ANT_3, ant);
172173
RETURNFUNC(-RIG_EINVAL);
173174
}
174175

0 commit comments

Comments
 (0)