Added FT450 filter gets and sets

Found some narrow filter settings in FT2000 manual
Made up the rest.  It is a starting point.


git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2525 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.9
Terry Embry, KJ4EED 2008-12-25 13:32:50 +00:00
rodzic 775f3b1a05
commit b2afb0a581
1 zmienionych plików z 63 dodań i 14 usunięć

Wyświetl plik

@ -13,7 +13,7 @@
* FT-950, FT-450. Much testing remains. -N0NB
*
*
* $Id: newcat.c,v 1.28 2008-12-24 20:17:45 mrtembry Exp $
* $Id: newcat.c,v 1.29 2008-12-25 13:32:50 mrtembry Exp $
*
*
* This library is free software; you can redistribute it and/or
@ -525,7 +525,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
case RIG_MODE_CWR:
cmdstr[3] = '7';
break;
case RIG_MODE_PKTLSB:
case RIG_MODE_PKTLSB: /* FT450 USER-L */
cmdstr[3] = '8';
break;
case RIG_MODE_RTTYR:
@ -546,7 +546,7 @@ int newcat_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
else
cmdstr[3] = '4';
break;
case RIG_MODE_PKTUSB:
case RIG_MODE_PKTUSB: /* FT450 USER-U */
cmdstr[3] = 'C';
break;
default:
@ -660,7 +660,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
*mode = RIG_MODE_CWR;
break;
case '8':
*mode = RIG_MODE_PKTLSB;
*mode = RIG_MODE_PKTLSB; /* FT450 USER-L */
break;
case '9':
*mode = RIG_MODE_RTTYR;
@ -682,7 +682,7 @@ int newcat_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return RIG_OK;
break;
case 'C':
*mode = RIG_MODE_PKTUSB;
*mode = RIG_MODE_PKTUSB; /* FT450 USER-U */
break;
case 'D':
*mode = RIG_MODE_AM; /* narrow */
@ -3175,10 +3175,38 @@ int newcat_set_rxbandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
} /* end switch(mode) */
} /* end if FT950 */
else {
/* FT450, FT2000, FT9000 */
return RIG_OK;
switch (mode) {
case RIG_MODE_PKTUSB:
case RIG_MODE_PKTLSB:
case RIG_MODE_RTTY:
case RIG_MODE_RTTYR:
case RIG_MODE_CW:
case RIG_MODE_CWR:
switch (width) {
case 1800: sprintf(width_str, "16"); narrow = '0'; break; /* normal */
case 500: sprintf(width_str, "06"); narrow = '0'; break; /* narrow */
case 2400: sprintf(width_str, "24"); narrow = '0'; break; /* wide */
default: return -RIG_EINVAL;
}
break;
case RIG_MODE_LSB:
case RIG_MODE_USB:
switch (width) {
case 2400: sprintf(width_str, "16"); narrow = '0'; break; /* normal */
case 1800: sprintf(width_str, "08"); narrow = '0'; break; /* narrow */
case 3000: sprintf(width_str, "25"); narrow = '0'; break; /* wide */
default: return -RIG_EINVAL;
}
break;
case RIG_MODE_AM:
case RIG_MODE_FM:
case RIG_MODE_PKTFM:
return RIG_OK;
default:
return -RIG_EINVAL;
} /* end switch(mode) */
} /* end else */
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "NA%c%c%cSH%c%s%c",
main_sub_vfo, narrow, cat_term, main_sub_vfo, width_str, cat_term);
@ -3311,10 +3339,31 @@ int newcat_get_rxbandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
} /* end if FT950 */
else {
/* FT450, FT2000, FT9000 */
// *width = w; /* SH" return debug */
}
switch (mode) {
case RIG_MODE_PKTUSB:
case RIG_MODE_PKTLSB:
case RIG_MODE_RTTY:
case RIG_MODE_RTTYR:
case RIG_MODE_CW:
case RIG_MODE_CWR:
case RIG_MODE_LSB:
case RIG_MODE_USB:
if (w < 16)
*width = rig_passband_narrow(rig, mode);
else if (w > 16)
*width = rig_passband_wide(rig, mode);
else
*width = rig_passband_normal(rig, mode);
break;
case RIG_MODE_AM:
case RIG_MODE_FM:
case RIG_MODE_PKTFM:
return RIG_OK;
default:
return -RIG_EINVAL;
} /* end switch (mode) */
} /* end else */
return RIG_OK;
}