Added the option to send CW using CWX commands on Flex's.

(cherry picked from commit b365d988a4)
Hamlib-4.6.3
Michael Morgan 2025-06-28 08:08:59 -05:00 zatwierdzone przez Nate Bargmann
rodzic 8abb5efcf0
commit c0d7a32056
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FB2C5130D55A8819
2 zmienionych plików z 30 dodań i 0 usunięć

Wyświetl plik

@ -45,6 +45,8 @@ static int smartsdr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
pbwidth_t width);
static int smartsdr_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
pbwidth_t *width);
static int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg);
static int smartsdr_stop_morse(RIG *rig, vfo_t vfo);
//static int smartsdr_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
struct smartsdr_priv_data
@ -619,3 +621,29 @@ int sdr1k_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
}
}
#endif
int smartsdr_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
int buf_len;
buf_len = strlen(msg) + 12;
char cmd[buf_len];
ENTERFUNC;
sprintf(cmd, "cwx send \"%s\"", msg);
smartsdr_transaction(rig, cmd);
RETURNFUNC(RIG_OK);
}
int smartsdr_stop_morse(RIG *rig, vfo_t vfo)
{
char cmd[64];
ENTERFUNC;
sprintf(cmd, "cwx clear");
smartsdr_transaction(rig, cmd);
RETURNFUNC(RIG_OK);
}

Wyświetl plik

@ -75,4 +75,6 @@
// .reset = smartsdr_reset,
// .set_level = smartsdr_set_level,
// .set_func = _set_func,
.send_morse = smartsdr_send_morse,
.stop_morse = smartsdr_stop_morse,
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS