pull/281/head
Michael Black 2020-05-28 12:05:48 -05:00
commit 6fd493bc2f
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -32,6 +32,8 @@
#include "hamlib/rotator.h"
#include "iofunc.h"
#include "misc.h"
#include "network.h"
#include "serial.h"
#include "rot_dummy.h"
@ -45,6 +47,17 @@ static int netrotctl_transaction(ROT *rot, char *cmd, int len, char *buf)
{
int ret;
/* flush anything in the read buffer before command is sent */
if (rot->state.rotport.type.rig == RIG_PORT_NETWORK
|| rot->state.rotport.type.rig == RIG_PORT_UDP_NETWORK)
{
network_flush(&rot->state.rotport);
}
else
{
serial_flush(&rot->state.rotport);
}
ret = write_block(&rot->state.rotport, cmd, len);
if (ret != RIG_OK)