Skip to content

Commit

Permalink
Camera Gimbal: Fixes random disabling of output servos
Browse files Browse the repository at this point in the history
  • Loading branch information
billbonney committed Sep 26, 2014
1 parent 7cb7f98 commit 55cf467
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/configuration/CameraGimbalConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,12 @@ void CameraGimbalConfig::updateCameraGimbalParams(QString& chPrefix, const QStri

QGCUASParamManager *pm = m_uas->getParamManager();

if (!chPrefix.isEmpty() && (newChPrefix != chPrefix)){
if (!chPrefix.isEmpty() && (!newChPrefix.isEmpty())
&& (newChPrefix != chPrefix)){
//We need to disable the old assignment first if chnaged
QLOG_DEBUG() << "Set old " << chPrefix << " disabled";
pm->setParameter(1, chPrefix + "_FUNCTION", RC_FUNCTION::Disabled);
outputChCombo->setCurrentIndex(0);
}

chPrefix = newChPrefix;
Expand Down

0 comments on commit 55cf467

Please sign in to comment.