Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fb6efcee
Commit
fb6efcee
authored
Jul 19, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes based on code comments by Bill.
parent
07a9ab08
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
14 deletions
+29
-14
BatteryMonitorConfig.cc
src/ui/configuration/BatteryMonitorConfig.cc
+5
-1
BatteryMonitorConfig.h
src/ui/configuration/BatteryMonitorConfig.h
+1
-0
BatteryMonitorConfig.ui
src/ui/configuration/BatteryMonitorConfig.ui
+2
-2
FrameTypeConfig.cc
src/ui/configuration/FrameTypeConfig.cc
+12
-6
OpticalFlowConfig.cc
src/ui/configuration/OpticalFlowConfig.cc
+1
-1
RadioCalibrationConfig.h
src/ui/configuration/RadioCalibrationConfig.h
+8
-4
No files found.
src/ui/configuration/BatteryMonitorConfig.cc
View file @
fb6efcee
...
...
@@ -18,7 +18,8 @@ BatteryMonitorConfig::BatteryMonitorConfig(QWidget *parent) : AP2ConfigWidget(pa
ui
.
apmVerComboBox
->
addItem
(
"1: APM2 - 2.5 non 3DR"
);
ui
.
apmVerComboBox
->
addItem
(
"2: APM2.5 - 3DR Power Module"
);
ui
.
apmVerComboBox
->
addItem
(
"3: PX4"
);
ui
.
alertOnLowCheckBox
->
setVisible
(
false
);
ui
.
alertOnLowCheckBox
->
setVisible
(
false
);
//Unimpelemented, but TODO.
connect
(
ui
.
monitorComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
monitorCurrentIndexChanged
(
int
)));
...
...
@@ -46,6 +47,9 @@ void BatteryMonitorConfig::activeUASSet(UASInterface *uas)
connect
(
uas
,
SIGNAL
(
batteryChanged
(
UASInterface
*
,
double
,
double
,
double
,
int
)),
this
,
SLOT
(
batteryChanged
(
UASInterface
*
,
double
,
double
,
double
,
int
)));
}
void
BatteryMonitorConfig
::
alertOnLowClicked
(
bool
checked
)
{
}
void
BatteryMonitorConfig
::
calcDividerSet
()
{
...
...
src/ui/configuration/BatteryMonitorConfig.h
View file @
fb6efcee
...
...
@@ -20,6 +20,7 @@ private slots:
void
calcDividerSet
();
void
ampsPerVoltSet
();
void
batteryCapacitySet
();
void
alertOnLowClicked
(
bool
checked
);
void
activeUASSet
(
UASInterface
*
uas
);
void
batteryChanged
(
UASInterface
*
uas
,
double
voltage
,
double
current
,
double
percent
,
int
seconds
);
private:
...
...
src/ui/configuration/BatteryMonitorConfig.ui
View file @
fb6efcee
...
...
@@ -53,12 +53,12 @@
<rect>
<x>
480
</x>
<y>
120
</y>
<width>
70
</width>
<width>
91
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
CheckBox
</string>
<string>
Alert On Low
</string>
</property>
</widget>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
...
...
src/ui/configuration/FrameTypeConfig.cc
View file @
fb6efcee
...
...
@@ -73,24 +73,30 @@ void FrameTypeConfig::parameterChanged(int uas, int component, QString parameter
void
FrameTypeConfig
::
xFrameSelected
()
{
if
(
m_uas
)
if
(
!
m_uas
)
{
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
1
));
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
1
));
}
void
FrameTypeConfig
::
plusFrameSelected
()
{
if
(
m_uas
)
if
(
!
m_uas
)
{
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
0
));
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
0
));
}
void
FrameTypeConfig
::
vFrameSelected
()
{
if
(
m_uas
)
if
(
!
m_uas
)
{
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
2
));
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
2
));
}
src/ui/configuration/OpticalFlowConfig.cc
View file @
fb6efcee
...
...
@@ -29,7 +29,7 @@ void OpticalFlowConfig::enableCheckBoxClicked(bool checked)
{
if
(
!
m_uas
)
{
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
)
);
showNullMAVErrorMessageBox
(
);
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLOW_ENABLE"
,
checked
?
1
:
0
);
...
...
src/ui/configuration/RadioCalibrationConfig.h
View file @
fb6efcee
...
...
@@ -57,10 +57,14 @@ private slots:
void
guiUpdateTimerTick
();
void
calibrateButtonClicked
();
private:
double
rcMin
[
8
];
double
rcMax
[
8
];
double
rcTrim
[
8
];
double
rcValue
[
8
];
QList
<
double
>
rcMin
;
QList
<
double
>
rcMax
;
QList
<
double
>
rcTrim
;
QList
<
double
>
rcValue
;
//double rcMin[8];
//double rcMax[8];
//double rcTrim[8];
//double rcValue[8];
QTimer
*
guiUpdateTimer
;
bool
m_calibrationEnabled
;
Ui
::
RadioCalibrationConfig
ui
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment