Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BT-Virtual
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
firmware
BT-Virtual
Commits
e5745067
Commit
e5745067
authored
Feb 08, 2023
by
danzu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first push
parents
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1469 additions
and
0 deletions
+1469
-0
bluetooth_queue.cpp
virtual_serial_port/bluetooth_queue.cpp
+51
-0
bluetooth_queue.h
virtual_serial_port/bluetooth_queue.h
+23
-0
bluetoothonlinedevice.cpp
virtual_serial_port/bluetoothonlinedevice.cpp
+189
-0
bluetoothonlinedevice.h
virtual_serial_port/bluetoothonlinedevice.h
+75
-0
com_1.cpp
virtual_serial_port/com_1.cpp
+488
-0
com_1.h
virtual_serial_port/com_1.h
+71
-0
com_1.ui
virtual_serial_port/com_1.ui
+265
-0
main.cpp
virtual_serial_port/main.cpp
+11
-0
virtual_serial_port.pro
virtual_serial_port/virtual_serial_port.pro
+29
-0
virtual_serial_port.pro.user
virtual_serial_port/virtual_serial_port.pro.user
+267
-0
No files found.
virtual_serial_port/bluetooth_queue.cpp
0 → 100644
View file @
e5745067
#include "bluetooth_queue.h"
BulueQueueSTRUCT
BLQ
;
void
BulueQueue_in_data
(
BulueQueueSTRUCT
*
in
,
unsigned
char
data
)
{
in
->
DATA
[
in
->
in_index
++
]
=
data
;
}
unsigned
char
BulueQueue_out_data
(
BulueQueueSTRUCT
*
in
)
{
if
(
in
->
out_index
==
in
->
in_index
)
{
return
0xFF
;
}
else
{
return
in
->
DATA
[
in
->
out_index
++
];
}
}
bool
BulueQueueIsEmty
(
BulueQueueSTRUCT
*
in
)
{
if
(
in
->
out_index
==
in
->
in_index
)
{
return
true
;
}
else
{
return
false
;
}
}
bool
BulueQueueIsBusy
(
BulueQueueSTRUCT
*
in
)
{
if
((
in
->
in_index
+
1
)
==
in
->
out_index
)
{
return
true
;
}
else
{
return
false
;
}
}
void
BulueQueueClear
(
BulueQueueSTRUCT
*
in
)
{
in
->
in_index
=
0
;
in
->
out_index
=
0
;
}
virtual_serial_port/bluetooth_queue.h
0 → 100644
View file @
e5745067
#ifndef BLUETOOTH_QUEUE_H
#define BLUETOOTH_QUEUE_H
typedef
struct
{
unsigned
char
DATA
[
65536
];
unsigned
short
in_index
;
unsigned
short
out_index
;
}
BulueQueueSTRUCT
;
void
BulueQueue_in_data
(
BulueQueueSTRUCT
*
in
,
unsigned
char
data
);
unsigned
char
BulueQueue_out_data
(
BulueQueueSTRUCT
*
in
);
bool
BulueQueueIsBusy
(
BulueQueueSTRUCT
*
in
);
bool
BulueQueueIsEmty
(
BulueQueueSTRUCT
*
in
);
void
BulueQueueClear
(
BulueQueueSTRUCT
*
in
);
extern
BulueQueueSTRUCT
BLQ
;
#endif // BLUETOOTH_QUEUE_H
virtual_serial_port/bluetoothonlinedevice.cpp
0 → 100644
View file @
e5745067
#include "bluetoothonlinedevice.h"
QMap
<
QString
,
BluetoothOnlineDevice
*
>
BluetoothOnlineMan
;
//通过QString可以查找与之关联的BluetooothOnlineDevice的值
BluetoothOnlineDevice
*
BON
;
bool
BluetoothScanDataDeal
(
QByteArray
tem_MAC
,
QByteArray
tem_Name
,
QString
TemNameStatus
)
{
bool
return_value
;
if
(
BluetoothOnlineMan
.
contains
(
tem_MAC
.
toHex
()))
{
//Uupdata the signal value
return_value
=
false
;
}
else
{
BON
=
new
BluetoothOnlineDevice
();
BON
->
MAC
=
tem_MAC
;
BON
->
Name
=
tem_Name
;
BON
->
NameStatus
=
TemNameStatus
;
BON
->
QListIndexLoc
=
255
;
BluetoothOnlineMan
.
insert
(
tem_MAC
.
toHex
(),
BON
);
return_value
=
true
;
}
return
return_value
;
}
bool
BluetoothSignalUpdata
(
QByteArray
tem_MAC
,
QByteArray
tem_Signal
)
{
bool
return_value
;
if
(
BluetoothOnlineMan
.
contains
(
tem_MAC
.
toHex
()))
{
//Uupdata the signal value
BluetoothOnlineMan
[
tem_MAC
.
toHex
()]
->
Singal
=
tem_Signal
;
return_value
=
true
;
}
else
{
return_value
=
false
;
}
return
return_value
;
}
bool
BluetoothBoradNameIsChanged
(
QByteArray
tem_MAC
,
QByteArray
temName
)
{
if
(
BluetoothOnlineMan
.
contains
(
tem_MAC
.
toHex
()))
{
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
if
(
tem
.
value
()
->
MAC
==
tem_MAC
)
{
if
(
tem
.
value
()
->
Name
!=
temName
)
{
tem
.
value
()
->
Name
=
temName
;
return
true
;
}
else
{
return
false
;
}
}
}
}
else
{
return
false
;
}
return
false
;
}
bool
BluetoothIsExist
(
QByteArray
tem_MAC
)
{
bool
return_value
;
if
(
BluetoothOnlineMan
.
contains
(
tem_MAC
.
toHex
()))
{
return_value
=
true
;
}
else
{
return_value
=
false
;
}
return
return_value
;
}
void
BluetoothAddTheQListIndex
(
QByteArray
tem_MAC
,
int
QListIndex
)
{
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
if
(
tem
.
value
()
->
MAC
==
tem_MAC
)
{
tem
.
value
()
->
QListIndexLoc
=
QListIndex
;
return
;
}
}
}
int
BluetoothGetTheQListIndex
(
QByteArray
tem_MAC
)
{
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
if
(
tem
.
value
()
->
MAC
==
tem_MAC
)
{
return
tem
.
value
()
->
QListIndexLoc
;
}
}
return
255
;
}
QString
BluetoothGetShowString
(
QByteArray
tem_MAC
)
{
QString
returnstring
;
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
if
(
tem
.
value
()
->
MAC
==
tem_MAC
)
{
returnstring
=
tem
.
value
()
->
NameStatus
+
tem
.
value
()
->
Name
+
" 信号强度:"
;
if
(
tem
.
value
()
->
Singal
.
toInt
(
NULL
,
16
)
==
0
)
{
returnstring
+=
"Unkown"
;
}
else
{
returnstring
+=
QString
::
number
(
tem
.
value
()
->
Singal
.
toInt
(
NULL
,
16
),
10
)
;
}
returnstring
+=
" dbm"
;
return
returnstring
;
}
}
return
NULL
;
}
void
BluetoothBoradDataDeal
(
QByteArray
tem_MAC
,
QByteArray
tem_Signal
,
QByteArray
tem_boarddata
)
{
if
(
!
BluetoothOnlineMan
.
contains
(
tem_MAC
.
toHex
()))
{
//
return
;
}
else
{
BluetoothOnlineMan
[
tem_MAC
.
toHex
()]
->
Singal
=
tem_Signal
;
}
}
QStringList
GetBluetoothList
()
{
QStringList
Strlist
;
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
Strlist
<<
BluetoothGetShowString
(
tem
.
value
()
->
MAC
);
}
return
Strlist
;
}
void
ClearTheBuletoothOnlineDeciveQmap
()
{
BluetoothOnlineMan
.
clear
();
}
QByteArray
GetBluetoothMAC
(
int
QListIndex
)
{
QByteArray
returnvalue
;
QMap
<
QString
,
BluetoothOnlineDevice
*
>::
iterator
tem
;
for
(
tem
=
BluetoothOnlineMan
.
begin
();
tem
!=
BluetoothOnlineMan
.
end
();
++
tem
)
{
if
(
tem
.
value
()
->
QListIndexLoc
==
QListIndex
)
{
returnvalue
=
tem
.
value
()
->
MAC
;
break
;
}
}
return
returnvalue
;
}
virtual_serial_port/bluetoothonlinedevice.h
0 → 100644
View file @
e5745067
#ifndef BLUETOOTHONLINEDEVICE_H
#define BLUETOOTHONLINEDEVICE_H
#include <QByteArray>
#include <QStringList>
#include <QMap>
#include <qDebug>
class
BluetoothOnlineDevice
{
public
:
QByteArray
MAC
;
QByteArray
Singal
;
int
SingalInt
()
{
bool
ok
;
Singal
.
toInt
(
&
ok
);
if
(
ok
)
{
return
Singal
.
toInt
(
&
ok
);
}
else
{
return
0
;
}
}
QByteArray
Name
;
QString
NameStr
()
{
return
QString
(
Name
);
}
QString
NameStatus
;
int
UUIDNum
;
QStringList
UUID
;
QString
BOARDDATA
;
int
QListIndexLoc
;
};
extern
QMap
<
QString
,
BluetoothOnlineDevice
*
>
BluetoothOnlineMan
;
bool
BluetoothScanDataDeal
(
QByteArray
tem_MAC
,
QByteArray
tem_Name
,
QString
TemNameStatus
);
QString
BluetoothGetShowString
(
QByteArray
tem_MAC
);
bool
BluetoothBoradNameIsChanged
(
QByteArray
tem_MAC
,
QByteArray
temName
);
bool
BluetoothSignalUpdata
(
QByteArray
tem_MAC
,
QByteArray
tem_Signal
);
bool
BluetoothIsExist
(
QByteArray
tem_MAC
);
void
BluetoothBoradDataDeal
(
QByteArray
tem_MAC
,
QByteArray
tem_Signal
,
QByteArray
tem_Name
);
void
BluetoothAddTheQListIndex
(
QByteArray
tem_MAC
,
int
QListIndex
);
QStringList
GetBluetoothList
();
QByteArray
GetBluetoothMAC
(
int
QListIndex
);
void
ClearTheBuletoothOnlineDeciveQmap
();
int
BluetoothGetTheQListIndex
(
QByteArray
tem_MAC
);
#endif // BLUETOOTHONLINEDEVICE_H
virtual_serial_port/com_1.cpp
0 → 100644
View file @
e5745067
#include "com_1.h"
#include "ui_com_1.h"
com_1
::
com_1
(
QWidget
*
parent
)
:
QMainWindow
(
parent
)
,
ui
(
new
Ui
::
com_1
)
{
ui
->
setupUi
(
this
);
connect
(
ui
->
port_refresh
,
&
QPushButton
::
clicked
,
this
,
&
com_1
::
SerRefresh
);
connect
(
ui
->
listWidget
,
&
QListWidget
::
doubleClicked
,
this
,
&
com_1
::
on_BuletoothOnlineList_doubleClicked
);
}
com_1
::~
com_1
()
{
delete
ui
;
}
void
com_1
::
timerEvent
(
QTimerEvent
*
event
)
{
if
(
event
->
timerId
()
==
bluetoothinfoupdata
)
{
for
(
int
i
=
0
;
i
<
ui
->
listWidget
->
count
()
;
i
++
)
{
ui
->
listWidget
->
item
(
BluetoothGetTheQListIndex
(
GetBluetoothMAC
(
i
)))
->
setText
(
BluetoothGetShowString
(
GetBluetoothMAC
(
i
)));
}
}
}
void
com_1
::
SerOpen
(
int
data
)
{
if
(
data
==
115200
)
{
if
(
com_BT
.
isOpen
())
{
com_BT
.
close
();
return
;
}
com_BT
.
setBaudRate
(
QSerialPort
::
Baud115200
);
com_BT
.
setDataBits
(
QSerialPort
::
Data8
);
com_BT
.
setParity
(
QSerialPort
::
NoParity
);
com_BT
.
setStopBits
(
QSerialPort
::
OneStop
);
com_BT
.
setPortName
(
ui
->
port_list
->
currentText
());
com_BT
.
open
(
QIODevice
::
ReadWrite
);
connect
(
&
com_BT
,
&
QSerialPort
::
readyRead
,[
=
](){
BT_port_read_timer
.
start
(
25
);});
connect
(
&
BT_port_read_timer
,
&
QTimer
::
timeout
,
this
,
&
com_1
::
BT_port_read
);
}
if
(
data
==
9600
)
{
if
(
com_VT
.
isOpen
())
{
com_VT
.
close
();
return
;
}
com_VT
.
setBaudRate
(
QSerialPort
::
Baud9600
);
com_VT
.
setDataBits
(
QSerialPort
::
Data8
);
com_VT
.
setParity
(
QSerialPort
::
NoParity
);
com_VT
.
setStopBits
(
QSerialPort
::
OneStop
);
com_VT
.
setPortName
(
ui
->
port_list_VT
->
currentText
());
com_VT
.
open
(
QIODevice
::
ReadWrite
);
connect
(
&
com_VT
,
&
QSerialPort
::
readyRead
,
this
,
&
com_1
::
VT_port_read
);
}
}
void
com_1
::
SerRefresh
()
{
ui
->
port_list
->
clear
();
foreach
(
const
QSerialPortInfo
&
info
,
QSerialPortInfo
::
availablePorts
())
{
ui
->
port_list
->
addItem
(
info
.
portName
());
}
}
void
com_1
::
on_port_open_clicked
()
{
if
(
ui
->
port_list
->
currentText
()
==
ui
->
port_list_VT
->
currentText
())
{
QMessageBox
::
information
(
this
,
"错误!!!"
,
"蓝牙串口COM口与虚拟串口COM口相同,请重新选择"
,
QMessageBox
::
Ok
);
return
;
}
if
(
com_BT
.
isOpen
())
{
com_BT
.
close
();
ui
->
port_open
->
setText
(
"打开串口"
);
ui
->
port_state
->
setText
(
"串口未连接"
);
ui
->
port_refresh
->
setEnabled
(
true
);
ui
->
port_list
->
setEnabled
(
true
);
return
;
}
else
{
if
(
ui
->
port_list
->
count
()
==
0
)
{
QMessageBox
::
information
(
this
,
"错误!!!"
,
"请先点击刷新串口"
,
QMessageBox
::
Ok
);
return
;
}
ui
->
port_open
->
setText
(
"关闭串口"
);
ui
->
port_state
->
setText
(
"串口已连接"
);
ui
->
port_refresh
->
setEnabled
(
false
);
ui
->
port_list
->
setEnabled
(
false
);
BT_port_open_work
();
}
}
void
com_1
::
BT_port_open_work
()
{
if
(
com_BT
.
isOpen
())
{
QTimer
::
singleShot
(
10
,[
=
](){
com_BT
.
write
(
GetSendAtCommand
(
"AT+AUTOCONN_ENABLE=0"
));});
QTimer
::
singleShot
(
20
,[
=
](){
com_BT
.
write
(
GetSendAtCommand
(
"AT+SHUTDOWN"
));});
if
(
bluetoothinfoupdata
)
killTimer
(
bluetoothinfoupdata
);
ui
->
port_open
->
setEnabled
(
false
);
QTimer
::
singleShot
(
1000
,[
=
]()
{
SerOpen
(
115200
);
});
return
;
}
SerOpen
(
115200
);
if
(
com_BT
.
isOpen
())
{
ClearTheBuletoothOnlineDeciveQmap
();
//BluetoothOnlineMan.clear();
ui
->
listWidget
->
clear
();
ui
->
BT_state
->
setText
(
"正在搜索附近蓝牙"
);
bluetoothinfoupdata
=
startTimer
(
500
);
com_BT
.
write
(
GetSendAtCommand
(
"AT+SHUTDOWN"
));
QTimer
::
singleShot
(
1000
,[
=
](){
com_BT
.
write
(
GetSendAtCommand
(
"AT+START_SCAN=1"
));});
QTimer
::
singleShot
(
1100
,[
=
](){
com_BT
.
write
(
GetSendAtCommand
(
"AT+SCAN_RES=3"
));});
QTimer
::
singleShot
(
1200
,[
=
](){
com_BT
.
write
(
GetSendAtCommand
(
"AT+AUTOCONN_ENABLE=0"
));});
}
}
void
com_1
::
BT_port_read
()
{
BT_port_read_timer
.
stop
();
if
(
!
com_BT
.
isOpen
())
{
return
;
}
QByteArray
port_read_buffer
=
com_BT
.
readAll
();
if
(
port_read_buffer
.
isEmpty
())
{
qDebug
()
<<
"串口无返回数据"
;
return
;
}
com_VT
.
write
(
port_read_buffer
);
// qDebug()<<QDateTime::currentDateTime().toString("hh:mm:ss zzz(yyyy-MM-dd)")<<port_read_buffer;
if
(
ui
->
BT_state
->
text
()
==
"正在搜索附近蓝牙"
)
{
BluetoothReceiveDataDeal
(
port_read_buffer
);
// qDebug()<<QDateTime::currentDateTime().toString("hh:mm:ss zzz(yyyy-MM-dd)")<<port_read_buffer;
return
;
}
}
void
com_1
::
BluetoothReceiveDataDeal
(
QByteArray
data
)
{
QByteArray
CommandContent
;
int
MeetTheAtCommand
=
0
;
QByteArray
NeedInsertData
;
while
(
!
BulueQueueIsEmty
(
&
BLQ
))
{
NeedInsertData
.
append
(
BulueQueue_out_data
(
&
BLQ
));
}
if
(
!
NeedInsertData
.
isEmpty
())
{
data
.
insert
(
0
,
NeedInsertData
);
}
for
(
int
i
=
0
;
i
<
data
.
length
();
i
++
)
{
if
(
data
[
i
]
==
'A'
)
{
MeetTheAtCommand
=
1
;
CommandContent
.
append
(
data
[
i
]);
}
else
if
(
data
[
i
]
==
'T'
&&
(
MeetTheAtCommand
==
1
))
{
MeetTheAtCommand
=
2
;
while
((
data
[
i
]
!=
'\r'
)
||
(
data
[
i
+
1
]
!=
'\n'
))
{
CommandContent
.
append
(
data
[
i
]);
if
(
i
<
data
.
length
()
-
1
)
{
i
++
;
}
else
{
if
(
BulueQueueIsBusy
(
&
BLQ
))
{
QMessageBox
::
information
(
this
,
"错误!!!"
,
"蓝牙名称存储过多,请重启"
,
QMessageBox
::
Ok
);
return
;
}
else
{
for
(
int
i
=
0
;
i
<
CommandContent
.
length
();
i
++
)
{
BulueQueue_in_data
(
&
BLQ
,
CommandContent
[
i
]);
}
QMessageBox
::
information
(
this
,
"错误!!!"
,
"产生断包数据,请重启"
,
QMessageBox
::
Ok
);
return
;
}
}
}
AtAnslysis
(
CommandContent
);
// qDebug()<<CommandContent;
MeetTheAtCommand
=
0
;
CommandContent
.
clear
();
i
++
;
}
else
{
QMessageBox
::
information
(
this
,
"警告!!!"
,
"AT指令集数据解析异常,请重启"
,
QMessageBox
::
Ok
);
return
;
}
}
}
void
com_1
::
AtAnslysis
(
QByteArray
str
)
{
if
(
QString
(
str
)
==
"AT+OK"
)
{
qDebug
()
<<
"蓝牙模块开启成功"
;
return
;
}
else
if
(
QString
(
str
).
contains
(
"CON_SUCCESS"
)
&&
(
QString
(
str
).
contains
(
"DISCON_SUCCESS"
)
==
false
))
{
ui
->
BT_state
->
setText
(
"蓝牙已连接"
);
QMessageBox
::
information
(
this
,
"警告!!!"
,
"蓝牙连接成功,可以读取数据"
,
QMessageBox
::
Ok
);
return
;
}
int
i
=
0
;
QByteArray
tem_athead
;
for
(;((
i
<
str
.
length
())
&&
(
str
[
i
]
!=
'+'
));
i
++
)
{
tem_athead
.
append
(
str
[
i
]);
}
if
(
i
<
str
.
length
()){
i
++
;}
else
{
return
;}
//remove+
QByteArray
temATContent
;
for
(;((
i
<
str
.
length
())
&&
(
str
[
i
]
!=
'='
));
i
++
)
{
temATContent
.
append
(
str
[
i
]);
}
if
((
QString
(
temATContent
)
==
"SCAN"
)
||
(
QString
(
temATContent
)
==
"BOARD"
))
{
if
(
i
<
str
.
length
()){
i
++
;}
else
{
return
;}
//remove the =
if
(
i
<
str
.
length
()){
i
++
;}
else
{
return
;}
//remove the 0
if
(
i
<
str
.
length
()){
i
++
;}
else
{
return
;}
//remove the x
QByteArray
tem_MAC
;
for
(;((
i
<
str
.
length
())
&&
(
str
[
i
]
!=
'-'
));
i
++
)
{
tem_MAC
.
append
(
str
[
i
]);
}
QByteArray
tem_Signal
;
for
(;((
i
<
str
.
length
())
&&
(
str
[
i
]
!=
','
));
i
++
)
{
tem_Signal
.
append
(
str
[
i
]);
}
if
((
QString
(
temATContent
)
==
"BOARD"
))
BluetoothSignalUpdata
(
tem_MAC
,
tem_Signal
);
if
(
i
<
str
.
length
()){
i
++
;}
else
{
return
;}
// move the ","
if
(
BluetoothIsExist
(
tem_MAC
))
{
int
GetBluetoothMacRow
=
BluetoothGetTheQListIndex
(
tem_MAC
);
if
(
GetBluetoothMacRow
==
255
)
{
BluetoothAddTheQListIndex
(
tem_MAC
,
ui
->
listWidget
->
count
());
ui
->
listWidget
->
addItem
(
BluetoothGetShowString
(
tem_MAC
));
}
}
unsigned
char
LengthData
;
unsigned
char
TypeData
;
QByteArray
ValueData
;
while
(
i
<
str
.
length
())
{
LengthData
=
str
[
i
++
];
TypeData
=
str
[
i
++
];
for
(
unsigned
char
j
=
0
;
j
<
(
LengthData
-
1
);
j
++
)
{
ValueData
[
j
]
=
str
[
i
++
];
}
if
(
TypeData
==
1
)
{
//广播模式
}
else
if
(
TypeData
==
2
)
{
// 16bit uuid
}
else
if
(
TypeData
==
6
)
{
// 128bit uuid
}
else
if
(
TypeData
==
8
||
TypeData
==
9
)
{
// 设备名称 Complete local name
QString
ShowNameStatus
;
if
(
TypeData
==
8
)
{
ShowNameStatus
=
"蓝牙名称(简洁): "
;
}
else
{
ShowNameStatus
=
"蓝牙名称(完整): "
;
}
if
(
BluetoothScanDataDeal
(
tem_MAC
,
ValueData
,
ShowNameStatus
))
{
qDebug
()
<<
"发现蓝牙-->MAC地址:"
<<
tem_MAC
+
ShowNameStatus
+
ValueData
;
}
else
{
if
(
BluetoothBoradNameIsChanged
(
tem_MAC
,
ValueData
))
{
qDebug
()
<<
"蓝牙名称发生变更-->产生变更的MAC地址为:"
<<
tem_MAC
<<
"新蓝牙名称为:"
<<
ValueData
;
}
}
}
else
if
(
TypeData
==
0XA
)
{
// 发射功率: 0xXX: -127 to +127 dBm
}
else
if
(
TypeData
==
0X1A
)
{
// 广播间隔
}
else
if
(
TypeData
==
0X1B
)
{
// 设备地址
}
else
if
(
TypeData
==
0XFF
)
{
// 厂商标识,用户可以自己任意填写内容。
}
else
{
qDebug
()
<<
"接收到未定义广播关键字"
;
}
ValueData
.
clear
();
}
}
}
void
com_1
::
on_BuletoothOnlineList_doubleClicked
(
const
QModelIndex
&
index
)
{
if
(
com_BT
.
isOpen
()
==
false
)
{
return
;
}
if
(
QMessageBox
::
warning
(
this
,
"提示"
,
"是否连接此蓝牙:
\n
"
+
index
.
data
().
toString
(),
QMessageBox
::
Yes
|
QMessageBox
::
No
)
==
QMessageBox
::
No
)
{
return
;
}
if
(
bluetoothinfoupdata
)
killTimer
(
bluetoothinfoupdata
);
com_BT
.
write
(
GetSendAtCommand
(
"AT+SCAN_RES=0"
));
// QTimer::singleShot(10,[=]()
// {
// QByteArray SendCombin;
// SendCombin.append(QString("AT+CON_16=").toLocal8Bit()).append(GetBluetoothMAC(index.row())).append(QString(",FFD0").toLocal8Bit()).append('\r').append('\n');
// send(SendCombin);
// });
// QTimer::singleShot(20,[=]()
// {
// send(GetSendAtCommand("AT+W_DCH=0,0"));
// });
// QTimer::singleShot(25,[=]()
// {
// QByteArray SendCombinN;
// SendCombinN.append(QString("AT+CON_16=").toLocal8Bit()).append(GetBluetoothMAC(index.row())).append(QString(",FFF0").toLocal8Bit()).append('\r').append('\n');
// send(SendCombinN);
// });
// QTimer::singleShot(30,[=]()
// {
// send(GetSendAtCommand("AT+R_DCH=0,1"));
// });
QTimer
::
singleShot
(
40
,[
=
]()
{
com_BT
.
write
(
GetSendAtCommand
(
"AT+AUTOCONN_ENABLE=1"
));
});
QTimer
::
singleShot
(
50
,[
=
]()
{
QByteArray
SendCombinN
;
SendCombinN
.
append
(
QString
(
"AT+AUTOCONN="
).
toLocal8Bit
()).
append
(
GetBluetoothMAC
(
index
.
row
())).
append
(
QString
(
",FFD0"
).
toLocal8Bit
()).
append
(
'\r'
).
append
(
'\n'
);
com_BT
.
write
(
SendCombinN
);
});
QTimer
::
singleShot
(
60
,[
=
]()
{
QByteArray
SendCombinN
;
SendCombinN
.
append
(
QString
(
"AT+AUTOCONN="
).
toLocal8Bit
()).
append
(
GetBluetoothMAC
(
index
.
row
())).
append
(
QString
(
",FFF0"
).
toLocal8Bit
()).
append
(
'\r'
).
append
(
'\n'
);
com_BT
.
write
(
SendCombinN
);
});
}
QByteArray
com_1
::
GetSendAtCommand
(
QString
str
)
{
QByteArray
returndata
;
returndata
=
str
.
toLocal8Bit
().
append
(
'\r'
).
append
(
'\n'
);
return
returndata
;
}
void
com_1
::
on_port_refresh_VT_clicked
()
{
ui
->
port_list_VT
->
clear
();
foreach
(
const
QSerialPortInfo
&
info
,
QSerialPortInfo
::
availablePorts
())
{
ui
->
port_list_VT
->
addItem
(
info
.
portName
());
}
}
void
com_1
::
on_port_open_VT_clicked
()
{
if
(
ui
->
port_list
->
currentText
()
==
ui
->
port_list_VT
->
currentText
())
{
QMessageBox
::
information
(
this
,
"错误!!!"
,
"蓝牙串口COM口与虚拟串口COM口相同,请重新选择"
,
QMessageBox
::
Ok
);
return
;
}
if
(
com_VT
.
isOpen
())
{
com_VT
.
close
();
ui
->
port_open_VT
->
setText
(
"打开串口"
);
ui
->
port_state_VT
->
setText
(
"串口未连接"
);
ui
->
port_refresh_VT
->
setEnabled
(
true
);
ui
->
port_list_VT
->
setEnabled
(
true
);
return
;
}
else
{
if
(
ui
->
port_list_VT
->
count
()
==
0
)
{
QMessageBox
::
information
(
this
,
"错误!!!"
,
"请先点击刷新串口"
,
QMessageBox
::
Ok
);
return
;
}
ui
->
port_open_VT
->
setText
(
"关闭串口"
);
ui
->
port_state_VT
->
setText
(
"串口已连接"
);
ui
->
port_refresh_VT
->
setEnabled
(
false
);
ui
->
port_list_VT
->
setEnabled
(
false
);
VT_port_open_work
();
}
}
void
com_1
::
VT_port_open_work
()
{
if
(
com_VT
.
isOpen
())
{
ui
->
port_open
->
setEnabled
(
false
);
return
;
}
SerOpen
(
9600
);
}
void
com_1
::
VT_port_read
()
{
if
(
!
com_VT
.
isOpen
())
{
return
;
}
QByteArray
VT_port_read_buffer
=
com_VT
.
readAll
();
qDebug
()
<<
"虚拟串口写入数据:"
<<
VT_port_read_buffer
;
com_BT
.
write
(
VT_port_read_buffer
);
}
virtual_serial_port/com_1.h
0 → 100644
View file @
e5745067
#ifndef COM_1_H
#define COM_1_H
#include <QMainWindow>
#include "QDebug"
#include "QtSerialPort/QSerialPort"
#include "QtSerialPort/QSerialPortInfo"
#include "QMessageBox"
#include "QTimer"
#include "QByteArray"
#include "bluetooth_queue.h"
#include "bluetoothonlinedevice.h"
#include "QDateTime"
#include "QTimerEvent"
#include "QByteArray"
QT_BEGIN_NAMESPACE
namespace
Ui
{
class
com_1
;
}
QT_END_NAMESPACE
class
com_1
:
public
QMainWindow
{
Q_OBJECT
public
:
com_1
(
QWidget
*
parent
=
nullptr
);
~
com_1
();
QSerialPort
com_BT
;
QSerialPort
com_VT
;
QTimer
BT_port_read_timer
;
void
SerOpen
(
int
data
);
void
BT_port_read
();
void
VT_port_read
();
void
BluetoothReceiveDataDeal
(
QByteArray
data
);
void
AtAnslysis
(
QByteArray
str
);
QByteArray
GetSendAtCommand
(
QString
str
);
void
BT_port_open_work
();
void
timerEvent
(
QTimerEvent
*
event
);
void
VT_port_open_work
();
private
:
Ui
::
com_1
*
ui
;
int
bluetoothinfoupdata
=
0
;
private
slots
:
void
SerRefresh
();
void
on_port_open_clicked
();
void
on_BuletoothOnlineList_doubleClicked
(
const
QModelIndex
&
index
);
void
on_port_refresh_VT_clicked
();
void
on_port_open_VT_clicked
();
};
#endif // COM_1_H
virtual_serial_port/com_1.ui
0 → 100644
View file @
e5745067
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
com_1
</class>
<widget
class=
"QMainWindow"
name=
"com_1"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
733
</width>
<height>
578
</height>
</rect>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"windowTitle"
>
<string>
com_1
</string>
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_3"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"currentIndex"
>
<number>
1
</number>
</property>
<widget
class=
"QWidget"
name=
"tab"
>
<attribute
name=
"title"
>
<string>
蓝牙串口
</string>
</attribute>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QComboBox"
name=
"port_list"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"port_refresh"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
刷新串口
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"port_open"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
打开串口
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"port_state"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
串口未连接
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QListWidget"
name=
"listWidget"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"BT_state"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
蓝牙未连接
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_2"
>
<attribute
name=
"title"
>
<string>
虚拟串口
</string>
</attribute>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
186
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QSplitter"
name=
"splitter"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<widget
class=
"QComboBox"
name=
"port_list_VT"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"port_refresh_VT"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
刷新串口
</string>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"port_open_VT"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
打开串口
</string>
</property>
</widget>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"port_state_VT"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"font"
>
<font>
<pointsize>
17
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
串口未连接
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"2"
column=
"0"
>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
186
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QMenuBar"
name=
"menubar"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
733
</width>
<height>
36
</height>
</rect>
</property>
</widget>
<widget
class=
"QStatusBar"
name=
"statusbar"
/>
</widget>
<resources/>
<connections/>
</ui>
virtual_serial_port/main.cpp
0 → 100644
View file @
e5745067
#include "com_1.h"
#include <QApplication>
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
a
(
argc
,
argv
);
com_1
w
;
w
.
show
();
return
a
.
exec
();
}
virtual_serial_port/virtual_serial_port.pro
0 → 100644
View file @
e5745067
QT
+=
core
gui
QT
+=
serialport
greaterThan
(
QT_MAJOR_VERSION
,
4
)
:
QT
+=
widgets
CONFIG
+=
c
++
11
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES
+=
\
bluetooth_queue
.
cpp
\
bluetoothonlinedevice
.
cpp
\
main
.
cpp
\
com_1
.
cpp
HEADERS
+=
\
bluetooth_queue
.
h
\
bluetoothonlinedevice
.
h
\
com_1
.
h
FORMS
+=
\
com_1
.
ui
# Default rules for deployment.
qnx
:
target
.
path
=
/
tmp
/
$$
{
TARGET
}
/
bin
else
:
unix
:
!
android
:
target
.
path
=
/
opt
/
$$
{
TARGET
}
/
bin
!
isEmpty
(
target
.
path
)
:
INSTALLS
+=
target
virtual_serial_port/virtual_serial_port.pro.user
0 → 100644
View file @
e5745067
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 6.0.2, 2023-02-07T19:40:44. -->
<qtcreator>
<data>
<variable>
EnvironmentId
</variable>
<value
type=
"QByteArray"
>
{5518edeb-9bf7-4099-b905-dafaac1b0c2d}
</value>
</data>
<data>
<variable>
ProjectExplorer.Project.ActiveTarget
</variable>
<value
type=
"qlonglong"
>
0
</value>
</data>
<data>
<variable>
ProjectExplorer.Project.EditorSettings
</variable>
<valuemap
type=
"QVariantMap"
>
<value
type=
"bool"
key=
"EditorConfiguration.AutoIndent"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.AutoSpacesForTabs"
>
false
</value>
<value
type=
"bool"
key=
"EditorConfiguration.CamelCaseNavigation"
>
true
</value>
<valuemap
type=
"QVariantMap"
key=
"EditorConfiguration.CodeStyle.0"
>
<value
type=
"QString"
key=
"language"
>
Cpp
</value>
<valuemap
type=
"QVariantMap"
key=
"value"
>
<value
type=
"QByteArray"
key=
"CurrentPreferences"
>
CppGlobal
</value>
</valuemap>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"EditorConfiguration.CodeStyle.1"
>
<value
type=
"QString"
key=
"language"
>
QmlJS
</value>
<valuemap
type=
"QVariantMap"
key=
"value"
>
<value
type=
"QByteArray"
key=
"CurrentPreferences"
>
QmlJSGlobal
</value>
</valuemap>
</valuemap>
<value
type=
"qlonglong"
key=
"EditorConfiguration.CodeStyle.Count"
>
2
</value>
<value
type=
"QByteArray"
key=
"EditorConfiguration.Codec"
>
UTF-8
</value>
<value
type=
"bool"
key=
"EditorConfiguration.ConstrainTooltips"
>
false
</value>
<value
type=
"int"
key=
"EditorConfiguration.IndentSize"
>
4
</value>
<value
type=
"bool"
key=
"EditorConfiguration.KeyboardTooltips"
>
false
</value>
<value
type=
"int"
key=
"EditorConfiguration.MarginColumn"
>
80
</value>
<value
type=
"bool"
key=
"EditorConfiguration.MouseHiding"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.MouseNavigation"
>
true
</value>
<value
type=
"int"
key=
"EditorConfiguration.PaddingMode"
>
1
</value>
<value
type=
"bool"
key=
"EditorConfiguration.PreferSingleLineComments"
>
false
</value>
<value
type=
"bool"
key=
"EditorConfiguration.ScrollWheelZooming"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.ShowMargin"
>
false
</value>
<value
type=
"int"
key=
"EditorConfiguration.SmartBackspaceBehavior"
>
0
</value>
<value
type=
"bool"
key=
"EditorConfiguration.SmartSelectionChanging"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.SpacesForTabs"
>
true
</value>
<value
type=
"int"
key=
"EditorConfiguration.TabKeyBehavior"
>
0
</value>
<value
type=
"int"
key=
"EditorConfiguration.TabSize"
>
8
</value>
<value
type=
"bool"
key=
"EditorConfiguration.UseGlobal"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.UseIndenter"
>
false
</value>
<value
type=
"int"
key=
"EditorConfiguration.Utf8BomBehavior"
>
1
</value>
<value
type=
"bool"
key=
"EditorConfiguration.addFinalNewLine"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.cleanIndentation"
>
true
</value>
<value
type=
"bool"
key=
"EditorConfiguration.cleanWhitespace"
>
true
</value>
<value
type=
"QString"
key=
"EditorConfiguration.ignoreFileTypes"
>
*.md, *.MD, Makefile
</value>
<value
type=
"bool"
key=
"EditorConfiguration.inEntireDocument"
>
false
</value>
<value
type=
"bool"
key=
"EditorConfiguration.skipTrailingWhitespace"
>
true
</value>
</valuemap>
</data>
<data>
<variable>
ProjectExplorer.Project.PluginSettings
</variable>
<valuemap
type=
"QVariantMap"
>
<valuemap
type=
"QVariantMap"
key=
"AutoTest.ActiveFrameworks"
>
<value
type=
"bool"
key=
"AutoTest.Framework.Boost"
>
true
</value>
<value
type=
"bool"
key=
"AutoTest.Framework.CTest"
>
false
</value>
<value
type=
"bool"
key=
"AutoTest.Framework.Catch"
>
true
</value>
<value
type=
"bool"
key=
"AutoTest.Framework.GTest"
>
true
</value>
<value
type=
"bool"
key=
"AutoTest.Framework.QtQuickTest"
>
true
</value>
<value
type=
"bool"
key=
"AutoTest.Framework.QtTest"
>
true
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"AutoTest.CheckStates"
/>
<value
type=
"int"
key=
"AutoTest.RunAfterBuild"
>
0
</value>
<value
type=
"bool"
key=
"AutoTest.UseGlobal"
>
true
</value>
<valuelist
type=
"QVariantList"
key=
"ClangCodeModel.CustomCommandLineKey"
>
<value
type=
"QString"
>
-fno-delayed-template-parsing
</value>
</valuelist>
<value
type=
"bool"
key=
"ClangCodeModel.UseGlobalConfig"
>
true
</value>
<value
type=
"QString"
key=
"ClangCodeModel.WarningConfigId"
>
Builtin.BuildSystem
</value>
<valuemap
type=
"QVariantMap"
key=
"ClangTools"
>
<value
type=
"bool"
key=
"ClangTools.AnalyzeOpenFiles"
>
true
</value>
<value
type=
"bool"
key=
"ClangTools.BuildBeforeAnalysis"
>
true
</value>
<value
type=
"QString"
key=
"ClangTools.DiagnosticConfig"
>
Builtin.DefaultTidyAndClazy
</value>
<value
type=
"int"
key=
"ClangTools.ParallelJobs"
>
8
</value>
<valuelist
type=
"QVariantList"
key=
"ClangTools.SelectedDirs"
/>
<valuelist
type=
"QVariantList"
key=
"ClangTools.SelectedFiles"
/>
<valuelist
type=
"QVariantList"
key=
"ClangTools.SuppressedDiagnostics"
/>
<value
type=
"bool"
key=
"ClangTools.UseGlobalSettings"
>
true
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"CppEditor.QuickFix"
>
<value
type=
"bool"
key=
"UseGlobalSettings"
>
true
</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>
ProjectExplorer.Project.Target.0
</variable>
<valuemap
type=
"QVariantMap"
>
<value
type=
"QString"
key=
"DeviceType"
>
Desktop
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Desktop Qt 5.9.9 MinGW 32bit
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Desktop Qt 5.9.9 MinGW 32bit
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
qt.qt5.599.win32_mingw53_kit
</value>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.ActiveBuildConfiguration"
>
0
</value>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.ActiveDeployConfiguration"
>
0
</value>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.ActiveRunConfiguration"
>
0
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.BuildConfiguration.0"
>
<value
type=
"int"
key=
"EnableQmlDebugging"
>
0
</value>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory"
>
D:\virtual_serial_port\build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Debug
</value>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir"
>
D:/virtual_serial_port/build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Debug
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.0"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
QtProjectManager.QMakeBuildStep
</value>
<value
type=
"bool"
key=
"QtProjectManager.QMakeBuildStep.QMakeForced"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"QtProjectManager.QMakeBuildStep.SelectedAbis"
/>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.1"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
2
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Build
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.1"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
<value
type=
"QString"
key=
"Qt4ProjectManager.MakeStep.MakeArguments"
>
clean
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
1
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Clean
</value>
</valuemap>
<value
type=
"int"
key=
"ProjectExplorer.BuildConfiguration.BuildStepListCount"
>
2
</value>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ClearSystemEnvironment"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.CustomParsers"
/>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ParseStandardOutput"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"
/>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Debug
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.Qt4BuildConfiguration
</value>
<value
type=
"int"
key=
"Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"
>
2
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.BuildConfiguration.1"
>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory"
>
D:\virtual_serial_port\build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Release
</value>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir"
>
D:/virtual_serial_port/build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Release
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.0"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
QtProjectManager.QMakeBuildStep
</value>
<value
type=
"bool"
key=
"QtProjectManager.QMakeBuildStep.QMakeForced"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"QtProjectManager.QMakeBuildStep.SelectedAbis"
/>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.1"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
2
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Build
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.1"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
<value
type=
"QString"
key=
"Qt4ProjectManager.MakeStep.MakeArguments"
>
clean
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
1
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Clean
</value>
</valuemap>
<value
type=
"int"
key=
"ProjectExplorer.BuildConfiguration.BuildStepListCount"
>
2
</value>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ClearSystemEnvironment"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.CustomParsers"
/>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ParseStandardOutput"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"
/>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Release
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.Qt4BuildConfiguration
</value>
<value
type=
"int"
key=
"Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"
>
0
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.BuildConfiguration.2"
>
<value
type=
"int"
key=
"EnableQmlDebugging"
>
0
</value>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory"
>
D:\virtual_serial_port\build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Profile
</value>
<value
type=
"QString"
key=
"ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir"
>
D:/virtual_serial_port/build-virtual_serial_port-Desktop_Qt_5_9_9_MinGW_32bit-Profile
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.0"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
QtProjectManager.QMakeBuildStep
</value>
<value
type=
"bool"
key=
"QtProjectManager.QMakeBuildStep.QMakeForced"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"QtProjectManager.QMakeBuildStep.SelectedAbis"
/>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.1"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
2
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Build
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Build
</value>
</valuemap>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.1"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildStepList.Step.0"
>
<value
type=
"bool"
key=
"ProjectExplorer.BuildStep.Enabled"
>
true
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.MakeStep
</value>
<value
type=
"QString"
key=
"Qt4ProjectManager.MakeStep.MakeArguments"
>
clean
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
1
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Clean
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Clean
</value>
</valuemap>
<value
type=
"int"
key=
"ProjectExplorer.BuildConfiguration.BuildStepListCount"
>
2
</value>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ClearSystemEnvironment"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.CustomParsers"
/>
<value
type=
"bool"
key=
"ProjectExplorer.BuildConfiguration.ParseStandardOutput"
>
false
</value>
<valuelist
type=
"QVariantList"
key=
"ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"
/>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Profile
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.Qt4BuildConfiguration
</value>
<value
type=
"int"
key=
"Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"
>
0
</value>
<value
type=
"int"
key=
"SeparateDebugInfo"
>
0
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.BuildConfigurationCount"
>
3
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.DeployConfiguration.0"
>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.BuildConfiguration.BuildStepList.0"
>
<value
type=
"qlonglong"
key=
"ProjectExplorer.BuildStepList.StepsCount"
>
0
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Deploy
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Deploy
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.BuildSteps.Deploy
</value>
</valuemap>
<value
type=
"int"
key=
"ProjectExplorer.BuildConfiguration.BuildStepListCount"
>
1
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.DeployConfiguration.CustomData"
/>
<value
type=
"bool"
key=
"ProjectExplorer.DeployConfiguration.CustomDataEnabled"
>
false
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.DefaultDeployConfiguration
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.DeployConfigurationCount"
>
1
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.RunConfiguration.0"
>
<value
type=
"bool"
key=
"Analyzer.Perf.Settings.UseGlobalSettings"
>
true
</value>
<value
type=
"bool"
key=
"Analyzer.QmlProfiler.Settings.UseGlobalSettings"
>
true
</value>
<value
type=
"bool"
key=
"Analyzer.Valgrind.Settings.UseGlobalSettings"
>
true
</value>
<valuelist
type=
"QVariantList"
key=
"CustomOutputParsers"
/>
<value
type=
"int"
key=
"PE.EnvironmentAspect.Base"
>
2
</value>
<valuelist
type=
"QVariantList"
key=
"PE.EnvironmentAspect.Changes"
/>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.Qt4RunConfiguration:D:/virtual_serial_port/virtual_serial_port/virtual_serial_port.pro
</value>
<value
type=
"QString"
key=
"ProjectExplorer.RunConfiguration.BuildKey"
>
D:/virtual_serial_port/virtual_serial_port/virtual_serial_port.pro
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseCppDebugger"
>
false
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseCppDebuggerAuto"
>
true
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseLibrarySearchPath"
>
true
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseQmlDebugger"
>
false
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseQmlDebuggerAuto"
>
true
</value>
</valuemap>
<value
type=
"qlonglong"
key=
"ProjectExplorer.Target.RunConfigurationCount"
>
1
</value>
</valuemap>
</data>
<data>
<variable>
ProjectExplorer.Project.TargetCount
</variable>
<value
type=
"qlonglong"
>
1
</value>
</data>
<data>
<variable>
ProjectExplorer.Project.Updater.FileVersion
</variable>
<value
type=
"int"
>
22
</value>
</data>
<data>
<variable>
Version
</variable>
<value
type=
"int"
>
22
</value>
</data>
</qtcreator>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment