⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a808mdlg.h

📁 1.使用串口同两块west4170(PID控制温度仪表). 2.可以显示当前温度,并可设定参数(主要是设定温度)
💻 H
字号:
// A808MDlg.h : header file
//
//{{AFX_INCLUDES()
#include "SerialPort.h"
//}}AFX_INCLUDES

#if !defined(AFX_A808MDLG_H__BA1F9565_09C6_415D_8E08_3601E35FBCC1__INCLUDED_)
#define AFX_A808MDLG_H__BA1F9565_09C6_415D_8E08_3601E35FBCC1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "HistogramCtrl.h"
#include "M808.h"

/////////////////////////////////////////////////////////////////////////////
// CA808MDlg dialog
const BYTE	STX[1]={0x2};				//start
const BYTE	ETX[1]={0x3};				//End 
const BYTE	EOT[1]={0x4};				//
const BYTE	ENQ[1]={0x5};				//
const BYTE	ACK[1]={0x6};				//OK
const BYTE	NAK[1]={0x15};				//Error
const BYTE	BUSY[1]={0x7};				//忙信号

class CA808MDlg : public CDialog
{
		enum{PARAMETER_ONE =1000};

	// Construction
public:
	CA808MDlg(CWnd* pParent = NULL);	// standard constructor

	// Dialog Data
	//{{AFX_DATA(CA808MDlg)
	enum { IDD = IDD_A808M_DIALOG };
	//}}AFX_DATA
	
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CA808MDlg)
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
	
	CByteArray m_pRxdatd;			//收到的数据
	bool	m_shortProcess;			//当按下功能键时,前一个数的处理过程还未完成标志为T,完成即为F
public:
	void SendData();

	CM808*	m_ctrlHistogram;
	int count;
	CSerialPort m_ctrlComm;		//串口类
	// Implementation
protected:
	
	
	HICON m_hIcon;
	
	// Generated message map functions
	//{{AFX_MSG(CA808MDlg)
	virtual BOOL OnInitDialog();		//初始化处理
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonOpenCom();		//打开通讯口按钮
	afx_msg void OnButtonStartWork();	//开始工作按钮
	afx_msg void OnTimer(UINT nIDEvent);	//处理不正常数据
	afx_msg LONG OnCommunication(WPARAM ch,LPARAM port);
	afx_msg void OnDestroy();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
		DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_A808MDLG_H__BA1F9565_09C6_415D_8E08_3601E35FBCC1__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -