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
8dabbb98
Commit
8dabbb98
authored
Sep 08, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop annoying errors when there is no serial device.
parent
9500b4e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
qserialportinfo_android.cpp
libs/qtandroidserialport/src/qserialportinfo_android.cpp
+9
-1
No files found.
libs/qtandroidserialport/src/qserialportinfo_android.cpp
View file @
8dabbb98
...
...
@@ -50,6 +50,8 @@ static const char V_TAG[] {"QGC_QSerialPortInfo"};
extern
void
cleanJavaException
();
static
int
gErrorCount
=
0
;
QList
<
QSerialPortInfo
>
availablePortsByFiltersOfDevices
(
bool
&
ok
)
{
QList
<
QSerialPortInfo
>
serialPortInfoList
;
...
...
@@ -61,9 +63,15 @@ QList<QSerialPortInfo> availablePortsByFiltersOfDevices(bool &ok)
"()[Ljava/lang/String;"
);
if
(
!
resultL
.
isValid
())
{
__android_log_print
(
ANDROID_LOG_ERROR
,
V_TAG
,
"Error from availableDevicesInfo"
);
//-- If 5 consecutive errors, ignore it.
if
(
gErrorCount
<
5
)
{
gErrorCount
++
;
__android_log_print
(
ANDROID_LOG_ERROR
,
V_TAG
,
"Error from availableDevicesInfo"
);
}
ok
=
false
;
return
serialPortInfoList
;
}
else
{
gErrorCount
=
0
;
}
QAndroidJniEnvironment
envL
;
...
...
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