Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
858ae96a
Commit
858ae96a
authored
Jan 26, 2018
by
Gus Grubba
Browse files
Don't attempt to read a "write only" parameter.
parent
80bd8afb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Camera/QGCCameraControl.cc
View file @
858ae96a
...
...
@@ -806,7 +806,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
metaData
->
setRawUnits
(
attr
);
}
}
qCDebug
(
CameraControlLog
)
<<
"New parameter:"
<<
factName
;
qCDebug
(
CameraControlLog
)
<<
"New parameter:"
<<
factName
<<
(
readOnly
?
"ReadOnly"
:
"Writable"
)
<<
(
writeOnly
?
"WriteOnly"
:
"Readable"
)
;
_nameToFactMetaDataMap
[
factName
]
=
metaData
;
Fact
*
pFact
=
new
Fact
(
_compID
,
factName
,
factType
,
this
);
QQmlEngine
::
setObjectOwnership
(
pFact
,
QQmlEngine
::
CppOwnership
);
...
...
src/Camera/QGCCameraIO.cc
View file @
858ae96a
...
...
@@ -28,8 +28,13 @@ QGCCameraParamIO::QGCCameraParamIO(QGCCameraControl *control, Fact* fact, Vehicl
_paramWriteTimer
.
setInterval
(
3000
);
_paramRequestTimer
.
setSingleShot
(
true
);
_paramRequestTimer
.
setInterval
(
3500
);
if
(
_fact
->
writeOnly
())
{
//-- Write mode is always "done" as it won't ever read
_done
=
true
;
}
else
{
connect
(
&
_paramRequestTimer
,
&
QTimer
::
timeout
,
this
,
&
QGCCameraParamIO
::
_paramRequestTimeout
);
}
connect
(
&
_paramWriteTimer
,
&
QTimer
::
timeout
,
this
,
&
QGCCameraParamIO
::
_paramWriteTimeout
);
connect
(
&
_paramRequestTimer
,
&
QTimer
::
timeout
,
this
,
&
QGCCameraParamIO
::
_paramRequestTimeout
);
connect
(
_fact
,
&
Fact
::
rawValueChanged
,
this
,
&
QGCCameraParamIO
::
_factChanged
);
connect
(
_fact
,
&
Fact
::
_containerRawValueChanged
,
this
,
&
QGCCameraParamIO
::
_containerRawValueChanged
);
_pMavlink
=
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
();
...
...
@@ -73,9 +78,11 @@ QGCCameraParamIO::QGCCameraParamIO(QGCCameraControl *control, Fact* fact, Vehicl
void
QGCCameraParamIO
::
setParamRequest
()
{
_paramRequestReceived
=
false
;
_requestRetries
=
0
;
_paramRequestTimer
.
start
();
if
(
!
_fact
->
writeOnly
())
{
_paramRequestReceived
=
false
;
_requestRetries
=
0
;
_paramRequestTimer
.
start
();
}
}
//-----------------------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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