pull/224/head
Michael Black 2020-03-15 15:32:46 -05:00
rodzic 4d06d195e5
commit 35fffc4f38
9 zmienionych plików z 71 dodań i 49 usunięć

Wyświetl plik

@ -1020,10 +1020,12 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
priv = (struct icom_priv_data *) rs->priv;
#if 0 // disabled to test if IC9700 satmode/gpredict still works OK
if (priv->curr_vfo == RIG_VFO_NONE)
{
icom_set_default_vfo(rig);
}
#endif
cmd = C_RD_FREQ;

Wyświetl plik

@ -637,7 +637,9 @@ int kenwood_open(RIG *rig)
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
err = kenwood_get_id(rig, id);
if (err == -RIG_ETIMEOUT) {
if (err == -RIG_ETIMEOUT)
{
// Ensure rig is on
rig_set_powerstat(rig, 1);
}

Wyświetl plik

@ -200,11 +200,13 @@ int HAMLIB_API rig_register(const struct rig_caps *caps)
}
hval = HASH_FUNC(caps->rig_model);
if (rig_hash_table[hval])
{
printf("Hash collision!!! Fatal error!!\n");
exit(1);
}
p->caps = caps;
// p->handle = NULL;
p->next = rig_hash_table[hval];

Wyświetl plik

@ -45,6 +45,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <ctype.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
@ -199,6 +200,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp)
rig_debug(RIG_DEBUG_TRACE, "%s: OPEN before\n", __func__);
fd = OPEN(rp->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
rig_debug(RIG_DEBUG_TRACE, "%s: OPEN after\n", __func__);
if (fd == -1)
{
/* Could not open the port. */
@ -519,6 +521,7 @@ rig_debug(RIG_DEBUG_TRACE,"%s: cfsetospeed\n", __func__);
#if defined(HAVE_TERMIOS_H)
rig_debug(RIG_DEBUG_TRACE, "%s: tcsetattr TCSANOW\n", __func__);
if (tcsetattr(fd, TCSANOW, &options) == -1)
{
rig_debug(RIG_DEBUG_ERR,
@ -533,6 +536,7 @@ rig_debug(RIG_DEBUG_TRACE,"%s: tcsetattr TCSANOW\n", __func__);
#elif defined(HAVE_TERMIO_H)
rig_debug(RIG_DEBUG_TRACE, "%s: IOCTL TCSETA\n", __func__);
if (IOCTL(fd, TCSETA, &options) == -1)
{
rig_debug(RIG_DEBUG_ERR,
@ -547,6 +551,7 @@ rig_debug(RIG_DEBUG_TRACE,"%s: IOCTL TCSETA\n", __func__);
#else
rig_debug(RIG_DEBUG_TRACE, "%s: IOCTL TIOCSETP\n", __func__);
/* sgtty */
if (IOCTL(fd, TIOCSETP, &sg) == -1)
{
@ -585,11 +590,11 @@ rig_debug(RIG_DEBUG_TRACE,"%s: IOCTL TIOCSETP\n", __func__);
*/
int HAMLIB_API serial_flush(hamlib_port_t *p)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rig_debug(RIG_DEBUG_VERBOSE, "%s MDB called\n", __func__);
if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd)
{
char buf[32];
// if (p->fd == uh_ptt_fd || p->fd == uh_radio_fd)
// {
unsigned char buf[32];
/*
* Catch microHam case:
* if fd corresponds to a microHam device drain the line
@ -597,14 +602,21 @@ int HAMLIB_API serial_flush(hamlib_port_t *p)
*/
int n;
rig_debug(RIG_DEBUG_TRACE, "%s: flushing: ", __func__);
while ((n = read(p->fd, buf, 32)) > 0)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: flushed %d bytes\n", __func__, n);
int i;
for (i = 0; i < n; ++i) { printf("0x%02x(%c) ", buf[i], isprint(buf[i]) ? buf[i] : '~'); }
/* do nothing */
}
printf("DONE\n");
return RIG_OK;
}
// }
rig_debug(RIG_DEBUG_VERBOSE, "%s: tcflush\n", __func__);
tcflush(p->fd, TCIFLUSH);

Wyświetl plik

@ -416,7 +416,8 @@ int main(int argc, char *argv[])
rig_set_debug(verbose);
rig_debug(RIG_DEBUG_VERBOSE, "rigctl, %s %s\n", hamlib_version, __DATE__ " " __TIME__);
rig_debug(RIG_DEBUG_VERBOSE, "rigctl, %s %s\n", hamlib_version,
__DATE__ " " __TIME__);
rig_debug(RIG_DEBUG_VERBOSE, "%s",
"Report bugs to <hamlib-developer@lists.sourceforge.net>\n\n");

Wyświetl plik

@ -640,6 +640,7 @@ int main(int argc, char *argv[])
my_rig->caps->rig_model,
my_rig->caps->model_name);
}
#endif
#ifdef __MINGW32__
@ -980,6 +981,7 @@ void *handle_socket(void *arg)
sync_callback(1);
#if 0
if (!client_count++)
{
retcode = rig_open(my_rig);
@ -991,6 +993,7 @@ void *handle_socket(void *arg)
my_rig->caps->model_name);
}
}
#endif
sync_callback(0);