From c66a3215e147fb7f4469ea00fd85cf7fa8711cd3 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 3 Jan 2024 11:16:12 +0100 Subject: [PATCH 1/5] Arduino IDE compatiblity --- Placement.h | 4 ++-- Propulsion.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Placement.h b/Placement.h index fd94ec8..8e53071 100644 --- a/Placement.h +++ b/Placement.h @@ -1,8 +1,8 @@ #pragma once #include "Thing.h" -#include "Vector2.h" -#include "Vector3.h" +#include "VectorAlgebra/include/Vector2.h" +#include "VectorAlgebra/include/Vector3.h" namespace Passer { namespace RoboidControl { diff --git a/Propulsion.h b/Propulsion.h index 588e42b..ea412fa 100644 --- a/Propulsion.h +++ b/Propulsion.h @@ -2,9 +2,9 @@ #include "Motor.h" #include "Placement.h" -#include "Polar.h" -#include "Quaternion.h" -#include "Vector2.h" +#include "VectorAlgebra/include/Polar.h" +#include "VectorAlgebra/include/Quaternion.h" +#include "VectorAlgebra/include/Vector2.h" namespace Passer { namespace RoboidControl { From 502121ba3b8697afe3586302b9d32ace43ce779b Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 3 Jan 2024 11:29:11 +0100 Subject: [PATCH 2/5] Arduino IDE compatibility --- DifferentialDrive.cpp | 2 +- Motor.h | 11 ++++++----- Perception.cpp | 2 +- Perception.h | 4 ++-- Propulsion.cpp | 2 +- Quadcopter.h | 2 +- TrackedObject.h | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/DifferentialDrive.cpp b/DifferentialDrive.cpp index 5dce7cf..242603f 100644 --- a/DifferentialDrive.cpp +++ b/DifferentialDrive.cpp @@ -1,5 +1,5 @@ #include "DifferentialDrive.h" -#include "FloatSingle.h" +#include "VectorAlgebra/include/FloatSingle.h" #include diff --git a/Motor.h b/Motor.h index 737e7ff..afe7d9f 100644 --- a/Motor.h +++ b/Motor.h @@ -1,15 +1,16 @@ #pragma once -#include #include "Thing.h" +#include + namespace Passer { namespace RoboidControl { /// @brief A Motor is a Thing which can move parts of the Roboid /// @note Currently only rotational motors are supported class Motor : public Thing { - public: +public: /// @brief Default constructor for the Motor Motor(); @@ -27,10 +28,10 @@ class Motor : public Thing { /// forward) virtual float GetSpeed(); - protected: +protected: float currentTargetSpeed = 0; }; -} // namespace RoboidControl -} // namespace Passer +} // namespace RoboidControl +} // namespace Passer using namespace Passer::RoboidControl; \ No newline at end of file diff --git a/Perception.cpp b/Perception.cpp index 15bbed9..f15b3c1 100644 --- a/Perception.cpp +++ b/Perception.cpp @@ -1,8 +1,8 @@ #include "Perception.h" -#include "Angle.h" #include "DistanceSensor.h" #include "NetworkSync.h" #include "Switch.h" +#include "VectorAlgebra/include/Angle.h" #include diff --git a/Perception.h b/Perception.h index d652872..db19fb3 100644 --- a/Perception.h +++ b/Perception.h @@ -1,10 +1,10 @@ #pragma once #include "Placement.h" -#include "Polar.h" -#include "Quaternion.h" #include "Sensor.h" #include "TrackedObject.h" +#include "VectorAlgebra/include/Polar.h" +#include "VectorAlgebra/include/Quaternion.h" namespace Passer { namespace RoboidControl { diff --git a/Propulsion.cpp b/Propulsion.cpp index 9b40f18..1b8a265 100644 --- a/Propulsion.cpp +++ b/Propulsion.cpp @@ -1,7 +1,7 @@ #include "Propulsion.h" #include "Roboid.h" -#include "FloatSingle.h" +#include "VectorAlgebra/include/FloatSingle.h" Propulsion::Propulsion() { this->placement = nullptr; diff --git a/Quadcopter.h b/Quadcopter.h index c82de96..40322a4 100644 --- a/Quadcopter.h +++ b/Quadcopter.h @@ -2,7 +2,7 @@ #include "Propulsion.h" #include "Thing.h" -#include "Vector3.h" +#include "VectorAlgebra/include/Vector3.h" namespace Passer { namespace RoboidControl { diff --git a/TrackedObject.h b/TrackedObject.h index 55be31f..f347b00 100644 --- a/TrackedObject.h +++ b/TrackedObject.h @@ -1,7 +1,7 @@ #pragma once -#include "Polar.h" #include "Sensor.h" +#include "VectorAlgebra/include/Polar.h" namespace Passer { namespace RoboidControl { From 000ca8d4e3f9cd38fa7eec62c7df3761aa245717 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 3 Jan 2024 11:31:58 +0100 Subject: [PATCH 3/5] Fixed wrong include --- Switch.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Switch.cpp b/Switch.cpp index 42d717d..c773cf6 100644 --- a/Switch.cpp +++ b/Switch.cpp @@ -1,7 +1,5 @@ -#include +#include "Switch.h" Switch::Switch() {} -bool Switch::IsOn() { - return false; -} +bool Switch::IsOn() { return false; } From ae327c8bacba5041eec53fb1a7920316cf619a5a Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 3 Jan 2024 11:50:40 +0100 Subject: [PATCH 4/5] compatiblity updates --- CMakeLists.txt | 6 +++--- DifferentialDrive.cpp | 2 +- Motor.cpp | 1 + Perception.cpp | 2 +- Perception.h | 4 ++-- Placement.h | 4 ++-- Propulsion.cpp | 2 +- Propulsion.h | 6 +++--- Quadcopter.h | 2 +- TrackedObject.h | 2 +- VectorAlgebra | 2 +- component.mk | 2 +- library.json | 2 +- 13 files changed, 19 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41f5e38..caca5cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.13) # CMake version check if(ESP_PLATFORM) set(sourcedirs . - VectorAlgebra/src + VectorAlgebra ) set(includedirs . - VectorAlgebra/include + VectorAlgebra ) idf_component_register( @@ -37,7 +37,7 @@ FetchContent_MakeAvailable(googletest) include_directories( . - VectorAlgebra/include + VectorAlgebra ) add_library(RoboidControl STATIC diff --git a/DifferentialDrive.cpp b/DifferentialDrive.cpp index 242603f..c7f9612 100644 --- a/DifferentialDrive.cpp +++ b/DifferentialDrive.cpp @@ -1,5 +1,5 @@ #include "DifferentialDrive.h" -#include "VectorAlgebra/include/FloatSingle.h" +#include "VectorAlgebra/FloatSingle.h" #include diff --git a/Motor.cpp b/Motor.cpp index c2a2185..05ad7f0 100644 --- a/Motor.cpp +++ b/Motor.cpp @@ -1,4 +1,5 @@ #include "Motor.h" + #include Motor::Motor() { diff --git a/Perception.cpp b/Perception.cpp index f15b3c1..ded98e0 100644 --- a/Perception.cpp +++ b/Perception.cpp @@ -2,7 +2,7 @@ #include "DistanceSensor.h" #include "NetworkSync.h" #include "Switch.h" -#include "VectorAlgebra/include/Angle.h" +#include "VectorAlgebra/Angle.h" #include diff --git a/Perception.h b/Perception.h index db19fb3..339431f 100644 --- a/Perception.h +++ b/Perception.h @@ -3,8 +3,8 @@ #include "Placement.h" #include "Sensor.h" #include "TrackedObject.h" -#include "VectorAlgebra/include/Polar.h" -#include "VectorAlgebra/include/Quaternion.h" +#include "VectorAlgebra/Polar.h" +#include "VectorAlgebra/Quaternion.h" namespace Passer { namespace RoboidControl { diff --git a/Placement.h b/Placement.h index 8e53071..ab94dfa 100644 --- a/Placement.h +++ b/Placement.h @@ -1,8 +1,8 @@ #pragma once #include "Thing.h" -#include "VectorAlgebra/include/Vector2.h" -#include "VectorAlgebra/include/Vector3.h" +#include "VectorAlgebra/Vector2.h" +#include "VectorAlgebra/Vector3.h" namespace Passer { namespace RoboidControl { diff --git a/Propulsion.cpp b/Propulsion.cpp index 1b8a265..7555c45 100644 --- a/Propulsion.cpp +++ b/Propulsion.cpp @@ -1,7 +1,7 @@ #include "Propulsion.h" #include "Roboid.h" -#include "VectorAlgebra/include/FloatSingle.h" +#include "VectorAlgebra/FloatSingle.h" Propulsion::Propulsion() { this->placement = nullptr; diff --git a/Propulsion.h b/Propulsion.h index ea412fa..954d9c7 100644 --- a/Propulsion.h +++ b/Propulsion.h @@ -2,9 +2,9 @@ #include "Motor.h" #include "Placement.h" -#include "VectorAlgebra/include/Polar.h" -#include "VectorAlgebra/include/Quaternion.h" -#include "VectorAlgebra/include/Vector2.h" +#include "VectorAlgebra/Polar.h" +#include "VectorAlgebra/Quaternion.h" +#include "VectorAlgebra/Vector2.h" namespace Passer { namespace RoboidControl { diff --git a/Quadcopter.h b/Quadcopter.h index 40322a4..5419c90 100644 --- a/Quadcopter.h +++ b/Quadcopter.h @@ -2,7 +2,7 @@ #include "Propulsion.h" #include "Thing.h" -#include "VectorAlgebra/include/Vector3.h" +#include "VectorAlgebra/Vector3.h" namespace Passer { namespace RoboidControl { diff --git a/TrackedObject.h b/TrackedObject.h index f347b00..06c2d1b 100644 --- a/TrackedObject.h +++ b/TrackedObject.h @@ -1,7 +1,7 @@ #pragma once #include "Sensor.h" -#include "VectorAlgebra/include/Polar.h" +#include "VectorAlgebra/Polar.h" namespace Passer { namespace RoboidControl { diff --git a/VectorAlgebra b/VectorAlgebra index 5b2d515..37d45cd 160000 --- a/VectorAlgebra +++ b/VectorAlgebra @@ -1 +1 @@ -Subproject commit 5b2d515cccd8d9b66ca85391a1a45a5bc2052fa7 +Subproject commit 37d45cdda59948e6d2bf11ffd6912ca9b3476c2e diff --git a/component.mk b/component.mk index f3b1528..a1c1162 100644 --- a/component.mk +++ b/component.mk @@ -1 +1 @@ -COMPONENT_ADD_INCLUDEDIRS = ./VectorAlgebra/include \ No newline at end of file +COMPONENT_ADD_INCLUDEDIRS = ./VectorAlgebra \ No newline at end of file diff --git a/library.json b/library.json index 8b014b3..4f93efb 100644 --- a/library.json +++ b/library.json @@ -5,7 +5,7 @@ "srcDir": ".", "flags": [ "-I .", - "-I ./VectorAlgebra/include" + "-I ./VectorAlgebra" ] } } \ No newline at end of file From c3cc48e72386b8f4e600369361a85b1948203dcd Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 3 Jan 2024 12:13:09 +0100 Subject: [PATCH 5/5] Updated to latest VectorAlgebra --- VectorAlgebra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectorAlgebra b/VectorAlgebra index 37d45cd..5a03d29 160000 --- a/VectorAlgebra +++ b/VectorAlgebra @@ -1 +1 @@ -Subproject commit 37d45cdda59948e6d2bf11ffd6912ca9b3476c2e +Subproject commit 5a03d296e5180236f12797f925a3e3711b5bb2d1