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

OP-36: Save button for CC attitude bias

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3095 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2011-03-28 21:31:44 +00:00 committed by peabody124
parent 57adfdb708
commit 1e8e2f89fd
3 changed files with 20 additions and 0 deletions

View File

@ -52,6 +52,19 @@
<string>Place aircraft flat before computing</string>
</property>
</widget>
<widget class="QPushButton" name="saveButton">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>114</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Save to SD</string>
</property>
</widget>
</widget>
<resources/>
<connections/>

View File

@ -36,6 +36,7 @@ ConfigCCAttitudeWidget::ConfigCCAttitudeWidget(QWidget *parent) :
{
ui->setupUi(this);
connect(ui->zeroBias,SIGNAL(clicked()),this,SLOT(startAccelCalibration()));
connect(ui->saveButton,SIGNAL(clicked()),this,SLOT(saveAttitudeSettings()));
}
ConfigCCAttitudeWidget::~ConfigCCAttitudeWidget()
@ -112,3 +113,8 @@ void ConfigCCAttitudeWidget::startAccelCalibration() {
obj->setMetadata(mdata);
}
void ConfigCCAttitudeWidget::saveAttitudeSettings() {
UAVDataObject * obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("AttitudeSettings")));
saveObjectToSD(obj);
}

View File

@ -50,6 +50,7 @@ private slots:
void attitudeRawUpdated(UAVObject *);
void timeout();
void startAccelCalibration();
void saveAttitudeSettings();
private:
QMutex startStop;