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
75c306a2
Commit
75c306a2
authored
Jan 11, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2580 from DonLakeFlyer/RadioFlash
Fix RadioFlash
parents
e8f7c3a1
09a3dc28
Changes
4
Show 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 @
75c306a2
...
...
@@ -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
;
}
...
...
src/VehicleSetup/Bootloader.h
View file @
75c306a2
...
...
@@ -135,7 +135,7 @@ private:
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
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 @
75c306a2
...
...
@@ -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 @
75c306a2
...
...
@@ -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,8 +200,8 @@ 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
...
...
@@ -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