Release thing method added
This commit is contained in:
parent
f77b00f639
commit
9b6bce5155
@ -31,7 +31,7 @@ Roboid::Roboid(Propulsion *propulsion) : Roboid() {
|
||||
propulsion->roboid = this;
|
||||
}
|
||||
|
||||
void Passer::RoboidControl::Roboid::SetName(char *name) { this->name = name; }
|
||||
void Roboid::SetName(const char *name) { this->name = name; }
|
||||
|
||||
#include <Arduino.h>
|
||||
void Roboid::Update(unsigned long currentTimeMs) {
|
||||
@ -119,3 +119,9 @@ void Roboid::AddChild(Thing *child) {
|
||||
this->perception->AddSensor(childSensor);
|
||||
}
|
||||
}
|
||||
|
||||
void Passer::RoboidControl::Roboid::Release(Thing *child) {
|
||||
if (RemoveChild(child) != nullptr)
|
||||
this->perception->AddTrackedObject(nullptr, Spherical16::zero,
|
||||
SwingTwist16::identity, child->type);
|
||||
}
|
||||
|
5
Roboid.h
5
Roboid.h
@ -20,8 +20,8 @@ public:
|
||||
/// @param propulsion The Propulsion implementation to use for this Roboid
|
||||
Roboid(Propulsion *propulsion);
|
||||
|
||||
char *name = nullptr;
|
||||
void SetName(char *name);
|
||||
const char *name = nullptr;
|
||||
void SetName(const char *name);
|
||||
|
||||
/// @brief Update the state of the Roboid
|
||||
/// @param currentTimeMs The time in milliseconds when calling this
|
||||
@ -67,6 +67,7 @@ public:
|
||||
virtual void SetOrientation(SwingTwist16 worldOrientation);
|
||||
|
||||
virtual void AddChild(Thing *child) override;
|
||||
void Release(Thing *child);
|
||||
|
||||
private:
|
||||
/// @brief The position of the roboid in carthesian coordinates in world space
|
||||
|
Loading…
x
Reference in New Issue
Block a user