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
8b7bc4ad
Commit
8b7bc4ad
authored
Aug 06, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notify user of vehicle boot errors
parent
0b539643
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
7 deletions
+49
-7
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+31
-7
UASMessageHandler.cc
src/uas/UASMessageHandler.cc
+13
-0
UASMessageHandler.h
src/uas/UASMessageHandler.h
+5
-0
No files found.
src/FactSystem/ParameterLoader.cc
View file @
8b7bc4ad
...
...
@@ -29,6 +29,7 @@
#include "QGCLoggingCategory.h"
#include "QGCApplication.h"
#include "QGCMessageBox.h"
#include "UASMessageHandler.h"
#include <QFile>
#include <QDebug>
...
...
@@ -752,14 +753,37 @@ void ParameterLoader::_checkInitialLoadComplete(void)
}
}
// Check for any errors during vehicle boot
UASMessageHandler
*
msgHandler
=
UASMessageHandler
::
instance
();
if
(
msgHandler
->
getErrorCount
())
{
QString
errors
;
msgHandler
->
lockAccess
();
foreach
(
UASMessage
*
msg
,
msgHandler
->
messages
())
{
if
(
msg
->
severityIsError
())
{
errors
+=
msg
->
getText
();
errors
+=
"
\n
"
;
}
}
msgHandler
->
unlockAccess
();
QGCMessageBox
::
critical
(
"Vehicle startup errors"
,
QString
(
"Errors were detected during vehicle startup:
\n
"
"%1"
"You should resolve these prior to flight."
).
arg
(
errors
));
}
// Warn of parameter load failure
if
(
initialLoadFailures
)
{
QGCMessageBox
::
critical
(
"Parameter Load Failure"
,
QString
(
"QGroundControl was unable to retrieve the full set of parameters from the vehicle. "
"This will cause QGroundControl to be unable to display it's full user interface. "
"This usually indicates an error in the vehicle's firmwar
e. "
"Please upgrade your firmware to the latest version if possible. "
"If that doesn't work, notify the firmware developers of this error. "
"The following parameter indices could not be loaded after the maximum number of retries: %1."
).
arg
(
indexList
));
"QGroundControl was unable to retrieve the full set of parameters from the vehicle. "
"This will cause QGroundControl to be unable to display it's full user interface. "
"If you are using modified firmware, you may need to resolve any vehicle startup errors to resolve the issu
e. "
"If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue."
);
qCWarning
(
ParameterLoaderLog
)
<<
"The following parameter indices could not be loaded after the maximum number of retries: "
<<
indexList
;
}
else
{
// No failed parameters, ok to signal ready
_parametersReady
=
true
;
...
...
@@ -767,4 +791,4 @@ void ParameterLoader::_checkInitialLoadComplete(void)
_setupGroupMap
();
emit
parametersReady
();
}
}
\ No newline at end of file
}
src/uas/UASMessageHandler.cc
View file @
8b7bc4ad
...
...
@@ -38,6 +38,19 @@ UASMessage::UASMessage(int componentid, int severity, QString text)
_text
=
text
;
}
bool
UASMessage
::
severityIsError
()
{
switch
(
_severity
)
{
case
MAV_SEVERITY_EMERGENCY
:
case
MAV_SEVERITY_ALERT
:
case
MAV_SEVERITY_CRITICAL
:
case
MAV_SEVERITY_ERROR
:
return
true
;
default:
return
false
;
}
}
IMPLEMENT_QGC_SINGLETON
(
UASMessageHandler
,
UASMessageHandler
)
UASMessageHandler
::
UASMessageHandler
(
QObject
*
parent
)
...
...
src/uas/UASMessageHandler.h
View file @
8b7bc4ad
...
...
@@ -63,6 +63,11 @@ public:
* @brief Get (html) formatted text (in the form: "[11:44:21.137 - COMP:50] Info: [pm] sending list")
*/
QString
getFormatedText
()
{
return
_formatedText
;
}
/**
* @return true: This message is a of a severity which is considered an error
*/
bool
severityIsError
();
private:
UASMessage
(
int
componentid
,
int
severity
,
QString
text
);
void
_setFormatedText
(
const
QString
formatedText
)
{
_formatedText
=
formatedText
;
}
...
...
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