kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of https://github.com/mdblack98/Hamlib
commit
6fd493bc2f
|
@ -32,6 +32,8 @@
|
||||||
#include "hamlib/rotator.h"
|
#include "hamlib/rotator.h"
|
||||||
#include "iofunc.h"
|
#include "iofunc.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "network.h"
|
||||||
|
#include "serial.h"
|
||||||
|
|
||||||
#include "rot_dummy.h"
|
#include "rot_dummy.h"
|
||||||
|
|
||||||
|
@ -45,6 +47,17 @@ static int netrotctl_transaction(ROT *rot, char *cmd, int len, char *buf)
|
||||||
{
|
{
|
||||||
int ret;
|
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);
|
ret = write_block(&rot->state.rotport, cmd, len);
|
||||||
|
|
||||||
if (ret != RIG_OK)
|
if (ret != RIG_OK)
|
||||||
|
|
Ładowanie…
Reference in New Issue