mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Op-532 prevented settings being retreived from hardware during an update
to hardware
This commit is contained in:
parent
90f7062940
commit
6578eba0a0
@ -48,6 +48,7 @@ ConfigccpmWidget::ConfigccpmWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
SwashLvlState=0;
|
||||
SwashLvlServoInterlock=0;
|
||||
updatingFromHardware=FALSE;
|
||||
updatingToHardware=FALSE;
|
||||
|
||||
// Now connect the widget to the ManualControlCommand / Channel UAVObject
|
||||
//ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
@ -1020,6 +1021,7 @@ void ConfigccpmWidget::requestccpmUpdate()
|
||||
int isCCPM=0;
|
||||
|
||||
if (SwashLvlConfigurationInProgress)return;
|
||||
if (updatingToHardware)return;
|
||||
updatingFromHardware=TRUE;
|
||||
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
@ -1306,6 +1308,7 @@ void ConfigccpmWidget::sendccpmUpdate()
|
||||
UAVDataObject* obj;
|
||||
|
||||
if (SwashLvlConfigurationInProgress)return;
|
||||
updatingToHardware=TRUE;
|
||||
//ShowDisclaimer(1);
|
||||
|
||||
|
||||
@ -1386,6 +1389,7 @@ void ConfigccpmWidget::sendccpmUpdate()
|
||||
field->setValue(m_ccpm->CurveSettings->item(i, 1)->text().toDouble(),i);
|
||||
}
|
||||
|
||||
obj->updated();
|
||||
|
||||
field = obj->getField(QString("Curve2Source"));
|
||||
|
||||
@ -1410,7 +1414,7 @@ void ConfigccpmWidget::sendccpmUpdate()
|
||||
}
|
||||
|
||||
obj->updated();
|
||||
|
||||
updatingToHardware=FALSE;
|
||||
|
||||
}
|
||||
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
virtual void enableControls(bool enable) { Q_UNUSED(enable)}; // Not used by this widget
|
||||
|
||||
bool updatingFromHardware;
|
||||
bool updatingToHardware;
|
||||
|
||||
private slots:
|
||||
void ccpmSwashplateUpdate();
|
||||
|
Loading…
x
Reference in New Issue
Block a user