mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
OP-532 Now saving channels to GUI config data structure
This commit is contained in:
parent
5c5a07b101
commit
08822807b3
@ -75,7 +75,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="BasicTab">
|
||||
<attribute name="title">
|
||||
|
@ -734,6 +734,7 @@ void ConfigccpmWidget::ccpmSwashplateRedraw()
|
||||
void ConfigccpmWidget::ccpmSwashplateUpdate()
|
||||
{
|
||||
ccpmSwashplateRedraw();
|
||||
SetUIComponentVisibilities();
|
||||
UpdateMixer();
|
||||
}
|
||||
|
||||
@ -926,6 +927,11 @@ void ConfigccpmWidget::UpdatCCPMOptionsFromUI()
|
||||
GUIConfigData.heli.SliderValue2 = m_ccpm->ccpmRollScale->value();
|
||||
//GUIConfigData.heli.RevoSlider = m_ccpm->ccpmREVOScale->value();
|
||||
|
||||
//servo assignments
|
||||
GUIConfigData.heli.ServoIndexW = m_ccpm->ccpmServoWChannel->currentIndex();
|
||||
GUIConfigData.heli.ServoIndexX = m_ccpm->ccpmServoXChannel->currentIndex();
|
||||
GUIConfigData.heli.ServoIndexY = m_ccpm->ccpmServoYChannel->currentIndex();
|
||||
GUIConfigData.heli.ServoIndexZ = m_ccpm->ccpmServoZChannel->currentIndex();
|
||||
|
||||
}
|
||||
void ConfigccpmWidget::UpdatCCPMUIFromOptions()
|
||||
@ -957,6 +963,13 @@ void ConfigccpmWidget::UpdatCCPMUIFromOptions()
|
||||
m_ccpm->ccpmCollectiveSlider->setValue(GUIConfigData.heli.SliderValue0);
|
||||
m_ccpm->ccpmCollectivespinBox->setValue(GUIConfigData.heli.SliderValue0);
|
||||
//m_ccpm->ccpmREVOScale->setValue(GUIConfigData.heli.RevoSlider);
|
||||
|
||||
//servo assignments
|
||||
m_ccpm->ccpmServoWChannel->setCurrentIndex(GUIConfigData.heli.ServoIndexW);
|
||||
m_ccpm->ccpmServoXChannel->setCurrentIndex(GUIConfigData.heli.ServoIndexX);
|
||||
m_ccpm->ccpmServoYChannel->setCurrentIndex(GUIConfigData.heli.ServoIndexY);
|
||||
m_ccpm->ccpmServoZChannel->setCurrentIndex(GUIConfigData.heli.ServoIndexZ);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,13 +60,17 @@ typedef struct {
|
||||
uint SliderValue0:7;
|
||||
uint SliderValue1:7;
|
||||
uint SliderValue2:7;//41bits
|
||||
uint padding:23;
|
||||
uint ServoIndexW:4;
|
||||
uint ServoIndexX:4;
|
||||
uint ServoIndexY:4;
|
||||
uint ServoIndexZ:4;//57bits
|
||||
uint padding:7;
|
||||
} __attribute__((packed)) heliGUISettingsStruct;
|
||||
|
||||
typedef union
|
||||
{
|
||||
uint UAVObject[2];
|
||||
heliGUISettingsStruct heli;
|
||||
uint UAVObject[2];//32bits * 2
|
||||
heliGUISettingsStruct heli;//64bits
|
||||
} GUIConfigDataUnion;
|
||||
|
||||
class ConfigccpmWidget: public ConfigTaskWidget
|
||||
|
Loading…
x
Reference in New Issue
Block a user