dRonin
adbada4
dRonin GCS
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Groups
Pages
brainconfiguration.cpp
Go to the documentation of this file.
1
14
/*
15
* This program is free software; you can redistribute it and/or modify
16
* it under the terms of the GNU General Public License as published by
17
* the Free Software Foundation; either version 3 of the License, or
18
* (at your option) any later version.
19
*
20
* This program is distributed in the hope that it will be useful, but
21
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23
* for more details.
24
*
25
* You should have received a copy of the GNU General Public License along
26
* with this program; if not, see <http://www.gnu.org/licenses/>
27
*/
28
29
#include "
uavobjectwidgetutils/smartsavebutton.h
"
30
#include "
brainconfiguration.h
"
31
#include "ui_brainconfiguration.h"
32
33
#include "hwbrain.h"
34
35
BrainConfiguration::BrainConfiguration
(QWidget *parent)
36
:
ConfigTaskWidget
(parent)
37
, ui(new Ui::
BrainConfiguration
)
38
{
39
ui->setupUi(
this
);
40
41
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"RxPort"
, ui->cmbRxPort);
42
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"RxPortUsart"
, ui->cmbRxPortUsart);
43
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"MainPort"
, ui->cmbMainPort);
44
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"FlxPort"
, ui->cmbFlxPort);
45
46
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"Magnetometer"
, ui->cmbMagnetometer);
47
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"ExtMagOrientation"
, ui->cmbExtMagOrientation);
48
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"USB_HIDPort"
, ui->cmbUsbHidPort);
49
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"USB_VCPPort"
, ui->cmbUsbVcpPort);
50
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"GyroFullScale"
, ui->cmbGyroRange);
51
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"AccelFullScale"
, ui->cmbAccelRange);
52
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"MPU9250GyroLPF"
, ui->cmbGyroLpf);
53
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"MPU9250AccelLPF"
, ui->cmbAccelLpf);
54
addUAVObjectToWidgetRelation
(
"HwBrain"
,
"DSMxMode"
, ui->cbDsmxMode);
55
56
// Load UAVObjects to widget relations from UI file
57
// using objrelation dynamic property
58
autoLoadWidgets
();
59
60
// enableControls(false);
61
enableControls
(
true
);
62
populateWidgets
();
63
refreshWidgetsValues
();
64
forceConnectedState
();
65
66
img = QPixmap(
":/brainfpv/images/brain.png"
);
67
ui->imgLabel->setPixmap(img);
68
}
69
70
BrainConfiguration::~BrainConfiguration
()
71
{
72
delete
ui;
73
}
ConfigTaskWidget::autoLoadWidgets
void autoLoadWidgets()
Definition:
configtaskwidget.cpp:716
ConfigTaskWidget::addUAVObjectToWidgetRelation
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, int index=0, double scale=1, bool isLimited=false, bool useUnits=false, QList< int > *defaultReloadGroups=nullptr, quint32 instID=0, bool oneWayBind=false)
Add an UAVObject field to widget relation to the management system Note: This is the instance called ...
Definition:
configtaskwidget.cpp:142
BrainConfiguration
Definition:
brainconfiguration.h:38
ConfigTaskWidget
Definition:
configtaskwidget.h:55
BrainConfiguration::BrainConfiguration
BrainConfiguration(QWidget *parent=nullptr)
Definition:
brainconfiguration.cpp:35
smartsavebutton.h
ConfigTaskWidget::populateWidgets
virtual void populateWidgets()
Definition:
configtaskwidget.cpp:355
ConfigTaskWidget::enableControls
virtual void enableControls(bool enable)
Definition:
configtaskwidget.cpp:449
ConfigTaskWidget::forceConnectedState
void forceConnectedState()
Definition:
configtaskwidget.cpp:322
ConfigTaskWidget::refreshWidgetsValues
virtual void refreshWidgetsValues(UAVObject *obj=NULL)
Definition:
configtaskwidget.cpp:371
brainconfiguration.h
BrainConfiguration::~BrainConfiguration
~BrainConfiguration()
Definition:
brainconfiguration.cpp:70
ground
gcs
src
plugins
boards_brainfpv
brainconfiguration.cpp
Generated by
1.8.6