Cleanup
This commit is contained in:
parent
c299bb0018
commit
bca786534d
@ -124,11 +124,12 @@ void NetworkPerception::ReceiveSphere(unsigned char *data, Roboid *roboid) {
|
||||
|
||||
roboid->perception->AddTrackedObject(this, position, Quaternion::identity,
|
||||
0x81, 0x81, networkId);
|
||||
roboid->networkSync->SendText("Received Sphere\n\0");
|
||||
if ((float)position.horizontalAngle == 0)
|
||||
roboid->networkSync->SendText("Zero hor angle\0");
|
||||
if ((float)position.verticalAngle == 0)
|
||||
roboid->networkSync->SendText("Zero vertical angle\0");
|
||||
// roboid->networkSync->SendText("Received Sphere\n\0");
|
||||
// roboid->networkSync->SendInt(position.distance * 100);
|
||||
// if ((float)position.horizontalAngle == 0)
|
||||
// roboid->networkSync->SendText("Zero hor angle\0");
|
||||
// if ((float)position.verticalAngle == 0)
|
||||
// roboid->networkSync->SendText("Zero vertical angle\0");
|
||||
}
|
||||
|
||||
void NetworkPerception::ReceivePoseMsg(unsigned char *data, Roboid *roboid) {
|
||||
|
@ -290,11 +290,11 @@ Perception::AddTrackedObject(Sensor *sensor, Spherical position,
|
||||
// Do we see the same object?
|
||||
else {
|
||||
if (thing->IsTheSameAs(this->trackedObjects[thingIx])) {
|
||||
if ((float)thing->position.horizontalAngle !=
|
||||
(float)this->trackedObjects[thingIx]->position.horizontalAngle)
|
||||
this->roboid->networkSync->SendText("Update\0");
|
||||
else
|
||||
this->roboid->networkSync->SendText("Refresh\0");
|
||||
// if ((float)thing->position.horizontalAngle !=
|
||||
// (float)this->trackedObjects[thingIx]->position.horizontalAngle)
|
||||
// this->roboid->networkSync->SendText("Update\0");
|
||||
// else
|
||||
// this->roboid->networkSync->SendText("Refresh\0");
|
||||
this->trackedObjects[thingIx]->Refresh(thing->position,
|
||||
thing->orientation);
|
||||
delete thing;
|
||||
|
@ -49,11 +49,10 @@ void Roboid::Update(unsigned long currentTimeMs) {
|
||||
Vector3::up));
|
||||
}
|
||||
|
||||
// if (actuation != nullptr)
|
||||
// actuation->Update(currentTimeMs);
|
||||
if (childCount > 0 && children != nullptr) {
|
||||
for (unsigned char childIx = 0; childIx < this->childCount; childIx++)
|
||||
for (unsigned char childIx = 0; childIx < this->childCount; childIx++) {
|
||||
children[childIx]->Update(currentTimeMs);
|
||||
}
|
||||
}
|
||||
|
||||
if (networkSync != nullptr)
|
||||
|
@ -43,7 +43,7 @@ void ServoMotor::SetTargetVelocity(float targetVelocity) {
|
||||
|
||||
float ServoMotor::GetTargetVelocity() { return this->targetVelocity; }
|
||||
|
||||
void ServoMotor::Update(float currentTimeMs) {
|
||||
void ServoMotor::Update(unsigned long currentTimeMs) {
|
||||
for (unsigned char childIx = 0; childIx < this->childCount; childIx++) {
|
||||
Thing *child = this->GetChild(childIx);
|
||||
if (child != nullptr && child->type == Thing::ServoType) {
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
virtual void SetTargetVelocity(float velocity);
|
||||
virtual float GetTargetVelocity();
|
||||
|
||||
virtual void Update(float currentTimeMs);
|
||||
virtual void Update(unsigned long currentTimeMs) override;
|
||||
|
||||
protected:
|
||||
bool hasTargetAngle = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user