optimize: Make sure d_count is initialized and reset
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
ace3a50716
commit
cb27aefd13
|
@ -56,7 +56,11 @@ class IQBALANCE_API iqbalance_optimize_c : public gr_sync_block
|
|||
float mag() const { return this->d_mag; }
|
||||
float phase() const { return this->d_phase; }
|
||||
|
||||
void reset(void) { this->d_first = true; this->d_mag = this->d_phase = 0.0f; }
|
||||
void reset(void) {
|
||||
this->d_first = true;
|
||||
this->d_count = 0;
|
||||
this->d_mag = this->d_phase = 0.0f;
|
||||
}
|
||||
|
||||
void forecast (int noutput_items, gr_vector_int &ninput_items_required);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ iqbalance_optimize_c::iqbalance_optimize_c (int period)
|
|||
: gr_sync_block ("optimize_c",
|
||||
gr_make_io_signature(1, 1, sizeof (gr_complex)),
|
||||
gr_make_io_signature(0, 0, 0)),
|
||||
d_period(period), d_first(true), d_mag(0.0f), d_phase(0.0f)
|
||||
d_period(period), d_count(0), d_first(true), d_mag(0.0f), d_phase(0.0f)
|
||||
{
|
||||
message_port_register_out(pmt::mp("iqbal_corr"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue