Add changes to ofdm.c for unit test
authorokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 12 Jun 2017 00:34:34 +0000 (00:34 +0000)
committerokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 12 Jun 2017 00:34:34 +0000 (00:34 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3177 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/codec2_ofdm.h
codec2-dev/src/ofdm.c
codec2-dev/src/test_bits_ofdm.h

index 82713b1ec1f034e663c3c9b46fdab5a248a3a1c4..3da37355eccf3bb720e26f19d495edcd3750489d 100644 (file)
@@ -29,7 +29,7 @@ struct OFDM;
 
 struct OFDM *ofdm_create(void);
 void ofdm_destroy(struct OFDM *);
-void ofdm_mod(struct OFDM *ofdm, COMP [OFDM_SAMPLESPERFRAME], int *);
+void ofdm_mod(struct OFDM *ofdm, COMP [OFDM_SAMPLESPERFRAME], const int *);
 int *ofdm_demod(struct OFDM *ofdm, COMP *);
 
 /* option setters */
index c01144ba835371c813f8ae68ab9f071b4d0d9087..5cb261153780f807d0bcac7b9bbaae9dc06d5261 100644 (file)
@@ -316,7 +316,7 @@ void set_off_est_hz(struct OFDM *ofdm, float val) {
  * --------------------------------------
  */
 
-void ofdm_mod(struct OFDM *ofdm, COMP result[OFDM_SAMPLESPERFRAME], int *tx_bits) {
+void ofdm_mod(struct OFDM *ofdm, COMP result[OFDM_SAMPLESPERFRAME], const int *tx_bits) {
     int length = OFDM_BITSPERFRAME / OFDM_BPS;
     complex float tx[OFDM_SAMPLESPERFRAME];
     complex float tx_sym_lin[length];
index acbed0193465d9d8a353ea92716b91eb807ed8da..f91ce23209d74e0c97b5cf0887e7900d3e68f1ae 100644 (file)
@@ -1,6 +1,118 @@
 /* Generated by test_bits_ofdm_file() Octave function */
 
 const int test_bits_ofdm[]={
+  0,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  1,
+  0,
+  1,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  1,
+  1,
+  0,
+  1,
+  0,
+  1,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  1,
+  0,
+  0,
+  0,
+  0,
+  0,
+  1,
+  1,
+  1,
+  1,
+  1,
+  1,
+  0,
+  1,
+  0,
+  1,
+  0,
+  1,
+  1,
+  0,
+  1,
+  0,
+  0,
+  0,
+  0,
+  1,
+  0,
+  1,
+  0,
+  1,
+  0,
+  1,
+  1,
+  1,
+  0,
+  1,
+  0,
+  1,
+  0,
+  1,
+  1,
+  0,
+  1,
+  1,
+  0,
+  1,
+  0,
+  0,
+  1,
+  0,
+  1,
+  0,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
+  0,
+  1,
+  1,
+  1,
+  0,
   1,
   1,
   0,
@@ -114,3 +226,4 @@ const int test_bits_ofdm[]={
   1,
   0
 };
+