Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART_17-18
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bbartels
MicroCART_17-18
Commits
e8c6ac7c
Unverified
Commit
e8c6ac7c
authored
8 years ago
by
Jake Drahos
Browse files
Options
Downloads
Patches
Plain Diff
Added constructor for TrackerData
parent
763b4952
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
groundStation/Makefile
+1
-1
1 addition, 1 deletion
groundStation/Makefile
groundStation/src/vrpn_tracker.cpp
+9
-14
9 additions, 14 deletions
groundStation/src/vrpn_tracker.cpp
groundStation/src/vrpn_tracker.hpp
+3
-0
3 additions, 0 deletions
groundStation/src/vrpn_tracker.hpp
with
13 additions
and
15 deletions
groundStation/Makefile
+
1
−
1
View file @
e8c6ac7c
...
...
@@ -2,7 +2,7 @@
GCC
=
gcc
GXX
=
g++
CFLAGS
=
-Wall
-Wpedantic
-Wextra
-Werror
-std
=
c99
-g
-Wno-unused-parameter
-Wno-unused-variable
-Wno-unused-function
-Wno-unused-but-set-variable
CXXFLAGS
=
-Wall
-W
no-reorder
-std
=
c++0x
-g
CXXFLAGS
=
-Wall
-W
pedantic
-Wextra
-Werror
-Wno-reorder
-Wno-unused-variable
-std
=
c++0x
-g
INCLUDES
=
$(
foreach
dir
,
$(
INCDIR
)
,
-I
$(
dir
))
# Directories
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/vrpn_tracker.cpp
+
9
−
14
View file @
e8c6ac7c
...
...
@@ -9,6 +9,13 @@
namespace
microcart
{
static
void
VRPN_CALLBACK
vrpn_cb
(
void
*
param
,
const
vrpn_TRACKERCB
t
);
TrackerData
::
TrackerData
()
:
x
(
0.0
),
y
(
0.0
),
z
(
0.0
),
pitch
(
0.0
),
roll
(
0.0
),
yaw
(
0.0
),
fps
(
0.0
),
timestamp
()
{
}
Tracker
::
Tracker
(
std
::
string
server
)
:
Tracker
(
server
.
c_str
())
{
...
...
@@ -17,20 +24,7 @@ namespace microcart
Tracker
::
Tracker
(
const
char
*
server
)
:
remote
(
server
),
stop_flag
(
0
),
trackerData
({
.
x
=
0.0
,
.
y
=
0.0
,
.
z
=
0.0
,
.
pitch
=
0.0
,
.
roll
=
0.0
,
.
yaw
=
0.0
,
.
fps
=
0.0
,
.
timestamp
=
{
.
tv_sec
=
0
,
.
tv_usec
=
0
}
})
trackerData
()
{
remote
.
register_change_handler
(
this
,
vrpn_cb
);
...
...
@@ -123,6 +117,7 @@ extern "C"
try
{
auto
inst
=
new
struct
ucart_vrpn_tracker
;
inst
->
t
=
new
microcart
::
Tracker
(
server
);
return
inst
;
}
catch
(...)
{
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/vrpn_tracker.hpp
+
3
−
0
View file @
e8c6ac7c
...
...
@@ -54,6 +54,7 @@ extern "C"
namespace
microcart
{
struct
TrackerData
{
public:
double
x
;
double
y
;
double
z
;
...
...
@@ -64,6 +65,8 @@ namespace microcart
double
fps
;
timeval
timestamp
;
TrackerData
();
};
class
Tracker
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment