Added support for RIG_MODE_PKTLSB, RIG_MODE_PKTUSB, and RIG_MODE_PKTFM.

TNX Jeff Steinkamp N7YG.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2377 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.8
Nate Bargmann, N0NB 2008-08-06 11:09:37 +00:00
rodzic 151f4c24d3
commit f3c830fce2
2 zmienionych plików z 43 dodań i 9 usunięć

Wyświetl plik

@ -12,7 +12,7 @@
* pages 86 to 90
*
*
* $Id: ft920.c,v 1.23 2007-12-01 22:09:52 n0nb Exp $
* $Id: ft920.c,v 1.24 2008-08-06 11:09:37 n0nb Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -247,8 +247,11 @@ const struct rig_caps ft920_caps = {
{RIG_MODE_AM, kHz(2.4)}, /* AM filter with narrow selection (SSB filter switched in) */
{RIG_MODE_FM, kHz(12)}, /* FM with optional FM unit */
{RIG_MODE_WFM, kHz(12)}, /* WideFM, with optional FM unit. */
{RIG_MODE_RTTY, kHz(1.8)}, /* Alias of MODE_DATA_L */
{RIG_MODE_RTTY, kHz(0.5)}, /* Alias of MODE_DATA_LN */
{RIG_MODE_PKTLSB, kHz(1.8)},/* Alias of MODE_DATA_L */
{RIG_MODE_PKTLSB, kHz(0.5)},/* Alias of MODE_DATA_LN */
{RIG_MODE_PKTUSB,kHz(2.4)}, /* Alias for MODE DATA_U */
{RIG_MODE_PKTFM, kHz(12)}, /* Alias for MODE_DATA _F */
{RIG_MODE_PKTFM, kHz(6)}, /* Alias for MODE_DATA_FN */
RIG_FLT_END,
},
@ -662,6 +665,15 @@ static int ft920_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
case RIG_MODE_RTTY:
mode_parm = MODE_SET_A_DATA_L;
break;
case RIG_MODE_PKTLSB:
mode_parm = MODE_SET_A_DATA_L;
break;
case RIG_MODE_PKTUSB:
mode_parm = MODE_SET_A_DATA_U;
break;
case RIG_MODE_PKTFM:
mode_parm = MODE_SET_A_DATA_F;
break;
default:
return -RIG_EINVAL; /* sorry, wrong MODE */
}
@ -689,6 +701,15 @@ static int ft920_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
case RIG_MODE_RTTY:
mode_parm = MODE_SET_B_DATA_L;
break;
case RIG_MODE_PKTLSB:
mode_parm = MODE_SET_B_DATA_L;
break;
case RIG_MODE_PKTUSB:
mode_parm = MODE_SET_B_DATA_U;
break;
case RIG_MODE_PKTFM:
mode_parm = MODE_SET_B_DATA_F;
break;
default:
return -RIG_EINVAL;
}
@ -723,6 +744,7 @@ static int ft920_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width ) {
case RIG_MODE_CW:
case RIG_MODE_AM:
case RIG_MODE_FM:
case RIG_MODE_PKTFM:
case RIG_MODE_RTTY:
switch(vfo) {
case RIG_VFO_A:
@ -877,13 +899,25 @@ static int ft920_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
norm = TRUE;
break;
case MODE_DATA_LN:
*mode = RIG_MODE_RTTY;
*mode = RIG_MODE_PKTLSB;
norm = FALSE;
break;
case MODE_DATA_L:
*mode = RIG_MODE_RTTY;
*mode = RIG_MODE_PKTLSB;
norm = TRUE;
break;
case MODE_DATA_U:
*mode = RIG_MODE_PKTUSB;
norm = TRUE;
break;
case MODE_DATA_F:
*mode = RIG_MODE_PKTFM;
norm = TRUE;
break;
case MODE_DATA_FN:
*mode = RIG_MODE_PKTFM;
norm = FALSE;
break;
default:
return -RIG_EINVAL; /* Oops! file bug report */
}

Wyświetl plik

@ -9,7 +9,7 @@
* via serial interface to an FT-920 using the "CAT" interface
*
*
* $Id: ft920.h,v 1.16 2007-12-01 22:09:52 n0nb Exp $
* $Id: ft920.h,v 1.17 2008-08-06 11:09:37 n0nb Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -38,14 +38,14 @@
#define FT920_VFO_ALL (RIG_VFO_A|RIG_VFO_B)
/* Receiver caps */
#define FT920_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB)
#define FT920_ALL_RX_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM|RIG_MODE_FM|RIG_MODE_WFM)
#define FT920_SSB_CW_RX_MODES (RIG_MODE_CW|RIG_MODE_USB|RIG_MODE_LSB)
#define FT920_AM_RX_MODES (RIG_MODE_AM)
#define FT920_FM_RX_MODES (RIG_MODE_FM)
#define FT920_FM_RX_MODES (RIG_MODE_FM|RIG_MODE_WFM)
/* TX caps */
#define FT920_OTHER_TX_MODES (RIG_MODE_CW| RIG_MODE_USB| RIG_MODE_LSB ) /* 100 W class */
#define FT920_OTHER_TX_MODES (RIG_MODE_CW| RIG_MODE_USB| RIG_MODE_LSB|RIG_MODE_PKTLSB|RIG_MODE_PKTUSB|RIG_MODE_PKTFM ) /* 100 W class */
#define FT920_AM_TX_MODES (RIG_MODE_AM ) /* set 25W max */