refactor wave_ctrl

This commit is contained in:
idea4good 2019-01-15 17:23:12 +08:00
parent 5f6a8b33e2
commit aebfd5449c

View File

@ -169,18 +169,14 @@ void c_wave_ctrl::refresh_wave(unsigned char frame)
CORRECT(y_max, m_wave_bottom, m_wave_top);
CORRECT(mid, m_wave_bottom, m_wave_top);
if (m_wave_cursor > m_wave_right)
{
m_wave_cursor = m_wave_left;
}
draw_smooth_vline(y_min, y_max, mid, m_wave_color);
restore_background();
//ring the wave
if ((m_wave_cursor + 1) > m_wave_right)
{
m_wave_cursor = m_wave_left ;
}
else
{
m_wave_cursor++;
}
}
}
void c_wave_ctrl::draw_smooth_vline(int y_min, int y_max, int mid, unsigned int rgb)