diff --git a/lib/m17_coder_impl.cc b/lib/m17_coder_impl.cc index 33ae7d7..fcdfef1 100644 --- a/lib/m17_coder_impl.cc +++ b/lib/m17_coder_impl.cc @@ -46,54 +46,6 @@ namespace gr { struct LSF lsf; -void send_Preamble(const uint8_t type,float *out, int *counterout) -{ - float symb; - - if(type) //pre-BERT - { - for(uint16_t i=0; i<(int)(192/2); i++) //40ms * 4800 = 192 - { - symb=-3.0; - // write(STDOUT_FILENO, (uint8_t*)&symb, sizeof(float)); - out[*counterout]=symb; - *counterout=(*counterout)+1; - symb=+3.0; - // write(STDOUT_FILENO, (uint8_t*)&symb, sizeof(float)); - out[*counterout]=symb; - *counterout=(*counterout)+1; - } - } - else //pre-LSF - { - for(uint16_t i=0; i<(int)(192/2); i++) //40ms * 4800 = 192 - { - symb=+3.0; - // write(STDOUT_FILENO, (uint8_t*)&symb, sizeof(float)); - out[*counterout]=symb; - *counterout=(*counterout)+1; - symb=-3.0; - // write(STDOUT_FILENO, (uint8_t*)&symb, sizeof(float)); - out[*counterout]=symb; - *counterout=(*counterout)+1; - } - } -} - -// now ../M17_Implementations/SP5WWP/lib/lib.c:void send_syncword(const uint16_t syncword) -void send_Syncword(const uint16_t sword, float *out, int *counterout) -{ - float symb; - - for(uint8_t i=0; i<16; i+=2) - { - symb=symbol_map[(sword>>(14-i))&3]; - // write(STDOUT_FILENO, (uint8_t*)&symb, sizeof(float)); - out[*counterout]=symb; - *counterout=(*counterout)+1; - } -} - m17_coder::sptr m17_coder::make(std::string src_id,std::string dst_id,short type,std::string meta, bool debug) { @@ -193,7 +145,7 @@ void m17_coder_impl::set_type(short type) float *out = (float *) output_items[0]; int countin=0; - int countout=0; + uint32_t countout=0; uint8_t enc_bits[SYM_PER_PLD*2]; //type-2 bits, unpacked uint8_t rf_bits[SYM_PER_PLD*2]; //type-4 bits, unpacked @@ -203,7 +155,7 @@ void m17_coder_impl::set_type(short type) uint8_t data[16]; //raw payload, packed bits uint8_t lich_cnt=0; //0..5 LICH counter, derived from the Frame Number - while (countout