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
09a3dc28
Commit
09a3dc28
authored
Jan 11, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RadioFlash
Verify was failing due to incorrect READ_MULTI max size
parent
e5a83d8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
Bootloader.cc
src/VehicleSetup/Bootloader.cc
+3
-3
Bootloader.h
src/VehicleSetup/Bootloader.h
+2
-2
FirmwareImage.cc
src/VehicleSetup/FirmwareImage.cc
+2
-1
PX4FirmwareUpgradeThread.cc
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
+7
-3
No files found.
src/VehicleSetup/Bootloader.cc
View file @
09a3dc28
...
...
@@ -273,7 +273,7 @@ bool Bootloader::_ihxProgram(QextSerialPort* port, const FirmwareImage* image)
return
false
;
}
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
QString
(
"Bootloader::_ihxProgram - address:
%1 size:%2 block:%3"
).
arg
(
flashAddress
).
arg
(
bytes
.
count
()).
arg
(
index
);
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
QString
(
"Bootloader::_ihxProgram - address:
0x%1 size:%2 block:%3"
).
arg
(
flashAddress
,
8
,
16
,
QLatin1Char
(
'0'
)
).
arg
(
bytes
.
count
()).
arg
(
index
);
// Set flash address
...
...
@@ -400,7 +400,7 @@ bool Bootloader::_binVerifyBytes(QextSerialPort* port, const FirmwareImage* imag
_write
(
port
,
(
uint8_t
)
bytesToRead
)
&&
_write
(
port
,
PROTO_EOC
))
{
port
->
flush
();
if
(
_read
(
port
,
readBuf
,
sizeof
(
readBuf
)
))
{
if
(
_read
(
port
,
readBuf
,
bytesToRead
))
{
if
(
_getCommandResponse
(
port
))
{
failed
=
false
;
}
...
...
@@ -479,7 +479,7 @@ bool Bootloader::_ihxVerifyBytes(QextSerialPort* port, const FirmwareImage* imag
}
else
{
bytesToRead
=
bytesLeftToRead
;
}
failed
=
true
;
if
(
_write
(
port
,
PROTO_READ_MULTI
)
&&
_write
(
port
,
bytesToRead
)
&&
...
...
src/VehicleSetup/Bootloader.h
View file @
09a3dc28
...
...
@@ -134,8 +134,8 @@ private:
INFO_BOARD_REV
=
3
,
///< board revision
INFO_FLASH_SIZE
=
4
,
///< max firmware size in bytes
PROG_MULTI_MAX
=
64
,
///< write size for PROTO_PROG_MULTI, must be multiple of 4
READ_MULTI_MAX
=
255
///< read size for PROTO_READ_MULTI, must be multiple of 4
PROG_MULTI_MAX
=
64
,
///< write size for PROTO_PROG_MULTI, must be multiple of 4
READ_MULTI_MAX
=
0x28
///< read size for PROTO_READ_MULTI, must be multiple of 4. Sik Radio max size is 0x28
};
uint32_t
_boardID
;
///< board id for currently connected board
...
...
src/VehicleSetup/FirmwareImage.cc
View file @
09a3dc28
...
...
@@ -165,7 +165,8 @@ bool FirmwareImage::_ihxLoad(const QString& ihxFilename)
if
(
appendToLastBlock
)
{
_ihxBlocks
[
_ihxBlocks
.
count
()
-
1
].
bytes
+=
bytes
;
qCDebug
(
FirmwareUpgradeVerboseLog
)
<<
QString
(
"_ihxLoad - append - address:%1 size:%2 block:%3"
).
arg
(
address
).
arg
(
blockByteCount
).
arg
(
ihxBlockCount
());
// Too noisy even for verbose
//qCDebug(FirmwareUpgradeVerboseLog) << QString("_ihxLoad - append - address:%1 size:%2 block:%3").arg(address).arg(blockByteCount).arg(ihxBlockCount());
}
else
{
IntelHexBlock_t
block
;
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
09a3dc28
...
...
@@ -95,7 +95,7 @@ void PX4FirmwareUpgradeThreadWorker::_startFindBoardLoop(void)
void
PX4FirmwareUpgradeThreadWorker
::
_findBoardOnce
(
void
)
{
qCDebug
(
FirmwareUpgradeLog
)
<<
"_findBoardOnce"
;
qCDebug
(
FirmwareUpgrade
Verbose
Log
)
<<
"_findBoardOnce"
;
QGCSerialPortInfo
portInfo
;
QGCSerialPortInfo
::
BoardType_t
boardType
;
...
...
@@ -200,9 +200,9 @@ void PX4FirmwareUpgradeThreadWorker::_3drRadioForceBootloader(const QGCSerialPor
emit
error
(
"Unable to reboot radio (ready read)"
);
return
;
}
QGC
::
SLEEP
::
msleep
(
700
);
port
.
close
();
QGC
::
SLEEP
::
msleep
(
2000
);
// The bootloader should be waiting for us now
_findBootloader
(
portInfo
,
true
/* radio mode */
,
true
/* errorOnNotFound */
);
...
...
@@ -232,6 +232,10 @@ bool PX4FirmwareUpgradeThreadWorker::_findBootloader(const QGCSerialPortInfo& po
}
}
if
(
radioMode
)
{
QGC
::
SLEEP
::
msleep
(
2000
);
}
if
(
_bootloader
->
sync
(
_bootloaderPort
))
{
bool
success
;
...
...
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