Skip to content

Commit 7197516

Browse files
committed
changed function name and description
more self explaining name for function: freedv_set_tuning_range
1 parent 7fc1d68 commit 7197516

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

src/freedv_api.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,13 +1378,18 @@ void freedv_get_fsk_S_and_N (struct freedv *f, float *S, float *N)
13781378
FUNCTIONS...: freedv_set_fmin_fmax
13791379
AUTHOR......: Simon Lang - DJ2LS
13801380
DATE CREATED: 18 feb 2022
1381-
1382-
Set fmin / fmax for ofdm modem
1383-
1381+
DEFAULT.....: fmin: -50.0Hz fmax: 50.0Hz
1382+
DESCRIPTION.:
1383+
1384+
|<---fmin - | rx centre frequency | + fmax--->|
1385+
1386+
Useful for handling frequency offsets,
1387+
e.g. caused by an imprecise VFO, the trade off is more CPU power is required.
1388+
13841389
\*---------------------------------------------------------------------------*/
1385-
int freedv_set_fmin_fmax(struct freedv *freedv, float val_fmin, float val_fmax) {
1390+
int freedv_set_tuning_range(struct freedv *freedv, float val_fmin, float val_fmax) {
13861391

1387-
if (is_ofdm_data_mode(freedv)) {
1392+
if (is_ofdm_mode(freedv)) {
13881393
freedv->ofdm->fmin = val_fmin;
13891394
freedv->ofdm->fmax = val_fmax;
13901395
return 1;

src/freedv_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void freedv_set_phase_est_bandwidth_mode(struct freedv *f, int val);
240240
void freedv_set_eq (struct freedv *f, int val);
241241
void freedv_set_frames_per_burst (struct freedv *f, int framesperburst);
242242
void freedv_passthrough_gain (struct freedv *f, float g);
243-
int freedv_set_fmin_fmax (struct freedv *freedv, float val_fmin, float val_fmax);
243+
int freedv_set_tuning_range (struct freedv *freedv, float val_fmin, float val_fmax);
244244

245245
// Get parameters -------------------------------------------------------------------------
246246

src/ofdm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ struct OFDM *ofdm_create(const struct OFDM_CONFIG *config) {
219219
ofdm->clip_en = false;
220220
ofdm->foff_limiter = false;
221221
ofdm->data_mode = "";
222-
ofdm->fmin = -50.0;
223-
ofdm->fmax = 50.0;
222+
ofdm->fmin = -50.0; /* frequency minimum for ofdm acquisition range */
223+
ofdm->fmax = 50.0; /* frequency maximum for ofdm acquisition range */
224224
memset(ofdm->tx_uw, 0, ofdm->nuwbits);
225225
} else {
226226
/* Use the users values */
@@ -254,8 +254,8 @@ struct OFDM *ofdm_create(const struct OFDM_CONFIG *config) {
254254
ofdm->clip_en = config->clip_en;
255255
memcpy(ofdm->tx_uw, config->tx_uw, ofdm->nuwbits);
256256
ofdm->data_mode = config->data_mode;
257-
ofdm->fmin = config->fmin;
258-
ofdm->fmax = config->fmax;
257+
ofdm->fmin = config->fmin; /* frequency minimum for ofdm acquisition range */
258+
ofdm->fmax = config->fmax; /* frequency maximum for ofdm acquisition range */
259259

260260
}
261261

0 commit comments

Comments
 (0)