diff --git a/app/raspberry_pi/src/car/display/CarConsole.cxx b/app/raspberry_pi/src/car/display/CarConsole.cxx index 21639dfb..8dd648ae 100644 --- a/app/raspberry_pi/src/car/display/CarConsole.cxx +++ b/app/raspberry_pi/src/car/display/CarConsole.cxx @@ -1,5 +1,5 @@ -#ifndef CARCONSOLE_H -#define CARCONSOLE_H +#ifndef CARCONSOLE_CXX +#define CARCONSOLE_CXX #pragma once @@ -15,9 +15,8 @@ using namespace car::system; using namespace ftxui; -auto button_style = ButtonOption::Animated(); - namespace car::display { + static auto button_style = ButtonOption::Animated(); class CarConsole { public: diff --git a/app/raspberry_pi/src/car/system/CarSystem.cpp b/app/raspberry_pi/src/car/system/CarSystem.cpp index d1c6a20e..e41a1f40 100644 --- a/app/raspberry_pi/src/car/system/CarSystem.cpp +++ b/app/raspberry_pi/src/car/system/CarSystem.cpp @@ -63,6 +63,7 @@ namespace car::system { void CarSystem::move(const MoveCommand& move_command) { + this->movement_system->move(move_command); } void CarSystem::turn(const TurnCommand& turn_command) diff --git a/app/raspberry_pi/src/car/system/lidar/LidarScanner.cxx b/app/raspberry_pi/src/car/system/lidar/LidarScanner.cxx index 75016d25..ba289b56 100644 --- a/app/raspberry_pi/src/car/system/lidar/LidarScanner.cxx +++ b/app/raspberry_pi/src/car/system/lidar/LidarScanner.cxx @@ -17,7 +17,7 @@ namespace car::system::lidar class LidarScanner : public LidarDevice { public: - LidarScanner(const std::string &lidar_port, const bool &enabled) : lidar(RPLidar::create(lidar_port).value()), enabled(enabled) + LidarScanner(const std::string &lidar_port) : lidar(RPLidar::create(lidar_port).value()) { }; diff --git a/app/raspberry_pi/src/car/system/movement/MovementSystem.cxx b/app/raspberry_pi/src/car/system/movement/MovementSystem.cxx index 85460cf1..a550f474 100644 --- a/app/raspberry_pi/src/car/system/movement/MovementSystem.cxx +++ b/app/raspberry_pi/src/car/system/movement/MovementSystem.cxx @@ -41,6 +41,14 @@ namespace car::system::movement { void terminate() { } + void move(const MoveCommand& move_command) { + + } + + void turn(const TurnCommand& turn_command) { + + } + ~MovementSystem() { }; diff --git a/app/raspberry_pi/src/car/system/movement/wheels/RearWheel.cxx b/app/raspberry_pi/src/car/system/movement/wheels/RearWheel.cxx index d9713e73..8b587e95 100644 --- a/app/raspberry_pi/src/car/system/movement/wheels/RearWheel.cxx +++ b/app/raspberry_pi/src/car/system/movement/wheels/RearWheel.cxx @@ -19,9 +19,9 @@ namespace car::system::movement::wheels static constexpr int PWM_A = 4; static constexpr int PWM_B = 5; public: - RearWheel(std::shared_ptr pwm, std::unique_ptr motor) : + RearWheel(std::shared_ptr pwm, std::unique_ptr motor) : pwm(pwm), - motor(motor) + motor(std::move(motor)) { this->forward_A = true; diff --git a/app/raspberry_pi/src/main.cpp b/app/raspberry_pi/src/main.cpp index 37413d83..56fc1b7c 100644 --- a/app/raspberry_pi/src/main.cpp +++ b/app/raspberry_pi/src/main.cpp @@ -3,7 +3,7 @@ #include -#include "global/Config.cxx" +#include "global/Config.hpp" #include "car/display/CarConsole.cxx"