1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

minor modifications to UI for ccpm mixing.

better integration into config gadget (now only one set of buttons)
this has not been tested with hardware in it's current form.
Still need to make UI small screen friendly.
Use at own risk! 


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1963 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
andrew 2010-10-16 14:05:51 +00:00 committed by andrew
parent dff66607c7
commit 593c947f5e
4 changed files with 517 additions and 235 deletions

View File

@ -6,22 +6,49 @@
<rect>
<x>0</x>
<y>0</y>
<width>821</width>
<height>606</height>
<width>730</width>
<height>500</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>500</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<widget class="QTabWidget" name="TabObject">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>791</width>
<height>551</height>
<x>0</x>
<y>30</y>
<width>731</width>
<height>470</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>692</width>
<height>419</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@ -29,47 +56,16 @@
<attribute name="title">
<string>Basic settings</string>
</attribute>
<widget class="QComboBox" name="ccpmType">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>110</x>
<x>0</x>
<y>10</y>
<width>551</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>Select aircraft type here</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Swashplate config:</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>11</x>
<y>60</y>
<width>764</width>
<width>721</width>
<height>427</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
@ -486,136 +482,284 @@
</layout>
</item>
<item>
<widget class="QGroupBox" name="ccpmPitchMixingBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>CCPM Mixing</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<layout class="QFormLayout" name="formLayout_7">
<item row="0" column="0">
<widget class="QGroupBox" name="ccpmPitchMixingBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>250</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>250</height>
</size>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="title">
<string>CCPM</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>48</width>
<height>218</height>
</rect>
</property>
<widget class="QLabel" name="label_15">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Collective</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QSlider" name="ccpmCollectiveSlider">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
<widget class="QLabel" name="label_16">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Cyclic</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_15">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Collective</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSlider" name="ccpmCollectiveSlider">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_16">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Cyclic</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ccpmCollectivespinBox">
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ccpmCollectivespinBox">
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>50</number>
<zorder>splitter_2</zorder>
<zorder>ccpmCollectivespinBox</zorder>
<zorder>ccpmCollectiveSlider</zorder>
<zorder>label_15</zorder>
<zorder>ccpmCollectivespinBox</zorder>
<zorder>label_16</zorder>
<zorder></zorder>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="ccpmRevoMixingBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>250</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>250</height>
</size>
</property>
<property name="title">
<string>REVO</string>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>47</width>
<height>218</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_14">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>100%</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSlider" name="ccpmRevoSlider">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>0%</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ccpmREVOspinBox"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ccpmRevoMixingBox">
<property name="title">
<string>REVO Mixing</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QLabel" name="label_14">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>100%</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QSlider" name="ccpmRevoSlider">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>0%</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QSpinBox" name="ccpmREVOspinBox"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="ccpmRevoMixingBox_2">
@ -713,6 +857,19 @@
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
@ -1667,53 +1824,39 @@
</widget>
</widget>
</widget>
<widget class="QPushButton" name="getccpmCurrent">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>570</y>
<width>93</width>
<height>27</height>
<x>170</x>
<y>0</y>
<width>421</width>
<height>26</height>
</rect>
</property>
<property name="toolTip">
<string>Retrieve settings from OpenPilot</string>
</property>
<property name="text">
<string>Get Current</string>
</property>
</widget>
<widget class="QPushButton" name="saveccpmToRAM">
<property name="geometry">
<rect>
<x>510</x>
<y>570</y>
<width>93</width>
<height>27</height>
</rect>
</property>
<property name="toolTip">
<string>Send to OpenPilot but don't write in SD.</string>
</property>
<property name="text">
<string>Save to RAM</string>
</property>
</widget>
<widget class="QPushButton" name="saveccpmToSD">
<property name="geometry">
<rect>
<x>620</x>
<y>570</y>
<width>93</width>
<height>27</height>
</rect>
</property>
<property name="toolTip">
<string>Applies and Saves all settings to SD</string>
</property>
<property name="text">
<string>Save to SD</string>
</property>
<layout class="QFormLayout" name="formLayout_6">
<property name="topMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Swashplate config:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="ccpmType">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>Select aircraft type here</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<customwidgets>
@ -1739,14 +1882,10 @@
<tabstop>ccpmAngleY</tabstop>
<tabstop>ccpmAngleZ</tabstop>
<tabstop>ccpmCorrectionAngle</tabstop>
<tabstop>ccpmCollectiveSlider</tabstop>
<tabstop>ccpmCollectivespinBox</tabstop>
<tabstop>ccpmRevoSlider</tabstop>
<tabstop>ccpmREVOspinBox</tabstop>
<tabstop>SwashplateImage</tabstop>
<tabstop>getccpmCurrent</tabstop>
<tabstop>saveccpmToRAM</tabstop>
<tabstop>saveccpmToSD</tabstop>
<tabstop>CurveType</tabstop>
<tabstop>NumCurvePoints</tabstop>
<tabstop>CurveValue1</tabstop>
@ -1772,8 +1911,8 @@
<y>309</y>
</hint>
<hint type="destinationlabel">
<x>228</x>
<y>501</y>
<x>259</x>
<y>467</y>
</hint>
</hints>
</connection>
@ -1784,8 +1923,8 @@
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel">
<x>247</x>
<y>496</y>
<x>259</x>
<y>467</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
@ -1800,8 +1939,8 @@
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel">
<x>320</x>
<y>498</y>
<x>344</x>
<y>467</y>
</hint>
<hint type="destinationlabel">
<x>326</x>
@ -1820,8 +1959,8 @@
<y>222</y>
</hint>
<hint type="destinationlabel">
<x>308</x>
<y>496</y>
<x>344</x>
<y>467</y>
</hint>
</hints>
</connection>

