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
e4776615
Commit
e4776615
authored
Jun 28, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change for all config widgets to use the Parameter Manager for setting parameters
parent
fad0c692
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
67 deletions
+67
-67
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+1
-1
AirspeedConfig.cc
src/ui/configuration/AirspeedConfig.cc
+4
-4
BatteryMonitorConfig.cc
src/ui/configuration/BatteryMonitorConfig.cc
+17
-17
CompassConfig.cc
src/ui/configuration/CompassConfig.cc
+4
-4
FlightModeConfig.cc
src/ui/configuration/FlightModeConfig.cc
+17
-17
FrameTypeConfig.cc
src/ui/configuration/FrameTypeConfig.cc
+3
-3
OpticalFlowConfig.cc
src/ui/configuration/OpticalFlowConfig.cc
+1
-1
OsdConfig.cc
src/ui/configuration/OsdConfig.cc
+16
-16
RadioCalibrationConfig.cc
src/ui/configuration/RadioCalibrationConfig.cc
+2
-2
SonarConfig.cc
src/ui/configuration/SonarConfig.cc
+2
-2
No files found.
src/ui/QGCParamWidget.cc
View file @
e4776615
...
...
@@ -1019,7 +1019,7 @@ void QGCParamWidget::setParameter(int component, QString parameterName, QVariant
}
if
(
parameters
.
value
(
component
)
->
value
(
parameterName
)
==
value
)
{
qDebug
()
<<
"Value not changed, not sending:"
<<
parameterName
<<
value
;
statusLabel
->
setText
(
tr
(
"REJ. %1 > max"
).
arg
(
value
.
toDouble
()))
;
return
;
}
...
...
src/ui/configuration/AirspeedConfig.cc
View file @
e4776615
...
...
@@ -56,11 +56,11 @@ void AirspeedConfig::useCheckBoxClicked(bool checked)
}
if
(
checked
)
{
m_uas
->
setParameter
(
0
,
"ARSPD_USE"
,
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"ARSPD_USE"
,
1
);
}
else
{
m_uas
->
setParameter
(
0
,
"ARSPD_USE"
,
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"ARSPD_USE"
,
0
);
}
}
...
...
@@ -73,10 +73,10 @@ void AirspeedConfig::enableCheckBoxClicked(bool checked)
}
if
(
checked
)
{
m_uas
->
setParameter
(
0
,
"ARSPD_ENABLE"
,
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"ARSPD_ENABLE"
,
1
);
}
else
{
m_uas
->
setParameter
(
0
,
"ARSPD_ENABLE"
,
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"ARSPD_ENABLE"
,
0
);
}
}
src/ui/configuration/BatteryMonitorConfig.cc
View file @
e4776615
...
...
@@ -47,7 +47,7 @@ void BatteryMonitorConfig::calcDividerSet()
QMessageBox
::
information
(
0
,
"Error"
,
"Invalid number entered for voltage divider. Please try again"
);
return
;
}
m_uas
->
setParameter
(
0
,
"VOLT_DIVIDER"
,
newval
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"VOLT_DIVIDER"
,
newval
);
}
void
BatteryMonitorConfig
::
ampsPerVoltSet
()
{
...
...
@@ -64,7 +64,7 @@ void BatteryMonitorConfig::ampsPerVoltSet()
QMessageBox
::
information
(
0
,
"Error"
,
"Invalid number entered for amps per volts. Please try again"
);
return
;
}
m_uas
->
setParameter
(
0
,
"AMPS_PER_VOLT"
,
newval
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"AMPS_PER_VOLT"
,
newval
);
}
void
BatteryMonitorConfig
::
batteryCapacitySet
()
{
...
...
@@ -81,7 +81,7 @@ void BatteryMonitorConfig::batteryCapacitySet()
QMessageBox
::
information
(
0
,
"Error"
,
"Invalid number entered for amps per volts. Please try again"
);
return
;
}
m_uas
->
setParameter
(
0
,
"BATT_CAPACITY"
,
newval
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CAPACITY"
,
newval
);
}
void
BatteryMonitorConfig
::
monitorCurrentIndexChanged
(
int
index
)
...
...
@@ -93,9 +93,9 @@ void BatteryMonitorConfig::monitorCurrentIndexChanged(int index)
}
if
(
index
==
0
)
{
m_uas
->
setParameter
(
0
,
"BATT_VOLT_PIN"
,
-
1
);
m_uas
->
setParameter
(
0
,
"BATT_CURR_PIN"
,
-
1
);
m_uas
->
setParameter
(
0
,
"BATT_MONITOR"
,
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_VOLT_PIN"
,
-
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CURR_PIN"
,
-
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_MONITOR"
,
0
);
ui
.
sensorComboBox
->
setEnabled
(
false
);
ui
.
apmVerComboBox
->
setEnabled
(
false
);
ui
.
measuredVoltsLineEdit
->
setEnabled
(
false
);
...
...
@@ -106,7 +106,7 @@ void BatteryMonitorConfig::monitorCurrentIndexChanged(int index)
}
else
if
(
index
==
1
)
{
m_uas
->
setParameter
(
0
,
"BATT_MONITOR"
,
3
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_MONITOR"
,
3
);
ui
.
sensorComboBox
->
setEnabled
(
false
);
ui
.
apmVerComboBox
->
setEnabled
(
true
);
ui
.
measuredVoltsLineEdit
->
setEnabled
(
true
);
...
...
@@ -116,7 +116,7 @@ void BatteryMonitorConfig::monitorCurrentIndexChanged(int index)
}
else
if
(
index
==
2
)
{
m_uas
->
setParameter
(
0
,
"BATT_MONITOR"
,
4
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_MONITOR"
,
4
);
ui
.
sensorComboBox
->
setEnabled
(
true
);
ui
.
apmVerComboBox
->
setEnabled
(
true
);
ui
.
measuredVoltsLineEdit
->
setEnabled
(
true
);
...
...
@@ -197,24 +197,24 @@ void BatteryMonitorConfig::apmVerCurrentIndexChanged(int index)
}
if
(
index
==
0
)
//APM1
{
m_uas
->
setParameter
(
0
,
"BATT_VOLT_PIN"
,
0
);
m_uas
->
setParameter
(
0
,
"BATT_CURR_PIN"
,
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_VOLT_PIN"
,
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CURR_PIN"
,
1
);
}
else
if
(
index
==
1
)
//APM2
{
m_uas
->
setParameter
(
0
,
"BATT_VOLT_PIN"
,
1
);
m_uas
->
setParameter
(
0
,
"BATT_CURR_PIN"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_VOLT_PIN"
,
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CURR_PIN"
,
2
);
}
else
if
(
index
==
2
)
//APM2.5
{
m_uas
->
setParameter
(
0
,
"BATT_VOLT_PIN"
,
13
);
m_uas
->
setParameter
(
0
,
"BATT_CURR_PIN"
,
12
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_VOLT_PIN"
,
13
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CURR_PIN"
,
12
);
}
else
if
(
index
==
3
)
//PX4
{
m_uas
->
setParameter
(
0
,
"BATT_VOLT_PIN"
,
100
);
m_uas
->
setParameter
(
0
,
"BATT_CURR_PIN"
,
101
);
m_uas
->
setParameter
(
0
,
"VOLT_DIVIDER"
,
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_VOLT_PIN"
,
100
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"BATT_CURR_PIN"
,
101
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"VOLT_DIVIDER"
,
1
);
ui
.
calcDividerLineEdit
->
setText
(
"1"
);
}
}
...
...
src/ui/configuration/CompassConfig.cc
View file @
e4776615
...
...
@@ -71,7 +71,7 @@ void CompassConfig::enableClicked(bool enabled)
{
if
(
enabled
)
{
m_uas
->
setParameter
(
0
,
"MAG_ENABLE"
,
QVariant
(
1
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MAG_ENABLE"
,
QVariant
(
1
));
ui
.
autoDecCheckBox
->
setEnabled
(
true
);
if
(
!
ui
.
autoDecCheckBox
->
isChecked
())
{
...
...
@@ -80,7 +80,7 @@ void CompassConfig::enableClicked(bool enabled)
}
else
{
m_uas
->
setParameter
(
0
,
"MAG_ENABLE"
,
QVariant
(
0
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MAG_ENABLE"
,
QVariant
(
0
));
ui
.
autoDecCheckBox
->
setEnabled
(
false
);
ui
.
declinationLineEdit
->
setEnabled
(
false
);
}
...
...
@@ -93,11 +93,11 @@ void CompassConfig::autoDecClicked(bool enabled)
{
if
(
enabled
)
{
m_uas
->
setParameter
(
0
,
"COMPASS_AUTODEC"
,
QVariant
(
1
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"COMPASS_AUTODEC"
,
QVariant
(
1
));
}
else
{
m_uas
->
setParameter
(
0
,
"COMPASS_AUTODEC"
,
QVariant
(
0
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"COMPASS_AUTODEC"
,
QVariant
(
0
));
}
}
}
...
...
src/ui/configuration/FlightModeConfig.cc
View file @
e4776615
...
...
@@ -135,29 +135,29 @@ void FlightModeConfig::saveButtonClicked()
{
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
m_uas
->
setParameter
(
0
,
"FLTMODE1"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode1ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"FLTMODE2"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode2ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"FLTMODE3"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode3ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"FLTMODE4"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode4ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"FLTMODE5"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode5ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"FLTMODE6"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode6ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE1"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode1ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE2"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode2ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE3"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode3ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE4"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode4ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE5"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode5ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE6"
,(
char
)
planeModeUiIndexToIndex
[
ui
.
mode6ComboBox
->
currentIndex
()]);
}
else
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_GROUND_ROVER
)
{
m_uas
->
setParameter
(
0
,
"MODE1"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode1ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"MODE2"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode2ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"MODE3"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode3ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"MODE4"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode4ComboBox
->
currentIndex
()]);
m_uas
->
setParameter
(
0
,
"MODE5"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode5ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MODE1"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode1ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MODE2"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode2ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MODE3"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode3ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MODE4"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode4ComboBox
->
currentIndex
()]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MODE5"
,(
char
)
roverModeUiIndexToIndex
[
ui
.
mode5ComboBox
->
currentIndex
()]);
}
else
if
(
m_uas
->
getSystemType
()
==
MAV_TYPE_QUADROTOR
)
{
m_uas
->
setParameter
(
0
,
"FLTMODE1"
,(
char
)
ui
.
mode1ComboBox
->
currentIndex
()
+
1
);
m_uas
->
setParameter
(
0
,
"FLTMODE2"
,(
char
)
ui
.
mode2ComboBox
->
currentIndex
()
+
1
);
m_uas
->
setParameter
(
0
,
"FLTMODE3"
,(
char
)
ui
.
mode3ComboBox
->
currentIndex
()
+
1
);
m_uas
->
setParameter
(
0
,
"FLTMODE4"
,(
char
)
ui
.
mode4ComboBox
->
currentIndex
()
+
1
);
m_uas
->
setParameter
(
0
,
"FLTMODE5"
,(
char
)
ui
.
mode5ComboBox
->
currentIndex
()
+
1
);
m_uas
->
setParameter
(
0
,
"FLTMODE6"
,(
char
)
ui
.
mode6ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE1"
,(
char
)
ui
.
mode1ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE2"
,(
char
)
ui
.
mode2ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE3"
,(
char
)
ui
.
mode3ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE4"
,(
char
)
ui
.
mode4ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE5"
,(
char
)
ui
.
mode5ComboBox
->
currentIndex
()
+
1
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLTMODE6"
,(
char
)
ui
.
mode6ComboBox
->
currentIndex
()
+
1
);
}
}
...
...
src/ui/configuration/FrameTypeConfig.cc
View file @
e4776615
...
...
@@ -88,7 +88,7 @@ void FrameTypeConfig::xFrameSelected()
{
if
(
m_uas
)
{
m_uas
->
setParameter
(
0
,
"FRAME"
,
QVariant
(
1
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
1
));
}
}
...
...
@@ -96,7 +96,7 @@ void FrameTypeConfig::plusFrameSelected()
{
if
(
m_uas
)
{
m_uas
->
setParameter
(
0
,
"FRAME"
,
QVariant
(
0
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
0
));
}
}
...
...
@@ -104,6 +104,6 @@ void FrameTypeConfig::vFrameSelected()
{
if
(
m_uas
)
{
m_uas
->
setParameter
(
0
,
"FRAME"
,
QVariant
(
2
));
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FRAME"
,
QVariant
(
2
));
}
}
src/ui/configuration/OpticalFlowConfig.cc
View file @
e4776615
...
...
@@ -32,5 +32,5 @@ void OpticalFlowConfig::enableCheckBoxClicked(bool checked)
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"FLOW_ENABLE"
,
checked
?
1
:
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"FLOW_ENABLE"
,
checked
?
1
:
0
);
}
src/ui/configuration/OsdConfig.cc
View file @
e4776615
...
...
@@ -17,21 +17,21 @@ void OsdConfig::enableButtonClicked()
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"SR0_EXT_STAT"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA1"
,
10
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA2"
,
10
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA3"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_POSITION"
,
3
);
m_uas
->
setParameter
(
0
,
"SR0_RAW_CTRL"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_RAW_SENS"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_RC_CHAN"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_EXT_STAT"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_EXTRA1"
,
10
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_EXTRA2"
,
10
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_EXTRA3"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_POSITION"
,
3
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_RAW_CTRL"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_RAW_SENS"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR0_RC_CHAN"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_EXT_STAT"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA1"
,
10
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA2"
,
10
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA3"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_POSITION"
,
3
);
m_uas
->
setParameter
(
0
,
"SR3_RAW_CTRL"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_RAW_SENS"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_RC_CHAN"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_EXT_STAT"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_EXTRA1"
,
10
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_EXTRA2"
,
10
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_EXTRA3"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_POSITION"
,
3
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_RAW_CTRL"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_RAW_SENS"
,
2
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SR3_RC_CHAN"
,
2
);
}
src/ui/configuration/RadioCalibrationConfig.cc
View file @
e4776615
...
...
@@ -213,11 +213,11 @@ void RadioCalibrationConfig::calibrateButtonClicked()
{
qDebug
()
<<
"SENDING MIN"
<<
minTpl
.
arg
(
i
+
1
)
<<
rcMin
[
i
];
qDebug
()
<<
"SENDING MAX"
<<
maxTpl
.
arg
(
i
+
1
)
<<
rcMax
[
i
];
m_uas
->
setParameter
(
0
,
minTpl
.
arg
(
i
+
1
),
(
float
)
rcMin
[
i
]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
minTpl
.
arg
(
i
+
1
),
(
float
)
rcMin
[
i
]);
QGC
::
SLEEP
::
usleep
(
50000
);
//m_uas->setParameter(0, trimTpl.arg(i+1), rcTrim[i]);
//QGC::SLEEP::usleep(50000);
m_uas
->
setParameter
(
0
,
maxTpl
.
arg
(
i
+
1
),
(
float
)
rcMax
[
i
]);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
maxTpl
.
arg
(
i
+
1
),
(
float
)
rcMax
[
i
]);
QGC
::
SLEEP
::
usleep
(
50000
);
}
ui
.
rollWidget
->
setMin
(
800
);
...
...
src/ui/configuration/SonarConfig.cc
View file @
e4776615
...
...
@@ -26,7 +26,7 @@ void SonarConfig::checkBoxToggled(bool enabled)
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"SONAR_ENABLE"
,
ui
.
enableCheckBox
->
isChecked
()
?
1
:
0
);
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SONAR_ENABLE"
,
ui
.
enableCheckBox
->
isChecked
()
?
1
:
0
);
}
void
SonarConfig
::
sonarTypeChanged
(
int
index
)
{
...
...
@@ -35,7 +35,7 @@ void SonarConfig::sonarTypeChanged(int index)
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"SONAR_TYPE"
,
ui
.
sonarTypeComboBox
->
currentIndex
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"SONAR_TYPE"
,
ui
.
sonarTypeComboBox
->
currentIndex
());
}
void
SonarConfig
::
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
...
...
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