- improved file debug
git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@402 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -159,7 +159,7 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
|
||||
m_agc_gain = std::max(0.0f, std::min(agc_gain_max, m_agc_gain - agc_mu*agc_err));
|
||||
|
||||
// Calculate DC offset correction
|
||||
m_dc_corr = (1-alpha_dc)*m_dc_corr + alpha_dc*(m_vmax + m_vmin);
|
||||
m_dc_corr = (1.f-alpha_dc)*m_dc_corr + alpha_dc*(m_vmax + m_vmin);
|
||||
|
||||
// Signal detection
|
||||
float yd = std::abs(y)-m_vmax;
|
||||
@@ -199,10 +199,6 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
|
||||
{
|
||||
out[outCount++] = (float)0xFFFFFFFF;
|
||||
}
|
||||
if (m_pFile_bits)
|
||||
{
|
||||
fprintf(m_pFile_bits, "%f %f\n", (float)m_sampleCounter/m_sampleRate, accu);
|
||||
}
|
||||
}
|
||||
|
||||
// Zero crossing detector
|
||||
@@ -259,6 +255,10 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
|
||||
if (m_count == 0)
|
||||
{
|
||||
m_count = countReload;
|
||||
if (m_pFile_bits)
|
||||
{
|
||||
fprintf(m_pFile_bits, "%f %f\n", (float)m_sampleCounter/m_sampleRate, y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,7 +267,7 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
|
||||
|
||||
if (m_pFile_y)
|
||||
{
|
||||
fprintf(m_pFile_y, "%f %f %f %f\n", (float)m_sampleCounter/m_sampleRate, y, m_v_sig, m_id_accu);
|
||||
fprintf(m_pFile_y, "%f %f %f %f %f\n", (float)m_sampleCounter/m_sampleRate, y, m_v_sig, m_lag_accu, m_dc_corr);
|
||||
}
|
||||
m_sampleCounter++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user