diff --git a/server_v2/CMakeLists.txt b/server_v2/CMakeLists.txt index 7246f94..3c4accc 100755 --- a/server_v2/CMakeLists.txt +++ b/server_v2/CMakeLists.txt @@ -19,7 +19,7 @@ if (UNIX AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL armv7l) set(CMAKE_CXX_FLAGS_RELEASE "-O3") find_package(pigpio REQUIRED) - set(LIBRARIES "pigpio" "spdlog::spdlog") + set(LIBRARIES "pigpio" "spdlog::spdlog" "systemd") set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-psabi") set(IS_RASPI true) diff --git a/server_v2/src/main.cpp b/server_v2/src/main.cpp index eb4c87b..0fe8bf9 100644 --- a/server_v2/src/main.cpp +++ b/server_v2/src/main.cpp @@ -11,6 +11,12 @@ #include "include/Encoders.hpp" #include "include/networkUtils.hpp" +#ifdef IS_RASPI + +#include + +#endif + using namespace std; int main(int argc, char *argv[]) { @@ -23,6 +29,10 @@ int main(int argc, char *argv[]) { TCPSocketServer tcpSocketServer; HealthChecker::getInstance(); +#ifdef IS_RASPI + sd_notify(0, "READY=1"); +#endif + // ClosedLoopMotorController::getInstance().set_speed(ROBOT_ODOMETRY_CONTROLLER_RIGHT_PORT, M_PI * ROBOT_ODOMETRY_CONTROLLER_RIGHT_MULT); // ClosedLoopMotorController::getInstance().set_speed(ROBOT_ODOMETRY_CONTROLLER_LEFT_PORT, M_PI_4 * ROBOT_ODOMETRY_CONTROLLER_LEFT_MULT); // OdometryController::getInstance().enable(); diff --git a/server_v2/test_bin/compsrv b/server_v2/test_bin/compsrv index 6ec1a70..fdd79c6 100755 Binary files a/server_v2/test_bin/compsrv and b/server_v2/test_bin/compsrv differ