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
53c54b15
Commit
53c54b15
authored
Feb 15, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added write retransmission
parent
743b753e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
44 deletions
+159
-44
QGC.cc
src/QGC.cc
+9
-0
QGC.h
src/QGC.h
+2
-0
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+3
-1
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+142
-41
QGCParamWidget.h
src/ui/QGCParamWidget.h
+3
-2
No files found.
src/QGC.cc
View file @
53c54b15
...
...
@@ -37,6 +37,15 @@ quint64 groundTimeUsecs()
return
static_cast
<
quint64
>
(
microseconds
+
(
time
.
time
().
msec
()
*
1000
));
}
quint64
groundTimeMilliseconds
()
{
QDateTime
time
=
QDateTime
::
currentDateTime
();
time
=
time
.
toUTC
();
/* Return seconds and milliseconds, in milliseconds unit */
quint64
seconds
=
time
.
toTime_t
()
*
static_cast
<
quint64
>
(
1000
);
return
static_cast
<
quint64
>
(
seconds
+
(
time
.
time
().
msec
()));
}
float
limitAngleToPMPIf
(
float
angle
)
{
while
(
angle
>
((
float
)
M_PI
+
FLT_EPSILON
))
...
...
src/QGC.h
View file @
53c54b15
...
...
@@ -23,6 +23,8 @@ namespace QGC
/** @brief Get the current ground time in microseconds */
quint64
groundTimeUsecs
();
/** @brief Get the current ground time in milliseconds */
quint64
groundTimeMilliseconds
();
/** @brief Returns the angle limited to -pi - pi */
float
limitAngleToPMPIf
(
float
angle
);
/** @brief Returns the angle limited to -pi - pi */
...
...
src/comm/MAVLinkSimulationLink.cc
View file @
53c54b15
...
...
@@ -884,6 +884,7 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
//add data into datastream
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
streampointer
+=
bufferlength
;
//qDebug() << "Sending PARAM" << key;
}
else
if
(
read
.
param_index
<
onboardParams
.
size
())
{
...
...
@@ -891,12 +892,13 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
float
paramValue
=
onboardParams
.
value
(
key
);
// Pack message and get size of encoded byte string
mavlink_msg_param_value_pack
(
systemId
,
componentId
,
&
msg
,
(
int8_t
*
)
key
.
toStdString
().
c_str
(),
paramValue
,
onboardParams
.
size
(),
onboardParams
.
keys
().
indexOf
(
key
));
mavlink_msg_param_value_pack
(
read
.
target_system
,
componentId
,
&
msg
,
(
int8_t
*
)
key
.
toStdString
().
c_str
(),
paramValue
,
onboardParams
.
size
(),
onboardParams
.
keys
().
indexOf
(
key
));
// Allocate buffer with packet data
bufferlength
=
mavlink_msg_to_send_buffer
(
buffer
,
&
msg
);
//add data into datastream
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
streampointer
+=
bufferlength
;
//qDebug() << "Sending PARAM #ID" << (read.param_index) << "KEY:" << key;
}
}
break
;
...
...
src/ui/QGCParamWidget.cc
View file @
53c54b15
This diff is collapsed.
Click to expand it.
src/ui/QGCParamWidget.h
View file @
53c54b15
...
...
@@ -94,14 +94,15 @@ protected:
QMap
<
int
,
QMap
<
QString
,
float
>*
>
parameters
;
///< All parameters
QVector
<
bool
>
received
;
///< Successfully received parameters
QMap
<
int
,
QList
<
int
>*
>
transmissionMissingPackets
;
///< Missing packets
QMap
<
int
,
Q
List
<
float
>*
>
transmissionMissingWriteAckPackets
;
///< Missing write ACK packets
QMap
<
int
,
Q
Map
<
QString
,
float
>*
>
transmissionMissingWriteAckPackets
;
///< Missing write ACK packets
bool
transmissionListMode
;
///< Currently requesting list
QMap
<
int
,
bool
>
transmissionListSizeKnown
;
///< List size initialized?
bool
transmissionActive
;
///< Missing packets, working on list?
quint64
transmission
Started
;
///< Timeout
quint64
transmission
Timeout
;
///< Timeout
QTimer
retransmissionTimer
;
///< Timer handling parameter retransmission
int
retransmissionTimeout
;
///< Retransmission request timeout, in milliseconds
int
rewriteTimeout
;
///< Write request timeout, in milliseconds
int
retransmissionBurstRequestSize
;
///< Number of packets requested for retransmission per burst
/** @brief Activate / deactivate parameter retransmission */
void
setRetransmissionGuardEnabled
(
bool
enabled
);
...
...
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