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
fc442534
Commit
fc442534
authored
Nov 21, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for fine-granularity sensor status
parent
fd950f54
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
1 deletion
+150
-1
UASInterface.h
src/uas/UASInterface.h
+25
-0
HSIDisplay.cc
src/ui/HSIDisplay.cc
+48
-1
HSIDisplay.h
src/ui/HSIDisplay.h
+77
-0
No files found.
src/uas/UASInterface.h
View file @
fc442534
...
@@ -475,6 +475,7 @@ signals:
...
@@ -475,6 +475,7 @@ signals:
void
imageDataReceived
(
int
imgid
,
const
unsigned
char
*
imageData
,
int
length
,
int
startIndex
);
void
imageDataReceived
(
int
imgid
,
const
unsigned
char
*
imageData
,
int
length
,
int
startIndex
);
/** @brief Emit the new system type */
/** @brief Emit the new system type */
void
systemTypeSet
(
UASInterface
*
uas
,
unsigned
int
type
);
void
systemTypeSet
(
UASInterface
*
uas
,
unsigned
int
type
);
/** @brief Attitude control enabled/disabled */
/** @brief Attitude control enabled/disabled */
void
attitudeControlEnabled
(
bool
enabled
);
void
attitudeControlEnabled
(
bool
enabled
);
/** @brief Position 2D control enabled/disabled */
/** @brief Position 2D control enabled/disabled */
...
@@ -483,6 +484,30 @@ signals:
...
@@ -483,6 +484,30 @@ signals:
void
positionZControlEnabled
(
bool
enabled
);
void
positionZControlEnabled
(
bool
enabled
);
/** @brief Heading control enabled/disabled */
/** @brief Heading control enabled/disabled */
void
positionYawControlEnabled
(
bool
enabled
);
void
positionYawControlEnabled
(
bool
enabled
);
/** @brief Optical flow status changed */
void
opticalFlowStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Vision based localization status changed */
void
visionLocalizationStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Infrared / Ultrasound status changed */
void
distanceSensorStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Gyroscope status changed */
void
gyroStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Accelerometer status changed */
void
accelStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Magnetometer status changed */
void
magSensorStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Barometer status changed */
void
baroStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Differential pressure / airspeed status changed */
void
airspeedStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Actuator status changed */
void
actuatorStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Laser scanner status changed */
void
laserStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Vicon / Leica Geotracker status changed */
void
groundTruthSensorStatusChanged
(
bool
supported
,
bool
enabled
,
bool
ok
);
/** @brief Value of a remote control channel (raw) */
/** @brief Value of a remote control channel (raw) */
void
remoteControlChannelRawChanged
(
int
channelId
,
float
raw
);
void
remoteControlChannelRawChanged
(
int
channelId
,
float
raw
);
/** @brief Value of a remote control channel (scaled)*/
/** @brief Value of a remote control channel (scaled)*/
...
...
src/ui/HSIDisplay.cc
View file @
fc442534
...
@@ -123,7 +123,34 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
...
@@ -123,7 +123,34 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
userSetPointSet
(
false
),
userSetPointSet
(
false
),
userXYSetPointSet
(
false
),
userXYSetPointSet
(
false
),
userZSetPointSet
(
false
),
userZSetPointSet
(
false
),
userYawSetPointSet
(
false
)
userYawSetPointSet
(
false
),
gyroKnown
(
false
),
gyroON
(
false
),
gyroOK
(
false
),
accelKnown
(
false
),
accelON
(
false
),
accelOK
(
false
),
magKnown
(
false
),
magON
(
false
),
magOK
(
false
),
pressureKnown
(
false
),
pressureON
(
false
),
pressureOK
(
false
),
diffPressureKnown
(
false
),
diffPressureON
(
false
),
diffPressureOK
(
false
),
flowKnown
(
false
),
flowON
(
false
),
flowOK
(
false
),
laserKnown
(
false
),
laserON
(
false
),
laserOK
(
false
),
viconKnown
(
false
),
viconON
(
false
),
viconOK
(
false
),
actuatorsKnown
(
false
),
actuatorsON
(
false
),
actuatorsOK
(
false
)
{
{
refreshTimer
->
setInterval
(
updateInterval
);
refreshTimer
->
setInterval
(
updateInterval
);
...
@@ -845,6 +872,16 @@ void HSIDisplay::setActiveUAS(UASInterface* uas)
...
@@ -845,6 +872,16 @@ void HSIDisplay::setActiveUAS(UASInterface* uas)
disconnect
(
this
->
uas
,
SIGNAL
(
gpsLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateGpsLocalization
(
UASInterface
*
,
int
)));
disconnect
(
this
->
uas
,
SIGNAL
(
gpsLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateGpsLocalization
(
UASInterface
*
,
int
)));
disconnect
(
this
->
uas
,
SIGNAL
(
irUltraSoundLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateInfraredUltrasoundLocalization
(
UASInterface
*
,
int
)));
disconnect
(
this
->
uas
,
SIGNAL
(
irUltraSoundLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateInfraredUltrasoundLocalization
(
UASInterface
*
,
int
)));
disconnect
(
this
->
uas
,
SIGNAL
(
objectDetected
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)),
this
,
SLOT
(
updateObjectPosition
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)));
disconnect
(
this
->
uas
,
SIGNAL
(
objectDetected
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)),
this
,
SLOT
(
updateObjectPosition
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)));
disconnect
(
this
->
uas
,
SIGNAL
(
gyroStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateGyroStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
accelStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateAccelStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
magSensorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateMagSensorStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
baroStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateBaroStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
airspeedStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateAirspeedStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
opticalFlowStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateOpticalFlowStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
laserStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateLaserStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
groundTruthSensorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateGroundTruthSensorStatus
(
bool
,
bool
,
bool
)));
disconnect
(
this
->
uas
,
SIGNAL
(
actuatorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateActuatorStatus
(
bool
,
bool
,
bool
)));
}
}
connect
(
uas
,
SIGNAL
(
gpsSatelliteStatusChanged
(
int
,
int
,
float
,
float
,
float
,
bool
)),
this
,
SLOT
(
updateSatellite
(
int
,
int
,
float
,
float
,
float
,
bool
)));
connect
(
uas
,
SIGNAL
(
gpsSatelliteStatusChanged
(
int
,
int
,
float
,
float
,
float
,
bool
)),
this
,
SLOT
(
updateSatellite
(
int
,
int
,
float
,
float
,
float
,
bool
)));
...
@@ -867,6 +904,16 @@ void HSIDisplay::setActiveUAS(UASInterface* uas)
...
@@ -867,6 +904,16 @@ void HSIDisplay::setActiveUAS(UASInterface* uas)
connect
(
uas
,
SIGNAL
(
irUltraSoundLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateInfraredUltrasoundLocalization
(
UASInterface
*
,
int
)));
connect
(
uas
,
SIGNAL
(
irUltraSoundLocalizationChanged
(
UASInterface
*
,
int
)),
this
,
SLOT
(
updateInfraredUltrasoundLocalization
(
UASInterface
*
,
int
)));
connect
(
uas
,
SIGNAL
(
objectDetected
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)),
this
,
SLOT
(
updateObjectPosition
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)));
connect
(
uas
,
SIGNAL
(
objectDetected
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)),
this
,
SLOT
(
updateObjectPosition
(
uint
,
int
,
int
,
QString
,
int
,
float
,
float
)));
connect
(
uas
,
SIGNAL
(
gyroStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateGyroStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
accelStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateAccelStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
magSensorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateMagSensorStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
baroStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateBaroStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
airspeedStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateAirspeedStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
opticalFlowStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateOpticalFlowStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
laserStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateLaserStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
groundTruthSensorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateGroundTruthSensorStatus
(
bool
,
bool
,
bool
)));
connect
(
uas
,
SIGNAL
(
actuatorStatusChanged
(
bool
,
bool
,
bool
)),
this
,
SLOT
(
updateActuatorStatus
(
bool
,
bool
,
bool
)));
this
->
uas
=
uas
;
this
->
uas
=
uas
;
resetMAVState
();
resetMAVState
();
...
...
src/ui/HSIDisplay.h
View file @
fc442534
...
@@ -66,6 +66,83 @@ public slots:
...
@@ -66,6 +66,83 @@ public slots:
void
updateAttitudeControllerEnabled
(
bool
enabled
);
void
updateAttitudeControllerEnabled
(
bool
enabled
);
void
updatePositionXYControllerEnabled
(
bool
enabled
);
void
updatePositionXYControllerEnabled
(
bool
enabled
);
void
updatePositionZControllerEnabled
(
bool
enabled
);
void
updatePositionZControllerEnabled
(
bool
enabled
);
/** @brief Optical flow status changed */
void
updateOpticalFlowStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
if
(
supported
&&
enabled
&&
ok
)
{
visionFix
=
true
;
}
else
{
visionFix
=
false
;
}
}
/** @brief Vision based localization status changed */
void
updateVisionLocalizationStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
if
(
enabled
&&
ok
)
{
visionFix
=
true
;
}
else
{
visionFix
=
false
;
}
visionFixKnown
=
supported
;
}
/** @brief Infrared / Ultrasound status changed */
void
updateDistanceSensorStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
if
(
enabled
&&
ok
)
{
iruFix
=
true
;
}
else
{
iruFix
=
false
;
}
iruFixKnown
=
supported
;
}
/** @brief Gyroscope status changed */
void
updateGyroStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
gyroKnown
=
supported
;
gyroON
=
enabled
;
gyroOK
=
ok
;
}
/** @brief Accelerometer status changed */
void
updateAccelStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
accelKnown
=
supported
;
accelON
=
enabled
;
accelOK
=
ok
;
}
/** @brief Magnetometer status changed */
void
updateMagSensorStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
magKnown
=
supported
;
magON
=
enabled
;
magOK
=
ok
;
}
/** @brief Barometer status changed */
void
updateBaroStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
pressureKnown
=
supported
;
pressureON
=
enabled
;
pressureOK
=
ok
;
}
/** @brief Differential pressure / airspeed status changed */
void
updateAirspeedStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
diffPressureKnown
=
supported
;
diffPressureON
=
enabled
;
diffPressureOK
=
ok
;
}
/** @brief Actuator status changed */
void
updateActuatorStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
actuatorsKnown
=
supported
;
actuatorsON
=
enabled
;
actuatorsOK
=
ok
;
}
/** @brief Laser scanner status changed */
void
updateLaserStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
laserKnown
=
supported
;
laserON
=
enabled
;
laserOK
=
ok
;
}
/** @brief Vicon / Leica Geotracker status changed */
void
updateGroundTruthSensorStatus
(
bool
supported
,
bool
enabled
,
bool
ok
)
{
viconKnown
=
supported
;
viconON
=
enabled
;
viconOK
=
ok
;
}
void
updateObjectPosition
(
unsigned
int
time
,
int
id
,
int
type
,
const
QString
&
name
,
int
quality
,
float
bearing
,
float
distance
);
void
updateObjectPosition
(
unsigned
int
time
,
int
id
,
int
type
,
const
QString
&
name
,
int
quality
,
float
bearing
,
float
distance
);
/** @brief Heading control enabled/disabled */
/** @brief Heading control enabled/disabled */
void
updatePositionYawControllerEnabled
(
bool
enabled
);
void
updatePositionYawControllerEnabled
(
bool
enabled
);
...
...
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