Skip to content

Commit 428dd08

Browse files
committed
changing 2020A UW to something unique
1 parent 78a2b34 commit 428dd08

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ if(LPCNET)
783783
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
784784
dd bs=32000 count=60 if=/dev/zero |
785785
./freedv_tx 2020A - - --testframes --clip 1 |
786-
./ch - - --No -24 --mpp --fading_dir ../unittest |
786+
./ch - - --No -24.5 --mpp --fading_dir ../unittest |
787787
./freedv_rx 2020A - /dev/null --testframes"
788788
)
789789

src/freedv_2020.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ void freedv_2020x_open(struct freedv *f, int vq_type) {
4444
struct OFDM_CONFIG ofdm_config;
4545
switch (f->mode) {
4646
case FREEDV_MODE_2020:
47-
case FREEDV_MODE_2020A:
4847
ofdm_init_mode("2020", &ofdm_config);
4948
break;
49+
case FREEDV_MODE_2020A:
50+
ofdm_init_mode("2020A", &ofdm_config);
51+
break;
5052
case FREEDV_MODE_2020B:
5153
ofdm_init_mode("2020B", &ofdm_config);
5254
break;

src/ofdm_mode.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <assert.h>
1212
#include <string.h>
13+
#include <stdio.h>
1314
#include "codec2_ofdm.h"
1415
#include "ofdm_internal.h"
1516

@@ -61,6 +62,11 @@ void ofdm_init_mode(char mode[], struct OFDM_CONFIG *config) {
6162
} else if ((strcmp(mode,"2020") == 0) || (strcmp(mode,"2020A") == 0)) {
6263
config->ts = 0.0205; config->nc = 31; config->codename = "HRAb_396_504";
6364
config->tx_bpf_en = false; config->amp_scale = 167E3; config->clip_gain1 = 2.5; config->clip_gain2 = 0.8;
65+
if (!strcmp(mode,"2020A")) {
66+
uint8_t uw[] = {1,1,0,0,1,0,1,0,1,1};
67+
memcpy(config->tx_uw, uw, sizeof(uw));
68+
fprintf(stderr,"new UW ...\n");
69+
}
6470
} else if (strcmp(mode,"2020B") == 0) {
6571
config->ts = 0.014; config->tcp = 0.004; config->nc = 29; config->ns=5; config->codename = "HRA_56_56";
6672
config->txtbits = 4; config->nuwbits = 8*2; config->bad_uw_errors = 5;

0 commit comments

Comments
 (0)