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
db612226
Commit
db612226
authored
Apr 17, 2016
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore critical messages in the main window.
parent
a66ff761
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
57 deletions
+37
-57
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+0
-29
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+25
-23
Vehicle.cc
src/Vehicle/Vehicle.cc
+7
-5
MainWindow.cc
src/ui/MainWindow.cc
+5
-0
No files found.
src/FactSystem/ParameterLoader.cc
View file @
db612226
...
...
@@ -953,35 +953,6 @@ void ParameterLoader::_checkInitialLoadComplete(bool failIfNoDefaultComponent)
// We aren't waiting for any more initial parameter updates, initial parameter loading is complete
_initialLoadComplete
=
true
;
// Check for any errors during vehicle boot
UASMessageHandler
*
msgHandler
=
qgcApp
()
->
toolbox
()
->
uasMessageHandler
();
if
(
msgHandler
->
getErrorCountTotal
())
{
QString
errors
;
bool
firstError
=
true
;
bool
errorsFound
=
false
;
msgHandler
->
lockAccess
();
foreach
(
UASMessage
*
msg
,
msgHandler
->
messages
())
{
if
(
msg
->
severityIsError
())
{
if
(
!
firstError
)
{
errors
+=
"<br>"
;
}
errors
+=
" - "
;
errors
+=
msg
->
getText
();
firstError
=
false
;
errorsFound
=
true
;
}
}
msgHandler
->
showErrorsInToolbar
();
msgHandler
->
unlockAccess
();
if
(
errorsFound
)
{
QString
errorMsg
=
QString
(
"<b>Critical safety issue detected:</b><br>%1"
).
arg
(
errors
);
qgcApp
()
->
showMessage
(
errorMsg
);
}
}
// Check for index based load failures
QString
indexList
;
bool
initialLoadFailures
=
false
;
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
db612226
...
...
@@ -26,6 +26,8 @@
#include <QDebug>
const
char
*
guided_mode_not_supported_by_vehicle
=
"Guided mode not supported by Vehicle."
;
bool
FirmwarePlugin
::
isCapable
(
FirmwareCapabilities
capabilities
)
{
Q_UNUSED
(
capabilities
);
...
...
@@ -155,7 +157,7 @@ void FirmwarePlugin::setGuidedMode(Vehicle* vehicle, bool guidedMode)
{
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
guidedMode
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
bool
FirmwarePlugin
::
isPaused
(
const
Vehicle
*
vehicle
)
const
...
...
@@ -169,21 +171,21 @@ void FirmwarePlugin::pauseVehicle(Vehicle* vehicle)
{
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
void
FirmwarePlugin
::
guidedModeRTL
(
Vehicle
*
vehicle
)
{
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
void
FirmwarePlugin
::
guidedModeLand
(
Vehicle
*
vehicle
)
{
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
void
FirmwarePlugin
::
guidedModeTakeoff
(
Vehicle
*
vehicle
,
double
altitudeRel
)
...
...
@@ -191,7 +193,7 @@ void FirmwarePlugin::guidedModeTakeoff(Vehicle* vehicle, double altitudeRel)
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
altitudeRel
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
void
FirmwarePlugin
::
guidedModeGotoLocation
(
Vehicle
*
vehicle
,
const
QGeoCoordinate
&
gotoCoord
)
...
...
@@ -199,7 +201,7 @@ void FirmwarePlugin::guidedModeGotoLocation(Vehicle* vehicle, const QGeoCoordina
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
gotoCoord
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
void
FirmwarePlugin
::
guidedModeChangeAltitude
(
Vehicle
*
vehicle
,
double
altitudeRel
)
...
...
@@ -207,7 +209,7 @@ void FirmwarePlugin::guidedModeChangeAltitude(Vehicle* vehicle, double altitudeR
// Not supported by generic vehicle
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
altitudeRel
);
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by Vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
}
const
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
&
FirmwarePlugin
::
paramNameRemapMajorVersionMap
(
void
)
const
...
...
src/Vehicle/Vehicle.cc
View file @
db612226
...
...
@@ -43,6 +43,8 @@ QGC_LOGGING_CATEGORY(VehicleLog, "VehicleLog")
#define DEFAULT_LAT 38.965767f
#define DEFAULT_LON -120.083923f
extern
const
char
*
guided_mode_not_supported_by_vehicle
;
const
char
*
Vehicle
::
_settingsGroup
=
"Vehicle%1"
;
// %1 replaced with mavlink system id
const
char
*
Vehicle
::
_joystickModeSettingsKey
=
"JoystickMode"
;
const
char
*
Vehicle
::
_joystickEnabledSettingsKey
=
"JoystickEnabled"
;
...
...
@@ -1465,7 +1467,7 @@ bool Vehicle::pauseVehicleSupported(void) const
void
Vehicle
::
guidedModeRTL
(
void
)
{
if
(
!
guidedModeSupported
())
{
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
_firmwarePlugin
->
guidedModeRTL
(
this
);
...
...
@@ -1474,7 +1476,7 @@ void Vehicle::guidedModeRTL(void)
void
Vehicle
::
guidedModeLand
(
void
)
{
if
(
!
guidedModeSupported
())
{
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
_firmwarePlugin
->
guidedModeLand
(
this
);
...
...
@@ -1483,7 +1485,7 @@ void Vehicle::guidedModeLand(void)
void
Vehicle
::
guidedModeTakeoff
(
double
altitudeRel
)
{
if
(
!
guidedModeSupported
())
{
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
setGuidedMode
(
true
);
...
...
@@ -1493,7 +1495,7 @@ void Vehicle::guidedModeTakeoff(double altitudeRel)
void
Vehicle
::
guidedModeGotoLocation
(
const
QGeoCoordinate
&
gotoCoord
)
{
if
(
!
guidedModeSupported
())
{
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
_firmwarePlugin
->
guidedModeGotoLocation
(
this
,
gotoCoord
);
...
...
@@ -1502,7 +1504,7 @@ void Vehicle::guidedModeGotoLocation(const QGeoCoordinate& gotoCoord)
void
Vehicle
::
guidedModeChangeAltitude
(
double
altitudeRel
)
{
if
(
!
guidedModeSupported
())
{
qgcApp
()
->
showMessage
(
QStringLiteral
(
"Guided mode not supported by vehicle."
)
);
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
_firmwarePlugin
->
guidedModeChangeAltitude
(
this
,
altitudeRel
);
...
...
src/ui/MainWindow.cc
View file @
db612226
...
...
@@ -278,6 +278,11 @@ MainWindow::MainWindow()
#ifndef __mobile__
_loadVisibleWidgetsSettings
();
#endif
//-- Enable message handler display of messages in main window
UASMessageHandler
*
msgHandler
=
qgcApp
()
->
toolbox
()
->
uasMessageHandler
();
if
(
msgHandler
)
{
msgHandler
->
showErrorsInToolbar
();
}
}
MainWindow
::~
MainWindow
()
...
...
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