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
048fbe27
Commit
048fbe27
authored
Feb 08, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2750 from billbonney/apm-px4v4-download-wip
Add Error Message when FW is not found on Server.
parents
f4622c87
9e0594cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
QGCFileDownload.cc
src/QGCFileDownload.cc
+4
-0
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+22
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+2
-1
No files found.
src/QGCFileDownload.cc
View file @
048fbe27
...
...
@@ -121,6 +121,10 @@ void QGCFileDownload::_downloadError(QNetworkReply::NetworkError code)
if
(
code
==
QNetworkReply
::
OperationCanceledError
)
{
errorMsg
=
"Download cancelled"
;
}
else
if
(
code
==
QNetworkReply
::
ContentNotFoundError
)
{
errorMsg
=
"Error: File Not Found"
;
}
else
{
errorMsg
=
QString
(
"Error during download. Error: %1"
).
arg
(
code
);
}
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
048fbe27
...
...
@@ -208,6 +208,8 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/px4fmu-v4_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/px4fmu-v4_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/px4fmu-v4_default.px4"
},
{
AutoPilotStackAPM
,
StableFirmware
,
QuadFirmware
,
"http://firmware.diydrones.com/Copter/stable/PX4-quad/ArduCopter-v4.px4"
},
{
AutoPilotStackAPM
,
BetaFirmware
,
QuadFirmware
,
"http://firmware.diydrones.com/Copter/beta/PX4-quad/ArduCopter-v4.px4"
},
{
AutoPilotStackAPM
,
DeveloperFirmware
,
QuadFirmware
,
"http://firmware.diydrones.com/Copter/latest/PX4-quad/ArduCopter-v4.px4"
}
};
...
...
@@ -573,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 @
048fbe27
...
...
@@ -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