correct handling of array index to avoid segfault
parent
cb3e8b529b
commit
ba2f02b23f
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 38 KiB |
|
@ -465,7 +465,6 @@ do {
|
|||
|
||||
//encode the rest of the frame
|
||||
conv_Encode_Frame(&enc_bits[96], data, _fn);
|
||||
|
||||
//reorder bits
|
||||
for(uint16_t i=0; i<SYM_PER_PLD*2; i++)
|
||||
rf_bits[i]=enc_bits[intrl_seq[i]];
|
||||
|
@ -481,12 +480,6 @@ do {
|
|||
rf_bits[i]=1;
|
||||
}
|
||||
}
|
||||
|
||||
//send dummy symbols (debug)
|
||||
/*float s=0.0;
|
||||
for(uint8_t i=0; i<SYM_PER_PLD; i++) //40ms * 4800 - 8 (syncword)
|
||||
write(STDOUT_FILENO, (uint8_t*)&s, sizeof(float));*/
|
||||
|
||||
float s;
|
||||
for(uint16_t i=0; i<SYM_PER_PLD; i++) //40ms * 4800 - 8 (syncword)
|
||||
{
|
||||
|
@ -504,9 +497,6 @@ do {
|
|||
//increment the Frame Number
|
||||
_fn++;
|
||||
|
||||
//debug-only
|
||||
if(_fn==6*10)
|
||||
return 0;
|
||||
}
|
||||
else //LSF
|
||||
{
|
||||
|
@ -580,11 +570,10 @@ printf("got_lsf=1\n");
|
|||
printf("\n");*/
|
||||
}
|
||||
}
|
||||
} while (countin+16<=noutput_items);
|
||||
} while (countout+16<=noutput_items);
|
||||
// Tell runtime system how many input items we consumed on
|
||||
// each input stream.
|
||||
consume_each (countin);
|
||||
// printf("\nnoutput_items=%d countin=%d countout=%d\n",noutput_items,countin,countout);
|
||||
// Tell runtime system how many output items we produced.
|
||||
return countout;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue