Fixed force sending posmsg

This commit is contained in:
Pascal Serrarens 2025-06-18 14:00:39 +02:00
parent 6532d656de
commit e5916466a6

View File

@ -8,11 +8,11 @@ PoseMsg::PoseMsg(unsigned char networkId, Thing* thing, bool force) {
this->thingId = thing->id; this->thingId = thing->id;
this->poseType = 0; this->poseType = 0;
if (thing->positionUpdated || (force && thing->IsRoot())) { if (thing->positionUpdated || (force || thing->IsRoot())) {
this->position = thing->GetPosition(); this->position = thing->GetPosition();
this->poseType |= Pose_Position; this->poseType |= Pose_Position;
} }
if (thing->orientationUpdated || (force && thing->IsRoot())) { if (thing->orientationUpdated || (force || thing->IsRoot())) {
this->orientation = thing->GetOrientation(); this->orientation = thing->GetOrientation();
this->poseType |= Pose_Orientation; this->poseType |= Pose_Orientation;
} }