From a7a75dcd0982da30ed443f5249023a157e7628b7 Mon Sep 17 00:00:00 2001 From: idea4good Date: Fri, 10 Aug 2018 17:17:37 +0800 Subject: [PATCH] sync up with github --- core/core_include/wave_buffer.h | 6 +++--- core/core_include/wave_ctrl.h | 8 ++++---- core/src/wave_ctrl.cpp | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/core_include/wave_buffer.h b/core/core_include/wave_buffer.h index f40e539..6bf3d6b 100644 --- a/core/core_include/wave_buffer.h +++ b/core/core_include/wave_buffer.h @@ -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; diff --git a/core/core_include/wave_ctrl.h b/core/core_include/wave_ctrl.h index bb21ab6..9343aa2 100644 --- a/core/core_include/wave_ctrl.h +++ b/core/core_include/wave_ctrl.h @@ -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; diff --git a/core/src/wave_ctrl.cpp b/core/src/wave_ctrl.cpp index ebf843c..ed667e2 100644 --- a/core/src/wave_ctrl.cpp +++ b/core/src/wave_ctrl.cpp @@ -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; }