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
3d6e34c8
Commit
3d6e34c8
authored
Jul 21, 2011
by
LM
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:pixhawk/qgroundcontrol
parents
3dc5206e
8fae672a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
157 additions
and
10 deletions
+157
-10
UASInterface.h
src/uas/UASInterface.h
+4
-0
MainWindow.cc
src/ui/MainWindow.cc
+1
-0
QGCSensorSettingsWidget.cc
src/ui/QGCSensorSettingsWidget.cc
+124
-10
QGCSensorSettingsWidget.h
src/ui/QGCSensorSettingsWidget.h
+28
-0
No files found.
src/uas/UASInterface.h
View file @
3d6e34c8
...
...
@@ -271,6 +271,10 @@ public slots:
virtual
void
enableRCChannelDataTransmission
(
int
rate
)
=
0
;
virtual
void
enableRawControllerDataTransmission
(
int
rate
)
=
0
;
//virtual void enableRawSensorFusionTransmission(int rate) = 0;
virtual
void
enablePositionTransmission
(
int
rate
)
=
0
;
virtual
void
enableExtra1Transmission
(
int
rate
)
=
0
;
virtual
void
enableExtra2Transmission
(
int
rate
)
=
0
;
virtual
void
enableExtra3Transmission
(
int
rate
)
=
0
;
virtual
void
setLocalPositionSetpoint
(
float
x
,
float
y
,
float
z
,
float
yaw
)
=
0
;
virtual
void
setLocalPositionOffset
(
float
x
,
float
y
,
float
z
,
float
yaw
)
=
0
;
...
...
src/ui/MainWindow.cc
View file @
3d6e34c8
...
...
@@ -243,6 +243,7 @@ void MainWindow::resizeEvent(QResizeEvent * event)
ui
.
statusBar
->
setVisible
(
false
);
}
else
{
ui
.
statusBar
->
setVisible
(
true
);
ui
.
statusBar
->
setSizeGripEnabled
(
true
);
}
}
...
...
src/ui/QGCSensorSettingsWidget.cc
View file @
3d6e34c8
...
...
@@ -37,16 +37,34 @@ QGCSensorSettingsWidget::QGCSensorSettingsWidget(UASInterface* uas, QWidget *par
ui
(
new
Ui
::
QGCSensorSettingsWidget
)
{
ui
->
setupUi
(
this
);
// FIXME James Goppert
// XXX: This might be a bad idea sending a message every time the value changes
connect
(
ui
->
spinBox_rawSensor
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableRawSensorDataTransmission
(
int
)));
connect
(
ui
->
spinBox_controller
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableRawControllerDataTransmission
(
int
)));
connect
(
ui
->
spinBox_extended
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableExtendedSystemStatusTransmission
(
int
)));
connect
(
ui
->
spinBox_rc
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableRCChannelDataTransmission
(
int
)));
connect
(
ui
->
spinBox_position
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enablePositionTransmission
(
int
)));
connect
(
ui
->
spinBox_extra1
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableExtra1Transmission
(
int
)));
connect
(
ui
->
spinBox_extra2
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableExtra2Transmission
(
int
)));
connect
(
ui
->
spinBox_extra3
,
SIGNAL
(
valueChanged
(
int
)),
mav
,
SLOT
(
enableExtra3Transmission
(
int
)));
// Set up delay timers
delayedSendRawSensorTimer
.
setInterval
(
800
);
delayedSendControllerTimer
.
setInterval
(
800
);
delayedSendExtendedTimer
.
setInterval
(
800
);
delayedSendRCTimer
.
setInterval
(
800
);
delayedSendPositionTimer
.
setInterval
(
800
);
delayedSendExtra1Timer
.
setInterval
(
800
);
delayedSendExtra2Timer
.
setInterval
(
800
);
delayedSendExtra3Timer
.
setInterval
(
800
);
connect
(
&
delayedSendRawSensorTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendRawSensor
()));
connect
(
&
delayedSendControllerTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendController
()));
connect
(
&
delayedSendExtendedTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendExtended
()));
connect
(
&
delayedSendRCTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendRC
()));
connect
(
&
delayedSendPositionTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendPosition
()));
connect
(
&
delayedSendExtra1Timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendExtra1
()));
connect
(
&
delayedSendExtra2Timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendExtra2
()));
connect
(
&
delayedSendExtra3Timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
sendExtra3
()));
// Connect UI
connect
(
ui
->
spinBox_rawSensor
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendRawSensor
(
int
)));
//mav, SLOT(enableRawSensorDataTransmission(int)));
connect
(
ui
->
spinBox_controller
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendController
(
int
)));
connect
(
ui
->
spinBox_extended
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendExtended
(
int
)));
connect
(
ui
->
spinBox_rc
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendRC
(
int
)));
connect
(
ui
->
spinBox_position
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendPosition
(
int
)));
connect
(
ui
->
spinBox_extra1
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendExtra1
(
int
)));
connect
(
ui
->
spinBox_extra2
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendExtra2
(
int
)));
connect
(
ui
->
spinBox_extra3
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
delayedSendExtra3
(
int
)));
// Calibration
connect
(
ui
->
rcCalButton
,
SIGNAL
(
clicked
()),
mav
,
SLOT
(
startRadioControlCalibration
()));
...
...
@@ -55,6 +73,102 @@ QGCSensorSettingsWidget::QGCSensorSettingsWidget(UASInterface* uas, QWidget *par
connect
(
ui
->
gyroCalButton
,
SIGNAL
(
clicked
()),
mav
,
SLOT
(
startGyroscopeCalibration
()));
}
void
QGCSensorSettingsWidget
::
delayedSendRawSensor
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendRawSensorTimer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendController
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendControllerTimer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendExtended
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendExtendedTimer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendRC
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendRCTimer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendPosition
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendPositionTimer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendExtra1
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendExtra1Timer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendExtra2
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendExtra2Timer
.
start
();
}
void
QGCSensorSettingsWidget
::
delayedSendExtra3
(
int
rate
)
{
Q_UNUSED
(
rate
);
delayedSendExtra3Timer
.
start
();
}
void
QGCSensorSettingsWidget
::
sendRawSensor
()
{
delayedSendRawSensorTimer
.
stop
();
mav
->
enableRawSensorDataTransmission
(
ui
->
spinBox_rawSensor
->
value
());
}
void
QGCSensorSettingsWidget
::
sendController
()
{
delayedSendControllerTimer
.
stop
();
mav
->
enableRawControllerDataTransmission
(
ui
->
spinBox_controller
->
value
());
}
void
QGCSensorSettingsWidget
::
sendExtended
()
{
delayedSendExtendedTimer
.
stop
();
mav
->
enableExtendedSystemStatusTransmission
(
ui
->
spinBox_extended
->
value
());
}
void
QGCSensorSettingsWidget
::
sendRC
()
{
delayedSendRCTimer
.
stop
();
mav
->
enableRCChannelDataTransmission
(
ui
->
spinBox_rc
->
value
());
}
void
QGCSensorSettingsWidget
::
sendPosition
()
{
delayedSendPositionTimer
.
stop
();
mav
->
enablePositionTransmission
(
ui
->
spinBox_position
->
value
());
}
void
QGCSensorSettingsWidget
::
sendExtra1
()
{
delayedSendExtra1Timer
.
stop
();
mav
->
enableExtra1Transmission
(
ui
->
spinBox_extra1
->
value
());
}
void
QGCSensorSettingsWidget
::
sendExtra2
()
{
delayedSendExtra2Timer
.
stop
();
mav
->
enableExtra2Transmission
(
ui
->
spinBox_extra2
->
value
());
}
void
QGCSensorSettingsWidget
::
sendExtra3
()
{
delayedSendExtra3Timer
.
stop
();
mav
->
enableExtra3Transmission
(
ui
->
spinBox_extra3
->
value
());
}
QGCSensorSettingsWidget
::~
QGCSensorSettingsWidget
()
{
delete
ui
;
...
...
src/ui/QGCSensorSettingsWidget.h
View file @
3d6e34c8
...
...
@@ -46,10 +46,38 @@ public:
QGCSensorSettingsWidget
(
UASInterface
*
uas
,
QWidget
*
parent
=
0
);
~
QGCSensorSettingsWidget
();
public
slots
:
void
delayedSendRawSensor
(
int
rate
);
void
delayedSendController
(
int
rate
);
void
delayedSendExtended
(
int
rate
);
void
delayedSendRC
(
int
rate
);
void
delayedSendPosition
(
int
rate
);
void
delayedSendExtra1
(
int
rate
);
void
delayedSendExtra2
(
int
rate
);
void
delayedSendExtra3
(
int
rate
);
protected:
UASInterface
*
mav
;
QTimer
delayedSendRawSensorTimer
;
QTimer
delayedSendControllerTimer
;
QTimer
delayedSendExtendedTimer
;
QTimer
delayedSendRCTimer
;
QTimer
delayedSendPositionTimer
;
QTimer
delayedSendExtra1Timer
;
QTimer
delayedSendExtra2Timer
;
QTimer
delayedSendExtra3Timer
;
void
changeEvent
(
QEvent
*
e
);
protected
slots
:
void
sendRawSensor
();
void
sendController
();
void
sendExtended
();
void
sendRC
();
void
sendPosition
();
void
sendExtra1
();
void
sendExtra2
();
void
sendExtra3
();
private:
Ui
::
QGCSensorSettingsWidget
*
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