init
This commit is contained in:
44
device/SerialPort/SerialPort.h
Normal file
44
device/SerialPort/SerialPort.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
#include <tchar.h>
|
||||
#include <math.h>
|
||||
#include <iostream>
|
||||
#include <process.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <conio.h>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
|
||||
#include<QObject>
|
||||
#include"base.h"
|
||||
|
||||
|
||||
|
||||
class Comm{
|
||||
public:
|
||||
HANDLE m_hComm;// 串口设备句柄
|
||||
CRITICAL_SECTION mCsRead;
|
||||
QString com;
|
||||
int nBaudRate;
|
||||
int nParity;
|
||||
int nByteSize;
|
||||
int nStopBits;
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
Comm(void);
|
||||
~Comm(void);
|
||||
float pidP;
|
||||
float dstPower;
|
||||
public:
|
||||
//bool OpenComm(wchar_t* pPort);
|
||||
bool OpenComm();
|
||||
bool CloseComm();
|
||||
int SendCmd(char *data, unsigned short data_len ,unsigned char * revData, int * revData_len);
|
||||
int getSerialSet(QString DevName);
|
||||
};
|
||||
Reference in New Issue
Block a user