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
7e42330d
Commit
7e42330d
authored
Jul 01, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
5e1e48f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
QGCExternalLibs.pri
QGCExternalLibs.pri
+6
-2
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+7
-7
No files found.
QGCExternalLibs.pri
View file @
7e42330d
...
...
@@ -110,6 +110,10 @@ SOURCES += \
#
# [REQUIRED] zlib library
Windows {
INCLUDEPATH += $$SOURCE_DIR/libszlib/windows/include
LIBS += -L$$SOURCE_DIR/libszlib/windows/lib
}
LIBS += -lz
#
...
...
@@ -147,7 +151,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
exists(/usr/local/Cellar/openssl/1.0.2t/include) {
INCLUDEPATH += /usr/local/Cellar/openssl/1.0.2t/include
LIBS += -L/usr/local/Cellar/openssl/1.0.2t/lib
LIBS += -lcrypto
-lz
LIBS += -lcrypto
} else {
# There is some circular reference settings going on between QGCExternalLibs.pri and gqgroundcontrol.pro.
# So this duplicates some of the enable/disable logic which would normally be in qgroundcontrol.pro.
...
...
@@ -157,7 +161,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
#- Pairing is not supported on Windows
DEFINES -= QGC_ENABLE_PAIRING
} else {
LIBS += -lcrypto
-lz
LIBS += -lcrypto
AndroidBuild {
contains(QT_ARCH, arm) {
LIBS += $$ANDROID_EXTRA_LIBS
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
7e42330d
...
...
@@ -900,17 +900,17 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
int
ret
;
int
cBuffer
=
1024
*
5
;
const
int
cBuffer
=
1024
*
5
;
unsigned
char
inputBuffer
[
cBuffer
];
unsigned
char
outputBuffer
[
cBuffer
];
z_stream
strm
;
QByteArray
jsonBytes
;
strm
.
zalloc
=
Z_NULL
;
strm
.
zfree
=
Z_NULL
;
strm
.
opaque
=
Z_NULL
;
strm
.
zalloc
=
nullptr
;
strm
.
zfree
=
nullptr
;
strm
.
opaque
=
nullptr
;
strm
.
avail_in
=
0
;
strm
.
next_in
=
Z_NULL
;
strm
.
next_in
=
nullptr
;
ret
=
inflateInit2
(
&
strm
,
16
+
MAX_WBITS
);
if
(
ret
!=
Z_OK
)
{
...
...
@@ -920,7 +920,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
do
{
strm
.
avail_in
=
inputFile
.
read
((
char
*
)
inputBuffer
,
cBuffer
);
strm
.
avail_in
=
static_cast
<
unsigned
>
(
inputFile
.
read
((
char
*
)
inputBuffer
,
cBuffer
)
);
if
(
strm
.
avail_in
==
0
)
{
break
;
}
...
...
@@ -939,7 +939,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
unsigned
cBytesInflated
=
cBuffer
-
strm
.
avail_out
;
jsonBytes
.
append
((
char
*
)
outputBuffer
,
cBytesInflated
);
jsonBytes
.
append
((
char
*
)
outputBuffer
,
static_cast
<
int
>
(
cBytesInflated
)
);
}
while
(
strm
.
avail_out
==
0
);
}
while
(
ret
!=
Z_STREAM_END
);
...
...
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