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
fb48b351
Commit
fb48b351
authored
Sep 26, 2015
by
Pritam Ghanghas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some cosmetic changes, rename variables
parent
bee962ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+9
-9
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+6
-6
No files found.
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
fb48b351
...
...
@@ -38,11 +38,11 @@ struct FirmwareToUrlElement_t {
QString
url
;
};
uint
qHash
(
const
FirmwareUpgradeController
::
FirmwareIdentifier
&
firmwareI
DTrinity
)
uint
qHash
(
const
FirmwareUpgradeController
::
FirmwareIdentifier
&
firmwareI
d
)
{
return
(
firmwareI
DTrinity
.
autopilotStackType
|
(
firmwareI
DTrinity
.
firmwareType
<<
8
)
|
(
firmwareI
DTrinity
.
firmwareVehicleType
<<
16
)
);
return
(
firmwareI
d
.
autopilotStackType
|
(
firmwareI
d
.
firmwareType
<<
8
)
|
(
firmwareI
d
.
firmwareVehicleType
<<
16
)
);
}
/// @Brief Constructs a new FirmwareUpgradeController Widget. This widget is used within the PX4VehicleConfig set of screens.
...
...
@@ -308,7 +308,7 @@ void FirmwareUpgradeController::_bootloaderSyncFailed(void)
}
/// @brief Prompts the user to select a firmware file if needed and moves the state machine to the next state.
void
FirmwareUpgradeController
::
_getFirmwareFile
(
FirmwareIdentifier
firmwareI
DTrinity
)
void
FirmwareUpgradeController
::
_getFirmwareFile
(
FirmwareIdentifier
firmwareI
d
)
{
// make sure the firmware hashes are populated
_initFirmwareHash
();
...
...
@@ -342,20 +342,20 @@ void FirmwareUpgradeController::_getFirmwareFile(FirmwareIdentifier firmwareIDTr
break
;
}
if
(
prgFirmware
.
isEmpty
()
&&
firmwareI
DTrinity
.
firmwareType
!=
CustomFirmware
)
{
if
(
prgFirmware
.
isEmpty
()
&&
firmwareI
d
.
firmwareType
!=
CustomFirmware
)
{
_errorCancel
(
"Attempting to flash an unknown board type, you must select 'Custom firmware file'"
);
return
;
}
if
(
firmwareI
DTrinity
.
firmwareType
==
CustomFirmware
)
{
if
(
firmwareI
d
.
firmwareType
==
CustomFirmware
)
{
_firmwareFilename
=
QGCFileDialog
::
getOpenFileName
(
NULL
,
// Parent to main window
"Select Firmware File"
,
// Dialog Caption
QStandardPaths
::
writableLocation
(
QStandardPaths
::
DocumentsLocation
),
// Initial directory
"Firmware Files (*.px4 *.bin *.ihx)"
);
// File filter
}
else
{
if
(
prgFirmware
.
contains
(
firmwareI
DTrinity
))
{
_firmwareFilename
=
prgFirmware
.
value
(
firmwareI
DTrinity
);
if
(
prgFirmware
.
contains
(
firmwareI
d
))
{
_firmwareFilename
=
prgFirmware
.
value
(
firmwareI
d
);
}
else
{
_errorCancel
(
"Unable to find specified firmware download location"
);
return
;
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
fb48b351
...
...
@@ -90,11 +90,11 @@ public:
FirmwareVehicleType_t
vehicle
=
DefaultVehicleFirmware
)
:
autopilotStackType
(
stack
),
firmwareType
(
firmware
),
firmwareVehicleType
(
vehicle
)
{}
bool
operator
==
(
const
FirmwareIdentifier
&
firmwareI
DTrinity
)
const
bool
operator
==
(
const
FirmwareIdentifier
&
firmwareI
d
)
const
{
return
(
firmwareI
DTrinity
.
autopilotStackType
==
autopilotStackType
&&
firmwareI
DTrinity
.
firmwareType
==
firmwareType
&&
firmwareI
DTrinity
.
firmwareVehicleType
==
firmwareVehicleType
);
return
(
firmwareI
d
.
autopilotStackType
==
autopilotStackType
&&
firmwareI
d
.
firmwareType
==
firmwareType
&&
firmwareI
d
.
firmwareVehicleType
==
firmwareVehicleType
);
}
// members
...
...
@@ -173,7 +173,7 @@ private slots:
void
_linkDisconnected
(
LinkInterface
*
link
);
private:
void
_getFirmwareFile
(
FirmwareIdentifier
firmwareI
DTrinity
);
void
_getFirmwareFile
(
FirmwareIdentifier
firmwareI
d
);
void
_initFirmwareHash
();
void
_downloadFirmware
(
void
);
void
_appendStatusLog
(
const
QString
&
text
,
bool
critical
=
false
);
...
...
@@ -228,6 +228,6 @@ private:
};
// global hashing function
uint
qHash
(
const
FirmwareUpgradeController
::
FirmwareIdentifier
&
firmwareI
DTrinity
);
uint
qHash
(
const
FirmwareUpgradeController
::
FirmwareIdentifier
&
firmwareI
d
);
#endif
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