Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hochautomatisiertes-Fahren
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Philipp Badenhoop
Hochautomatisiertes-Fahren
Commits
274353dd
Commit
274353dd
authored
7 years ago
by
Hoop77
Browse files
Options
Downloads
Patches
Plain Diff
PC programm sends command
parent
d088c920
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/catkin_ws/src/PC/CMakeLists.txt
+15
-1
15 additions, 1 deletion
modules/catkin_ws/src/PC/CMakeLists.txt
modules/catkin_ws/src/PC/src/main.cpp
+16
-0
16 additions, 0 deletions
modules/catkin_ws/src/PC/src/main.cpp
with
31 additions
and
1 deletion
modules/catkin_ws/src/PC/CMakeLists.txt
+
15
−
1
View file @
274353dd
cmake_minimum_required
(
VERSION 3.9
)
project
(
PC
)
set
(
CMAKE_CXX_FLAGS
"-pthread"
)
set
(
CMAKE_CXX_STANDARD 14
)
set
(
LOCAL_INSTALL_DIR
${
CMAKE_CURRENT_LIST_DIR
}
/../../install
)
set
(
CMAKE_PREFIX_PATH
"
${
LOCAL_INSTALL_DIR
}
"
)
find_package
(
Boost REQUIRED COMPONENTS regex system
)
find_package
(
NetworkingLib REQUIRED
)
find_package
(
PlatoonProtocolLib REQUIRED
)
find_package
(
PC2CarLib REQUIRED
)
set
(
SOURCE_FILES
src/main.cpp
...
...
@@ -12,4 +21,9 @@ set(SOURCE_FILES
add_executable
(
PC
${
SOURCE_FILES
}
)
target_link_libraries
(
PC
${
Boost_LIBRARIES
}
)
\ No newline at end of file
target_link_libraries
(
PC
${
Boost_LIBRARIES
}
)
target_include_directories
(
PC PUBLIC
${
PC2CarLib_INCLUDE_DIRS
}
)
target_link_libraries
(
PC NetworkingLib
)
target_link_libraries
(
PC PlatoonProtocolLib
)
target_link_libraries
(
PC PC2CarLib
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
modules/catkin_ws/src/PC/src/main.cpp
+
16
−
0
View file @
274353dd
#include
"../include/Logging.h"
#include
"PC2CarLib/CommandSender.h"
int
main
()
{
networking
::
Networking
net
;
pc
::
Logging
logging
{
10207
};
pc2car
::
CommandSender
commandSender
{
net
,
"127.0.0.1"
};
std
::
thread
commandThread
{
[
&
commandSender
]
{
float
speed
=
0.0
f
;
while
(
true
)
{
using
namespace
std
::
chrono_literals
;
commandSender
.
setPlatoonSpeed
(
speed
++
);
std
::
this_thread
::
sleep_for
(
1s
);
}
}};
logging
.
start
();
return
0
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
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