Skip to content

Commit c345e04

Browse files
authored
Set speed for serial rigs only (Tlf#481)
1 parent 31f076b commit c345e04

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/sendqrg.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,18 @@ int init_tlf_rig(void) {
124124
return -1;
125125
}
126126

127-
snprintf(speed_string, sizeof speed_string, "%d", serial_rate);
128-
retcode = rig_set_conf(my_rig, rig_token_lookup(my_rig, "serial_speed"),
129-
speed_string);
127+
caps = my_rig->caps;
130128

131-
if (retcode != RIG_OK) {
132-
showmsg("Speed not accepted!");
133-
return -1;
134-
}
129+
if (caps->port_type == RIG_PORT_SERIAL) {
130+
snprintf(speed_string, sizeof speed_string, "%d", serial_rate);
131+
retcode = rig_set_conf(my_rig, rig_token_lookup(my_rig, "serial_speed"),
132+
speed_string);
135133

136-
caps = my_rig->caps;
134+
if (retcode != RIG_OK) {
135+
showmsg("Speed not accepted!");
136+
return -1;
137+
}
138+
}
137139

138140
can_send_morse = caps->send_morse != NULL;
139141
#if HAMLIB_VERSION >= 400

0 commit comments

Comments
 (0)