Commit 5f6bc763 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 49a9c91f
......@@ -67,8 +67,6 @@ CameraSection::CameraSection(Vehicle* vehicle, QObject* parent)
connect(this, &CameraSection::specifyGimbalChanged, this, &CameraSection::_setDirty);
connect(this, &CameraSection::specifyCameraModeChanged, this, &CameraSection::_setDirty);
connect(this, &CameraSection::specifyGimbalChanged, this, &CameraSection::_updateSpecifiedGimbalYaw);
connect(this, &CameraSection::specifyGimbalChanged, this, &CameraSection::_updateSpecifiedGimbalPitch);
connect(&_gimbalYawFact, &Fact::valueChanged, this, &CameraSection::_updateSpecifiedGimbalYaw);
connect(&_gimbalPitchFact, &Fact::valueChanged, this, &CameraSection::_updateSpecifiedGimbalPitch);
}
......@@ -78,6 +76,8 @@ void CameraSection::setSpecifyGimbal(bool specifyGimbal)
if (specifyGimbal != _specifyGimbal) {
_specifyGimbal = specifyGimbal;
emit specifyGimbalChanged(specifyGimbal);
emit specifiedGimbalYawChanged(specifiedGimbalYaw());
emit specifiedGimbalPitchChanged(specifiedGimbalPitch());
}
}
......@@ -543,7 +543,9 @@ double CameraSection::specifiedGimbalPitch(void) const
void CameraSection::_updateSpecifiedGimbalYaw(void)
{
emit specifiedGimbalYawChanged(specifiedGimbalYaw());
if (_specifyGimbal) {
emit specifiedGimbalYawChanged(specifiedGimbalYaw());
}
}
void CameraSection::_updateSpecifiedGimbalPitch(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment