mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Add virtual updateObjectsFromWidgets to configccattitude;
reset calibration progress bar to 0% upon successful apply/save.
This commit is contained in:
parent
1b2ffde116
commit
e2d1f67d9e
@ -61,6 +61,14 @@ ConfigCCAttitudeWidget::~ConfigCCAttitudeWidget()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ConfigCCAttitudeWidget::updateObjectsFromWidgets()
|
||||
{
|
||||
ConfigTaskWidget::updateObjectsFromWidgets();
|
||||
|
||||
ui->zeroBiasProgress->setValue(0);
|
||||
|
||||
}
|
||||
|
||||
void ConfigCCAttitudeWidget::attitudeRawUpdated(UAVObject * obj) {
|
||||
QMutexLocker locker(&startStop);
|
||||
|
||||
@ -101,7 +109,6 @@ void ConfigCCAttitudeWidget::attitudeRawUpdated(UAVObject * obj) {
|
||||
attitudeSettingsData.GyroBias[2] = -z_gyro_bias;
|
||||
attitudeSettingsData.BiasCorrectGyro = AttitudeSettings::BIASCORRECTGYRO_TRUE;
|
||||
AttitudeSettings::GetInstance(getObjectManager())->setData(attitudeSettingsData);
|
||||
|
||||
} else {
|
||||
// Possible to get here if weird threading stuff happens. Just ignore updates.
|
||||
qDebug("Unexpected accel update received.");
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
explicit ConfigCCAttitudeWidget(QWidget *parent = 0);
|
||||
~ConfigCCAttitudeWidget();
|
||||
|
||||
virtual void updateObjectsFromWidgets();
|
||||
|
||||
private slots:
|
||||
void attitudeRawUpdated(UAVObject * obj);
|
||||
void timeout();
|
||||
|
Loading…
x
Reference in New Issue
Block a user