Make set_ptt behave as before, fix set_ant for ts570.c

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2606 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.9
Alessandro Zummo, IZ1PRB 2009-02-02 07:30:35 +00:00
rodzic 0523e477ac
commit 9281935c5e
3 zmienionych plików z 32 dodań i 7 usunięć

Wyświetl plik

@ -3,7 +3,7 @@
* Copyright (c) 2000-2009 by Stephane Fillod
* Copyright (C) 2009 Alessandro Zummo <a.zummo@towertech.it>
*
* $Id: kenwood.c,v 1.102 2009-02-02 07:29:11 azummo Exp $
* $Id: kenwood.c,v 1.103 2009-02-02 07:30:35 azummo 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
@ -1189,6 +1189,30 @@ int kenwood_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
return kenwood_simple_transaction(rig, cmd, 4);
}
int kenwood_set_ant_no_ack(RIG * rig, vfo_t vfo, ant_t ant)
{
const char *cmd;
switch (ant) {
case RIG_ANT_1:
cmd = "AN1;";
break;
case RIG_ANT_2:
cmd = "AN2;";
break;
case RIG_ANT_3:
cmd = "AN3;";
break;
case RIG_ANT_4:
cmd = "AN4;";
break;
default:
return -RIG_EINVAL;
}
return kenwood_simple_cmd(rig, cmd);
}
/*
* get the aerial/antenna in use
*/
@ -1236,8 +1260,8 @@ int kenwood_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
*/
int kenwood_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
return kenwood_simple_transaction(rig,
ptt == RIG_PTT_ON ? "TX;" : "RX;", 3);
return kenwood_simple_cmd(rig,
ptt == RIG_PTT_ON ? "TX;" : "RX;");
}

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - main header
* Copyright (c) 2000-2009 by Stephane Fillod
*
* $Id: kenwood.h,v 1.47 2009-02-02 07:29:11 azummo Exp $
* $Id: kenwood.h,v 1.48 2009-02-02 07:30:35 azummo 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
@ -98,6 +98,7 @@ int kenwood_get_powerstat(RIG *rig, powerstat_t *status);
int kenwood_reset(RIG *rig, reset_t reset);
int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg);
int kenwood_set_ant (RIG * rig, vfo_t vfo, ant_t ant);
int kenwood_set_ant_no_ack(RIG * rig, vfo_t vfo, ant_t ant);
int kenwood_get_ant (RIG * rig, vfo_t vfo, ant_t * ant);
int kenwood_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt);
int kenwood_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - TS570 description
* Copyright (c) 2001-2005 by Stephane Fillod
*
* $Id: ts570.c,v 1.38 2009-01-28 23:31:42 azummo Exp $
* $Id: ts570.c,v 1.39 2009-02-02 07:30:35 azummo 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
@ -815,7 +815,7 @@ const struct rig_caps ts570s_caps = {
.get_dcd = kenwood_get_dcd,
.set_func = ts570_set_func,
.get_func = ts570_get_func,
.set_ant = kenwood_set_ant,
.set_ant = kenwood_set_ant_no_ack,
.get_ant = kenwood_get_ant,
.set_level = ts570_set_level,
.get_level = ts570_get_level,
@ -999,7 +999,7 @@ const struct rig_caps ts570d_caps = {
.get_dcd = kenwood_get_dcd,
.set_func = ts570_set_func,
.get_func = ts570_get_func,
.set_ant = kenwood_set_ant,
.set_ant = kenwood_set_ant_no_ack,
.get_ant = kenwood_get_ant,
.set_level = ts570_set_level,
.get_level = ts570_get_level,