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
69c836d7
Commit
69c836d7
authored
Feb 07, 2016
by
Bill Bonney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FirmwareUpgrade: Add File Not Found error message
parent
78d92746
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+20
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+2
-1
No files found.
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
69c836d7
...
...
@@ -575,12 +575,32 @@ void FirmwareUpgradeController::_downloadError(QNetworkReply::NetworkError code)
if
(
code
==
QNetworkReply
::
OperationCanceledError
)
{
errorMsg
=
"Download cancelled"
;
}
else
if
(
code
==
QNetworkReply
::
ContentNotFoundError
)
{
errorMsg
=
QString
(
"Error: File Not Found. Please check %1 firmware version is available."
)
.
arg
(
firmwareTypeAsString
(
_selectedFirmwareType
));
}
else
{
errorMsg
=
QString
(
"Error during download. Error: %1"
).
arg
(
code
);
}
_errorCancel
(
errorMsg
);
}
/// @brief returns firmware type as a string
QString
FirmwareUpgradeController
::
firmwareTypeAsString
(
FirmwareType_t
type
)
const
{
switch
(
type
)
{
case
StableFirmware
:
return
"stable"
;
case
DeveloperFirmware
:
return
"developer"
;
case
BetaFirmware
:
return
"beta"
;
default:
return
"custom"
;
}
}
/// @brief Signals completion of one of the specified bootloader commands. Moves the state machine to the
/// appropriate next step.
void
FirmwareUpgradeController
::
_flashComplete
(
void
)
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
69c836d7
...
...
@@ -147,9 +147,10 @@ public:
FirmwareType_t
selectedFirmwareType
(
void
)
{
return
_selectedFirmwareType
;
}
void
setSelectedFirmwareType
(
FirmwareType_t
firmwareType
);
QString
firmwareTypeAsString
(
FirmwareType_t
type
)
const
;
QStringList
apmAvailableVersions
(
void
);
signals:
void
boardFound
(
void
);
void
noBoardFound
(
void
);
...
...
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