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
2efc20be
Commit
2efc20be
authored
Jun 23, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-working transfer commit
parent
8e18fc7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
0 deletions
+74
-0
PxQuadMAV.cc
src/uas/PxQuadMAV.cc
+6
-0
UASInterface.h
src/uas/UASInterface.h
+24
-0
HSIDisplay.cc
src/ui/HSIDisplay.cc
+19
-0
HSIDisplay.h
src/ui/HSIDisplay.h
+25
-0
No files found.
src/uas/PxQuadMAV.cc
View file @
2efc20be
...
...
@@ -119,6 +119,12 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
valueChanged
(
this
,
"Load"
,
((
float
)
status
.
load
)
/
1000.0
f
,
MG
::
TIME
::
getGroundTimeNow
());
}
break
;
case
MAVLINK_MSG_ID_CONTROL_STATUS
:
{
mavlink_control_status_t
status
;
mavlink_msg_control_status_decode
(
&
message
,
&
status
);
}
break
;
default:
// Do nothing
break
;
...
...
src/uas/UASInterface.h
View file @
2efc20be
...
...
@@ -314,6 +314,30 @@ signals:
void
imageDataReceived
(
int
imgid
,
const
unsigned
char
*
imageData
,
int
length
,
int
startIndex
);
/** @brief Emit the new system type */
void
systemTypeSet
(
UASInterface
*
uas
,
unsigned
int
type
);
/** @brief Attitude control enabled/disabled */
void
attitudeControlEnabled
(
bool
enabled
);
/** @brief Position 2D control enabled/disabled */
void
positionXYControlEnabled
(
bool
enabled
);
/** @brief Altitude control enabled/disabled */
void
positionZControlEnabled
(
bool
enabled
);
/** @brief Heading control enabled/disabled */
void
positionYawControlEnabled
(
bool
enabled
);
/**
* @brief Localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
localizationChanged
(
UASInterface
*
uas
,
int
fix
);
/**
* @brief GPS localization quality changed
* @param fix 0: lost, 1: at least one satellite, but no GPS fix, 2: 2D localization, 3: 3D localization
*/
void
gpsLocalizationChanged
(
UASInterface
*
uas
,
int
fix
);
/**
* @brief Vision localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
visionLocalizationChanged
(
UASInterface
*
uas
,
int
fix
);
};
Q_DECLARE_INTERFACE
(
UASInterface
,
"org.qgroundcontrol/1.0"
);
...
...
src/ui/HSIDisplay.cc
View file @
2efc20be
...
...
@@ -372,6 +372,10 @@ void HSIDisplay::setActiveUAS(UASInterface* uas)
connect
(
uas
,
SIGNAL
(
speedChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateSpeed
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
connect
(
uas
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAttitude
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
connect
(
uas
,
SIGNAL
(
attitudeControlEnabled
(
bool
)),
this
,
SLOT
(
updateAttitudeControllerEnabled
(
UASInterface
*
,
bool
)));
connect
(
uas
,
SIGNAL
(
positionXYControlEnabled
(
bool
)),
this
,
SLOT
(
updatePositionXYControllerEnabled
(
UASInterface
*
,
bool
)));
connect
(
uas
,
SIGNAL
(
positionZControlEnabled
(
bool
)),
this
,
SLOT
(
updatePositionZControllerEnabled
(
UASInterface
*
,
bool
)));
connect
(
uas
,
SIGNAL
(
positionYawControlEnabled
(
bool
)),
this
,
SLOT
(
updatePositionYawControllerEnabled
(
UASInterface
*
,
bool
)))
// Now connect the new UAS
//if (this->uas != uas)
...
...
@@ -701,6 +705,19 @@ void HSIDisplay::drawAltitudeSetpoint(float xRef, float yRef, float radius, cons
// paintText(label, color, 4.5f, xRef-7.5f, yRef-2.0f, painter);
}
/**
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
localizationChanged
(
UASInterface
*
uas
,
int
fix
);
/**
* @param fix 0: lost, 1: at least one satellite, but no GPS fix, 2: 2D localization, 3: 3D localization
*/
void
gpsLocalizationChanged
(
UASInterface
*
uas
,
int
fix
);
/**
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
visionLocalizationChanged
(
UASInterface
*
uas
,
int
fix
);
void
HSIDisplay
::
updateJoystick
(
double
roll
,
double
pitch
,
double
yaw
,
double
thrust
,
int
xHat
,
int
yHat
)
{
...
...
@@ -710,3 +727,5 @@ void HSIDisplay::pressKey(int key)
{
}
src/ui/HSIDisplay.h
View file @
2efc20be
...
...
@@ -63,6 +63,31 @@ public slots:
void
updatePositionXYControllerEnabled
(
UASInterface
*
uas
,
bool
enabled
);
void
updatePositionZControllerEnabled
(
UASInterface
*
uas
,
bool
enabled
);
/** @brief Attitude control enabled/disabled */
void
attitudeControlEnabled
(
bool
enabled
);
/** @brief Position 2D control enabled/disabled */
void
positionXYControlEnabled
(
bool
enabled
);
/** @brief Altitude control enabled/disabled */
void
positionZControlEnabled
(
bool
enabled
);
/** @brief Heading control enabled/disabled */
void
positionYawControlEnabled
(
bool
enabled
);
/**
* @brief Localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
updateLocalization
(
UASInterface
*
uas
,
int
localization
);
/**
* @brief GPS localization quality changed
* @param fix 0: lost, 1: at least one satellite, but no GPS fix, 2: 2D localization, 3: 3D localization
*/
void
updateGpsLocalization
(
UASInterface
*
uas
,
int
localization
);
/**
* @brief Vision localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
*/
void
updateVisionLocalization
(
UASInterface
*
uas
,
int
localization
);
void
paintEvent
(
QPaintEvent
*
event
);
/** @brief Update state from joystick */
void
updateJoystick
(
double
roll
,
double
pitch
,
double
yaw
,
double
thrust
,
int
xHat
,
int
yHat
);
...
...
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