kopia lustrzana https://github.com/Hamlib/Hamlib
echo fix
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1632 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.0
rodzic
8c2ac10274
commit
efabee7d6c
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Alinco backend - main file
|
||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||
*
|
||||
* $Id: alinco.c,v 1.19 2003-11-16 17:14:42 fillods Exp $
|
||||
* $Id: alinco.c,v 1.20 2003-12-22 07:39:46 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
|
||||
|
@ -100,6 +100,7 @@ int alinco_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *
|
|||
{
|
||||
int retval;
|
||||
struct rig_state *rs;
|
||||
char echobuf[BUFSZ+1];
|
||||
|
||||
rs = &rig->state;
|
||||
|
||||
|
@ -109,6 +110,14 @@ int alinco_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *
|
|||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
/*
|
||||
* Transceiver sends an echo of cmd
|
||||
* TODO: check whether cmd and echobuf match (optional)
|
||||
*/
|
||||
retval = read_string(&rs->rigport, echobuf, BUFSZ, EOM, strlen(EOM));
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
/* no data expected, TODO: flush input? */
|
||||
if (!data || !data_len)
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue