git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1632 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.0
Stéphane Fillod, F8CFE 2003-12-22 07:39:46 +00:00
rodzic 8c2ac10274
commit efabee7d6c
1 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Alinco backend - main file * Hamlib Alinco backend - main file
* Copyright (c) 2001-2003 by Stephane Fillod * 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 * This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * 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; int retval;
struct rig_state *rs; struct rig_state *rs;
char echobuf[BUFSZ+1];
rs = &rig->state; 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) if (retval != RIG_OK)
return retval; 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? */ /* no data expected, TODO: flush input? */
if (!data || !data_len) if (!data || !data_len)
return 0; return 0;