Revision a8480867
ID | a84808670408804bf5ce08741a3b59130351928f |
Made a lot of changes to the general structure.
Applied object-orienting techniques to the code, cleaning it up considerably. Major design changes are as follows:
- All separate node code (ie motors) are meant to only interface with hardware - doing as little logic as possible.
- Instead, the logic is moved to a class (ie MotorControl) in libscout. PID and other tools should be located here. This significantly reduces dependencies.
- Files can be included cross-package by being placed in /include/packagename, but this should be avoided to reduce dependencies.
A few formatting changes:
- Comments should end with / always, not */
- Use @ instead of \
- No double newlines.
The motors node is revamped and pretty much correct at this point.
scout/libscout/CMakeLists.txt | ||
---|---|---|
29 | 29 |
#rosbuild_add_executable(example examples/example.cpp) |
30 | 30 |
#target_link_libraries(example ${PROJECT_NAME}) |
31 | 31 |
|
32 |
rosbuild_add_executable(libscout_node src/behavior.cpp src/libscout.cpp src/libmotors.cpp src/libheadlights.cpp src/libbuttons.cpp) |
|
32 |
#rosbuild_add_executable(libscout_node src/behavior.cpp src/libscout.cpp src/libmotors.cpp src/libheadlights.cpp src/libbuttons.cpp) |
|
33 |
rosbuild_add_executable(alex_behavior src/alex_behavior.cpp src/libscout.h src/MotorControl.cpp src/HeadlightControl.cpp) |
Also available in: Unified diff