From: drowe67 Date: Wed, 30 Dec 2015 23:43:42 +0000 (+0000) Subject: extra stuff out of tx only build X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=d9699543cec2eb9729fcb59433658cab2a5a244c;p=freetel-svn-tracking.git extra stuff out of tx only build git-svn-id: https://svn.code.sf.net/p/freetel/code@2587 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/horus_l2.c b/codec2-dev/src/horus_l2.c index 6f551b72..e50a1ecf 100644 --- a/codec2-dev/src/horus_l2.c +++ b/codec2-dev/src/horus_l2.c @@ -13,13 +13,12 @@ [X] function to return storgage rqd for output packet [X] code (not table based) based golay encoder [X] #define switchable debug levels - [ ] unit test to check if working on payload [ ] code based interleaver - [ ] unit test to run with/without errors + [X] unit test to run with/without errors [X] test at BER = 0.01 - [ ] switchable with defines - [ ] conditional defines so just encoder on the target - [ ] Octave code + [X] switchable with defines + [X] conditional defines so just encoder on the target + [ ] Octave code [ ] new protocol decoder [ ] test file based [ ] test real time @@ -519,6 +518,36 @@ int main(void) { } #endif +#ifdef GEN_TX_BITS +/* generate a file of tx_bits to modulate using fsk_horus.m for modem simulations */ + +int main(void) { + int nbytes = 22; + unsigned char input_payload[nbytes]; + int num_tx_data_bytes = horus_l2_get_num_tx_data_bytes(sizeof(input_payload)); + unsigned char tx[num_tx_data_bytes]; + int i; + + for(i=0; i> (7-b)) & 0x1; /* msb first */ + fprintf(f,"%d ", tx_bit); + } + } + fclose(f); + + return 0; +} +#endif + /*---------------------------------------------------------------------------*\ GOLAY FUNCTIONS @@ -595,6 +624,7 @@ int main(void) { * a[] = auxiliary array to generate correctable error patterns */ +#ifdef HORUS_L2_RX static int inited = 0; #ifdef RUN_TIME_TABLES @@ -624,6 +654,7 @@ static int arr2int(int a[], int r) return(result); } #endif +#endif #ifdef HORUS_L2_RX void nextcomb(int n, int r, int a[])