View File

@ -546,8 +546,10 @@ void ConfigAirframeWidget::requestAircraftUpdate()
Q_ASSERT(field);
m_aircraft->maxAccelSlider->setValue(field->getDouble());
} else if (frameType == "HeliCP") {
m_aircraft->widget_3->requestccpmUpdate();
m_aircraft->aircraftType->setCurrentIndex(m_aircraft->aircraftType->findText("Helicopter"));//"Helicopter"
}
}
/**
@ -1352,6 +1354,9 @@ void ConfigAirframeWidget::sendAircraftUpdate()
// Now reflect those settings in the "Custom" panel as well
updateCustomAirframeUI();
} else if (m_aircraft->aircraftType->currentText() == "Helicopter") {
airframeType = "HeliCP";
m_aircraft->widget_3->sendccpmUpdate();
} else {
airframeType = "Custom";
}

View File

@ -140,9 +140,9 @@ ConfigccpmWidget::ConfigccpmWidget(QWidget *parent) : ConfigTaskWidget(parent)
UpdateType();
connect(m_ccpm->saveccpmToSD, SIGNAL(clicked()), this, SLOT(saveccpmUpdate()));
connect(m_ccpm->saveccpmToRAM, SIGNAL(clicked()), this, SLOT(sendccpmUpdate()));
connect(m_ccpm->getccpmCurrent, SIGNAL(clicked()), this, SLOT(requestccpmUpdate()));
//connect(m_ccpm->saveccpmToSD, SIGNAL(clicked()), this, SLOT(saveccpmUpdate()));
//connect(m_ccpm->saveccpmToRAM, SIGNAL(clicked()), this, SLOT(sendccpmUpdate()));
//connect(m_ccpm->getccpmCurrent, SIGNAL(clicked()), this, SLOT(requestccpmUpdate()));
connect(m_ccpm->ccpmGenerateCurve, SIGNAL(clicked()), this, SLOT(GenerateCurve()));
connect(m_ccpm->NumCurvePoints, SIGNAL(valueChanged(int)), this, SLOT(UpdateCurveSettings()));
connect(m_ccpm->CurveType, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateCurveSettings()));
@ -437,6 +437,7 @@ void ConfigccpmWidget::ccpmSwashplateUpdate()
//m_ccpm->SwashplateImage->centerOn (CenterX, CenterY);
//m_ccpm->SwashplateImage->fitInView(SwashplateImg, Qt::KeepAspectRatio);
UpdateMixer();
@ -553,15 +554,151 @@ void ConfigccpmWidget::UpdateMixer()
*/
void ConfigccpmWidget::requestccpmUpdate()
{
//ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
//UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
int MixerDataFromHeli[8][5];
QString MixerOutputType[8];
int EngineChannel,TailRotorChannel,ServoChannels[4],ServoAngles[4],ServoCurve2[4];
int NumServos=0;
double Collective=0.0;
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
int i,j;
UAVObjectField *field;
UAVDataObject* obj;
obj = dynamic_cast<UAVDataObject*>(objManager->getObject(QString("MixerSettings")));
Q_ASSERT(obj);
//go through the user data and update the mixer matrix
for (i=0;i<8;i++)
{
field = obj->getField(tr( "Mixer%1Vector" ).arg(i));
//config the vector
for (j=0;j<5;j++)
{
MixerDataFromHeli[i][j] = field->getValue(j).toInt();
//field->setValue(m_ccpm->ccpmAdvancedSettingsTable->item(i,j+1)->text().toInt(),j);
}
}
for (i=0;i<8;i++)
{
field = obj->getField(tr( "Mixer%1Type" ).arg(i));
MixerOutputType[i] = field->getValue().toString();
}
EngineChannel =-1;
TailRotorChannel =-1;
for (j=0;j<5;j++)
{
ServoChannels[j]=8;
ServoCurve2[j]=0;
ServoAngles[j]=350;
}
NumServos=0;
//process the data from Heli and try to figure out the settings...
for (i=0;i<8;i++)
{
//check if this is the engine... Throttle only
if ((MixerOutputType[i].compare("Motor")==0)&&
(MixerDataFromHeli[i][0]>0)&&//ThrottleCurve1
(MixerDataFromHeli[i][1]==0)&&//ThrottleCurve2
(MixerDataFromHeli[i][2]==0)&&//Roll
(MixerDataFromHeli[i][3]==0)&&//Pitch
(MixerDataFromHeli[i][4]==0))//Yaw
{
EngineChannel = i;
m_ccpm->ccpmEngineChannel->setCurrentIndex(i);
}
//check if this is the tail rotor... REVO and YAW
if ((MixerOutputType[i].compare("Servo")==0)&&
//(MixerDataFromHeli[i][0]!=0)&&//ThrottleCurve1
(MixerDataFromHeli[i][1]==0)&&//ThrottleCurve2
(MixerDataFromHeli[i][2]==0)&&//Roll
(MixerDataFromHeli[i][3]==0)&&//Pitch
(MixerDataFromHeli[i][4]!=0))//Yaw
{
TailRotorChannel = i;
m_ccpm->ccpmTailChannel->setCurrentIndex(i);
m_ccpm->ccpmRevoSlider->setValue((MixerDataFromHeli[i][0]*100)/127);
m_ccpm->ccpmREVOspinBox->setValue((MixerDataFromHeli[i][0]*100)/127);
}
//check if this is a swashplate servo... Throttle is zero
if ((MixerOutputType[i].compare("Servo")==0)&&
(MixerDataFromHeli[i][0]==0)&&//ThrottleCurve1
//(MixerDataFromHeli[i][1]==0)&&//ThrottleCurve2
//(MixerDataFromHeli[i][2]==0)&&//Roll
//(MixerDataFromHeli[i][3]==0)&&//Pitch
(MixerDataFromHeli[i][4]==0))//Yaw
{
ServoChannels[NumServos] = i;//record the channel for this servo
ServoCurve2[NumServos]=MixerDataFromHeli[i][1];//record the ThrottleCurve2 contribution to this servo
ServoAngles[NumServos]=NumServos*45;//make this 0 for the final version
//if (NumServos==0)m_ccpm->ccpmServoWChannel->setCurrentIndex(i);
//if (NumServos==1)m_ccpm->ccpmServoXChannel->setCurrentIndex(i);
//if (NumServos==2)m_ccpm->ccpmServoYChannel->setCurrentIndex(i);
//if (NumServos==3)m_ccpm->ccpmServoZChannel->setCurrentIndex(i);
NumServos++;
}
}
m_ccpm->ccpmServoWChannel->setCurrentIndex(ServoChannels[0]);
m_ccpm->ccpmServoXChannel->setCurrentIndex(ServoChannels[1]);
m_ccpm->ccpmServoYChannel->setCurrentIndex(ServoChannels[2]);
m_ccpm->ccpmServoZChannel->setCurrentIndex(ServoChannels[3]);
m_ccpm->ccpmAngleW->setValue(ServoAngles[0]);
m_ccpm->ccpmAngleX->setValue(ServoAngles[1]);
m_ccpm->ccpmAngleY->setValue(ServoAngles[2]);
m_ccpm->ccpmAngleZ->setValue(ServoAngles[3]);
if (NumServos>1)
{
if((ServoCurve2[0]==0)&&(ServoCurve2[1]==0)&&(ServoCurve2[2]==0)&&(ServoCurve2[3]==0))
{
//fixed pitch heli
m_ccpm->ccpmCollectiveSlider->setValue(0);
}
if(ServoCurve2[0]==ServoCurve2[1])
{
if ((NumServos<3)||(ServoCurve2[1]==ServoCurve2[2]))
{
if ((NumServos<4)||(ServoCurve2[2]==ServoCurve2[3]))
{//all the servos have the same ThrottleCurve2 setting so this must be a CCPM config
Collective = ((double)ServoCurve2[0]*100.00)/127.00;
m_ccpm->ccpmCollectiveSlider->setValue((int)Collective);
m_ccpm->ccpmCollectivespinBox->setValue((int)Collective);
//just call it user angles for now....
m_ccpm->ccpmType->setCurrentIndex(m_ccpm->ccpmType->findText("Custom - User Angles"));
}
}
}
}
else
{//must be a custom config... "Custom - Advanced Settings"
m_ccpm->ccpmType->setCurrentIndex(m_ccpm->ccpmType->findText("Custom - Advanced Settings"));
}
//UAVObjectField *field;
//QTableWidgetItem *newItem;// = new QTableWidgetItem();
//get the settings for the curve from the mixer settings
field = obj->getField(QString("ThrottleCurve1"));
for (i=0;i<5;i++)
{
m_ccpm->CurveSettings->item(i, 0)->setText(field->getValue(i).toString());
//field->setValue(m_ccpm->CurveSettings->item(i, 0)->text().toDouble(),i);
}
field = obj->getField(QString("ThrottleCurve2"));
for (i=0;i<5;i++)
{
m_ccpm->CurveSettings->item(i, 1)->setText(field->getValue(i).toString());
//field->setValue(m_ccpm->CurveSettings->item(i, 1)->text().toDouble(),i);
}
//not doing anything yet
ccpmSwashplateUpdate();
@ -617,7 +754,7 @@ void ConfigccpmWidget::sendccpmUpdate()
//config the vector
for (j=0;j<5;j++)
{
//field->setValue(j,m_ccpm->ccpmAdvancedSettingsTable->item(i,j+1)->text().toInt());
field->setValue(m_ccpm->ccpmAdvancedSettingsTable->item(i,j+1)->text().toInt(),j);
}
}

View File

@ -63,14 +63,15 @@ private:
int MixerChannelData[6];
private slots:
void requestccpmUpdate();
void sendccpmUpdate();
void saveccpmUpdate();
void ccpmSwashplateUpdate();
void UpdateCurveSettings();
void GenerateCurve();
void UpdateMixer();
void UpdateType();
public slots:
void requestccpmUpdate();
void sendccpmUpdate();
void saveccpmUpdate();
};