Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Valentin Platzgummer
qgroundcontrol
Commits
f0472ab4
Commit
f0472ab4
authored
Oct 27, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further attempts at improving link stability
parent
6cb8eb14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
SerialLink.cc
src/comm/SerialLink.cc
+7
-4
No files found.
src/comm/SerialLink.cc
View file @
f0472ab4
...
...
@@ -117,14 +117,16 @@ bool SerialLink::isBootloader()
foreach
(
const
QSerialPortInfo
&
info
,
portList
)
{
// XXX debug statements will be removed once we have 100% stable link reports
// qDebug() << "PortName : " << info.portName()
// << "Description : " << info.description();
// qDebug() << "Manufacturer: " << info.manufacturer();
if
(
info
.
portName
().
trimmed
()
==
this
->
m_portName
.
trimmed
()
&&
(
info
.
description
().
toLower
().
contains
(
"bootloader"
)
||
info
.
description
().
toLower
().
contains
(
"px4 bl"
)))
{
qDebug
()
<<
"BOOTLOADER FOUND"
;
info
.
description
().
toLower
().
contains
(
"px4 bl"
)
||
info
.
description
().
toLower
().
contains
(
"px4 fmu v1.6"
)))
{
// qDebug() << "BOOTLOADER FOUND";
return
true
;
}
}
...
...
@@ -266,10 +268,11 @@ void SerialLink::run()
if
(
m_transmitBuffer
.
count
()
>
0
)
{
m_writeMutex
.
lock
();
int
numWritten
=
m_port
->
write
(
m_transmitBuffer
);
bool
txSuccess
=
m_port
->
waitForBytesWritten
(
5
);
bool
txSuccess
=
m_port
->
flush
();
txSuccess
|=
m_port
->
waitForBytesWritten
(
10
);
if
(
!
txSuccess
||
(
numWritten
!=
m_transmitBuffer
.
count
()))
{
linkErrorCount
++
;
qDebug
()
<<
"TX Error! wrote"
<<
numWritten
<<
", asked for "
<<
m_transmitBuffer
.
count
()
<<
"bytes"
;
qDebug
()
<<
"TX Error! wr
itten:"
<<
txSuccess
<<
"wr
ote"
<<
numWritten
<<
", asked for "
<<
m_transmitBuffer
.
count
()
<<
"bytes"
;
}
else
{
...
...
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