kopia lustrzana https://github.com/Hamlib/Hamlib
The D700 does not internally round the input frequency to the nearest
available frequency. Instead it returns an error code. This is an issue for use with gpredict. It is also inconsistent with other backends, particularly the FT-857. (The rounding may occur in the radio of the 857 but to the developer it appears transparent.) This patch defines a simple wrapper around the th_set_freq call that rounds the frequency to the nearest 5kHz. Patch from Charles Suprin, AA1VS. git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2977 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.13
rodzic
e417dd2dcd
commit
558b787b28
|
@ -72,6 +72,7 @@ static struct kenwood_priv_caps tmd700_priv_caps = {
|
|||
};
|
||||
|
||||
static int tmd700_set_vfo (RIG *rig, vfo_t vfo);
|
||||
static int tmd700_set_freq (RIG *rig, vfo_t vfo, freq_t freq);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -185,7 +186,7 @@ const struct rig_caps tmd700_caps = {
|
|||
|
||||
.rig_init = kenwood_init,
|
||||
.rig_cleanup = kenwood_cleanup,
|
||||
.set_freq = th_set_freq,
|
||||
.set_freq = tmd700_set_freq,
|
||||
.get_freq = th_get_freq,
|
||||
.set_mode = th_set_mode,
|
||||
.get_mode = th_get_mode,
|
||||
|
@ -271,4 +272,14 @@ int tmd700_set_vfo (RIG *rig, vfo_t vfo)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
static int tmd700_set_freq(RIG *rig, vfo_t vfo, freq_t freq){
|
||||
/*make it so that the radio tunes to something close*/
|
||||
/*the radio does not round internally so rounding it*/
|
||||
/*to a raster before it passes to the radio is required*/
|
||||
/*this may not be the completely correct raster as the*/
|
||||
/*supports 6.25kHz channelization*/
|
||||
freq_t freq2=round(freq/5000)*5000;
|
||||
return th_set_freq(rig,vfo,freq2);
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
|
Ładowanie…
Reference in New Issue