network sync integration
This commit is contained in:
parent
9a70b3d3d2
commit
e120cbe020
@ -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);
|
||||
}
|
5
Roboid.h
5
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user