kopia lustrzana https://github.com/Hamlib/Hamlib
BUG#2106524: allow backend specific override get_ptt even if RIG_PTT_SERIAL_DTR (e.g. FT757GXII)
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2379 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.8
rodzic
57dca4a25a
commit
6f4705fc20
11
src/rig.c
11
src/rig.c
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib Interface - main file
|
* Hamlib Interface - main file
|
||||||
* Copyright (c) 2000-2008 by Stephane Fillod and Frank Singleton
|
* Copyright (c) 2000-2008 by Stephane Fillod and Frank Singleton
|
||||||
*
|
*
|
||||||
* $Id: rig.c,v 1.96 2008-05-04 15:36:23 fillods Exp $
|
* $Id: rig.c,v 1.97 2008-09-12 11:49:32 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
|
||||||
|
@ -1236,16 +1236,25 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RIG_PTT_SERIAL_RTS:
|
case RIG_PTT_SERIAL_RTS:
|
||||||
|
if (caps->get_ptt)
|
||||||
|
return caps->get_ptt(rig, vfo, ptt);
|
||||||
|
|
||||||
retcode = ser_get_rts(&rig->state.pttport, &status);
|
retcode = ser_get_rts(&rig->state.pttport, &status);
|
||||||
*ptt = status ? RIG_PTT_ON : RIG_PTT_OFF;
|
*ptt = status ? RIG_PTT_ON : RIG_PTT_OFF;
|
||||||
return retcode;
|
return retcode;
|
||||||
|
|
||||||
case RIG_PTT_SERIAL_DTR:
|
case RIG_PTT_SERIAL_DTR:
|
||||||
|
if (caps->get_ptt)
|
||||||
|
return caps->get_ptt(rig, vfo, ptt);
|
||||||
|
|
||||||
retcode = ser_get_dtr(&rig->state.pttport, &status);
|
retcode = ser_get_dtr(&rig->state.pttport, &status);
|
||||||
*ptt = status ? RIG_PTT_ON : RIG_PTT_OFF;
|
*ptt = status ? RIG_PTT_ON : RIG_PTT_OFF;
|
||||||
return retcode;
|
return retcode;
|
||||||
|
|
||||||
case RIG_PTT_PARALLEL:
|
case RIG_PTT_PARALLEL:
|
||||||
|
if (caps->get_ptt)
|
||||||
|
return caps->get_ptt(rig, vfo, ptt);
|
||||||
|
|
||||||
return par_ptt_get(&rig->state.pttport, ptt);
|
return par_ptt_get(&rig->state.pttport, ptt);
|
||||||
|
|
||||||
case RIG_PTT_NONE:
|
case RIG_PTT_NONE:
|
||||||
|
|
Ładowanie…
Reference in New Issue