Added initial actuation support

This commit is contained in:
Pascal Serrarens 2024-01-08 14:23:59 +01:00
parent b954e2a302
commit 5ecbbaf463
2 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,8 @@ Roboid::Roboid(Perception *perception, Propulsion *propulsion) {
propulsion->roboid = this;
}
Roboid::Roboid(ServoMotor **actuation) : actuation(actuation) {}
void Roboid::Update(float currentTimeMs) {
if (perception != nullptr)
perception->Update(currentTimeMs);

View File

@ -2,7 +2,7 @@
#include "Perception.h"
#include "Propulsion.h"
#include "Servo.h"
#include "ServoMotor.h"
namespace Passer {
namespace RoboidControl {
@ -19,7 +19,9 @@ public:
/// @param propulsion The Propulsion implementation to use for this Roboid
Roboid(Perception *perception, Propulsion *propulsion = nullptr);
Roboid(Perception *perception, Servo **actuation);
Roboid(Perception *perception, ServoMotor **actuation);
Roboid(ServoMotor **actuation);
/// @brief Update the state of the Roboid
/// @param currentTimeMs The time in milliseconds when calling this
@ -30,6 +32,7 @@ public:
Perception *perception = nullptr;
/// @brief The Propulsion module of this Roboid
Propulsion *propulsion = nullptr;
ServoMotor **actuation = nullptr;
/// @brief The reference to the module to synchronize states across a network
NetworkSync *networkSync = nullptr;