diff --git a/Roboid.cpp b/Roboid.cpp index cf5526a..ace1ed7 100644 --- a/Roboid.cpp +++ b/Roboid.cpp @@ -1,9 +1,12 @@ #include "Roboid.h" +#include "RoboidWiFi.h" + Roboid::Roboid() {} Roboid::Roboid(Perception *perception, Propulsion *propulsion) { this->perception = perception; + perception->roboid = this; this->propulsion = propulsion; propulsion->roboid = this; } @@ -11,4 +14,6 @@ Roboid::Roboid(Perception *perception, Propulsion *propulsion) { void Roboid::Update(float currentTimeMs) { if (perception != nullptr) perception->Update(currentTimeMs); + if (networkSync != nullptr) + networkSync->NetworkUpdate(this); } \ No newline at end of file diff --git a/Roboid.h b/Roboid.h index 2ad3d8f..99eef4e 100644 --- a/Roboid.h +++ b/Roboid.h @@ -6,6 +6,8 @@ namespace Passer { namespace RoboidControl { +class RoboidWiFi; + /// @brief A Roboid is used to control autonomous robots class Roboid { public: @@ -25,7 +27,10 @@ public: Perception *perception; /// @brief The Propulsion module of this Roboid Propulsion *propulsion; + + RoboidWiFi *networkSync = nullptr; }; + } // namespace RoboidControl } // namespace Passer