kopia lustrzana https://github.com/Hamlib/Hamlib
protocol fix: PCR always send a short ack, whatever the response can be. So eat it.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1027 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.3
rodzic
9ed48795a2
commit
e6f23d2a11
10
pcr/pcr.c
10
pcr/pcr.c
|
@ -2,7 +2,7 @@
|
|||
* Hamlib PCR backend - main file
|
||||
* Copyright (c) 2001-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: pcr.c,v 1.13 2002-03-13 23:37:12 fillods Exp $
|
||||
* $Id: pcr.c,v 1.14 2002-03-13 23:56:41 fillods Exp $
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -104,6 +104,14 @@ int pcr_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *dat
|
|||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
/* eat the first ack */
|
||||
retval = read_string(&rs->rigport, data, 1, "\x0a", 1);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
if (retval != 1)
|
||||
return -RIG_EPROTO;
|
||||
|
||||
/* here is the real response */
|
||||
*data_len = read_string(&rs->rigport, data, *data_len, "\x0a", 1);
|
||||
|
||||
return RIG_OK;
|
||||
|
|
Ładowanie…
Reference in New Issue