sync up with github
This commit is contained in:
parent
3987108195
commit
a7a75dcd09
|
@ -1,7 +1,7 @@
|
|||
#ifndef _XT_GUI_WAVE_H_
|
||||
#define _XT_GUI_WAVE_H_
|
||||
#ifndef _WAVE_BUFFER_H_
|
||||
#define _WAVE_BUFFER_H_
|
||||
|
||||
#define WAVE_BUFFER_LEN 64
|
||||
#define WAVE_BUFFER_LEN 1024
|
||||
#define WAVE_FRAME_LEN 8
|
||||
#define BUFFER_EMPTY -1111
|
||||
#define BUFFER_FULL -2222;
|
||||
|
|
|
@ -9,10 +9,10 @@ typedef enum
|
|||
|
||||
typedef enum
|
||||
{
|
||||
GAIN_025,
|
||||
GAIN_050,
|
||||
GAIN_100,
|
||||
GAIN_200
|
||||
ZOOM_025,
|
||||
ZOOM_050,
|
||||
ZOOM_100,
|
||||
ZOOM_200
|
||||
}E_WAVE_GAIN;
|
||||
|
||||
class c_wave_buffer;
|
||||
|
|
|
@ -30,7 +30,7 @@ c_wave_ctrl::c_wave_ctrl()
|
|||
m_pivot_data = 250;
|
||||
m_wave_speed = 4;
|
||||
m_wave_sample_rate = 0;
|
||||
m_gain = GAIN_100;
|
||||
m_gain = ZOOM_100;
|
||||
m_frame_len_map_index = 0;
|
||||
|
||||
m_wave_name_color = m_wave_unit_color = m_wave_color = GLT_RGB(255,0,0);
|
||||
|
@ -139,22 +139,22 @@ void c_wave_ctrl::refresh_wave(unsigned char frame)
|
|||
//gain
|
||||
switch(m_gain)
|
||||
{
|
||||
case GAIN_025:
|
||||
case ZOOM_025:
|
||||
mid = ((mid - m_pivot_data) >> 2) + m_pivot_data;
|
||||
max = ((max - m_pivot_data) >> 2) + m_pivot_data;
|
||||
min = ((min - m_pivot_data) >> 2) + m_pivot_data;
|
||||
break;
|
||||
case GAIN_050:
|
||||
case ZOOM_050:
|
||||
mid = ((mid - m_pivot_data) >> 1) + m_pivot_data;
|
||||
max = ((max - m_pivot_data) >> 1) + m_pivot_data;
|
||||
min = ((min - m_pivot_data) >> 1) + m_pivot_data;
|
||||
break;
|
||||
case GAIN_200:
|
||||
case ZOOM_200:
|
||||
mid = ((mid - m_pivot_data) << 1) + m_pivot_data;
|
||||
max = ((max - m_pivot_data) << 1) + m_pivot_data;
|
||||
min = ((min - m_pivot_data) << 1) + m_pivot_data;
|
||||
break;
|
||||
case GAIN_100:
|
||||
case ZOOM_100:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue