📄 testfilterdlg.h
字号:
// TestFilterDlg.h : header file
//
#if !defined(AFX_TESTFILTERDLG_H__AD9BB8F3_9092_4DDC_A179_F28AC9FE6F34__INCLUDED_)
#define AFX_TESTFILTERDLG_H__AD9BB8F3_9092_4DDC_A179_F28AC9FE6F34__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define PI 3.14159
/////////////////////////////////////////////////////////////////////////////
// CTestFilterDlg dialog
class CTestFilterDlg : public CDialog
{
// Construction
public:
CTestFilterDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTestFilterDlg)
enum { IDD = IDD_TESTFILTER_DIALOG };
float m_fFreqLow;
float m_fFreqHigh;
float m_fScope;
BOOL m_bFilter;
float m_fDT;
float m_fFsamp;
float m_fPower;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestFilterDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTestFilterDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBtnDrawwave();
afx_msg void OnBtnGenwave();
afx_msg void OnBtnFft();
afx_msg void OnBtnReaddata();
afx_msg void OnBtnJifen();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
float fAccWave[1024];
float fVocWave[1024];
float fFreqData[1024];
/// 获得 (去掉直流分量之后) 电压波形 的 均方根
void GetWavePower(float Wave[], int ptNum, float * pfPower);
// 绘制波形数据
// void DrawWaveData(CRect waveRect, FLOAT Wave[], INT ptNum, FLOAT fWaveMax);
// 绘制波形数据
void DrawWaveData( CRect waveRect, CRect FreqRect,FLOAT Wave[],FLOAT Freq[] , INT ptNum, FLOAT fWaveMax,FLOAT fFreqMax);
// 设置在波形的范围内
float SetWaveDataInScope(FLOAT fValue, FLOAT fMax);
// 绘制频谱数据
// VOID DrawFreqData( CRect FreqRect, FLOAT Freq[], INT ptNum, FLOAT fFreqMax);
// 设置在频谱的范围内
FLOAT SetFreqDataInScope(FLOAT fValue, FLOAT fMax);
// 应用FFT计算
VOID AppFFT(INT ptNum , float Wave[]);
// 快速傅立叶变换函数
VOID kkfft(float pr[],float pi[],int n,int k,float fr[],float fi[],int l,int il);
// 字符转换为整型
INT CharToINT(TCHAR c0, TCHAR c1, TCHAR c2,
TCHAR c3, TCHAR c4, TCHAR c5);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTFILTERDLG_H__AD9BB8F3_9092_4DDC_A179_F28AC9FE6F34__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -