添加debug重定向,添加命令行
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#ifndef if_uart_h__
|
||||
#define if_uart_h__
|
||||
|
||||
|
||||
#include <QObject>
|
||||
#include <interface/interface.h>
|
||||
#include "QTimer"
|
||||
@@ -9,43 +8,38 @@
|
||||
#include <QTimer>
|
||||
#include "QByteArray"
|
||||
#include "base/mycfg.h"
|
||||
#include <QSerialPort> // 提供访问串口的功能
|
||||
#include <QSerialPortInfo> // 提供系统中存在的串口信息
|
||||
|
||||
|
||||
|
||||
#include <QSerialPort> // 提供访问串口的功能
|
||||
#include <QSerialPortInfo> // 提供系统中存在的串口信息
|
||||
|
||||
class if_uart : public InterFace
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
if_uart(mystring com,int bsp):InterFace(){
|
||||
if_uart(mystring com, int bsp) : InterFace()
|
||||
{
|
||||
this->com = com;
|
||||
this->bsp = bsp;
|
||||
serial_=nullptr;
|
||||
serial_open=false;
|
||||
serial_ = nullptr;
|
||||
serial_open = false;
|
||||
}
|
||||
virtual ~if_uart(){
|
||||
if(serial_open==true){
|
||||
virtual ~if_uart()
|
||||
{
|
||||
if (serial_open == true)
|
||||
{
|
||||
serial_->close();
|
||||
delete serial_;
|
||||
}
|
||||
};
|
||||
}
|
||||
void init();
|
||||
int write(myarray data);
|
||||
protected slots:
|
||||
void ready_read_cb();
|
||||
protected:
|
||||
mystring com;
|
||||
int bsp;
|
||||
QSerialPort *serial_;
|
||||
bool serial_open;
|
||||
|
||||
protected:
|
||||
mystring com;
|
||||
int bsp;
|
||||
QSerialPort *serial_;
|
||||
bool serial_open;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user