Fix introduced CPU consumption bug.
This commit is contained in:
@@ -184,7 +184,7 @@ int air_modes_preamble::general_work(int noutput_items,
|
||||
if(!valid_preamble) continue;
|
||||
|
||||
//be sure we've got enough room in the input buffer to copy out a whole packet
|
||||
if(ninputs-i < d_check_width) {
|
||||
if(ninputs-i < 240*d_samples_per_chip) {
|
||||
consume_each(std::max(i-1,0));
|
||||
if(0) std::cout << "Preamble consumed " << std::max(i-1,0) << ", returned 0 (no room)" << std::endl;
|
||||
return 0;
|
||||
|
||||
@@ -60,8 +60,8 @@ void air_modes_slicer::set_rate(int channel_rate)
|
||||
d_chip_rate = 2000000; //2Mchips per second
|
||||
d_samples_per_chip = 2;//FIXME this is constant now channel_rate / d_chip_rate;
|
||||
d_samples_per_symbol = d_samples_per_chip * 2;
|
||||
d_check_width = 240 * d_samples_per_symbol; //how far you will have to look ahead
|
||||
set_output_multiple(d_check_width); //how do you specify buffer size for sinks?
|
||||
d_check_width = 120 * d_samples_per_symbol; //how far you will have to look ahead
|
||||
set_output_multiple(d_check_width*2); //how do you specify buffer size for sinks?
|
||||
}
|
||||
|
||||
//this slicer is courtesy of Lincoln Labs. supposedly it is more resistant to mode A/C FRUIT.
|
||||
|
||||
Reference in New Issue
Block a user