Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti and ahcorde committed May 10, 2024
1 parent a1a384a commit 96b602a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/gui/plugins/modules/EntityContextMenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#include "EntityContextMenu.hh"

#include <gz/msgs/boolean.pb.h>
#include <gz/msgs/stringmsg.pb.h>
#include <gz/msgs/cameratrack.pb.h>
#include <gz/msgs/stringmsg.pb.h>
#include <gz/msgs/entity.pb.h>

#include <iostream>
#include <string>
#include <mutex>
#include <string>

#include <gz/common/Console.hh>
#include <gz/sim/Conversions.hh>
Expand Down Expand Up @@ -86,7 +86,7 @@ namespace gz::sim
/// \brief Name of world.
public: std::string worldName;

/// \brief storing last follow target for look at.
/// \brief Storing last follow target for look at.
public: std::string followTargetLookAt;

/// \brief Flag used to disable look at when not following target.
Expand All @@ -108,7 +108,6 @@ void EntityContextMenu::OnCurrentlyTrackedSub(const msgs::CameraTrack &_msg)
_msg.track_mode() == gz::msgs::CameraTrack::FOLLOW_LOOK_AT ||
_msg.track_mode() == gz::msgs::CameraTrack::FOLLOW_FREE_LOOK)
{
// gzmsg << "Currently following a target: Look At enabled."<< std::endl;
this->dataPtr->followingTarget = true;
this->FollowingTargetChanged();
}
Expand Down Expand Up @@ -177,14 +176,13 @@ EntityContextMenu::EntityContextMenu()

this->dataPtr->trackPub =
this->dataPtr->node.Advertise<msgs::CameraTrack>(this->dataPtr->trackTopic);

}

/////////////////////////////////////////////////
EntityContextMenu::~EntityContextMenu() = default;

/////////////////////////////////////////////////
void EntityContextMenu::SetFollowingTarget(const bool &_followingTarget)
void EntityContextMenu::SetFollowingTarget(bool &_followingTarget)
{
this->dataPtr->followingTarget = _followingTarget;
this->FollowingTargetChanged();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/plugins/modules/EntityContextMenu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace sim
signals: void FollowingTargetChanged();

/// \brief Callback function to get data from the message
/// \param[in]_msg CameraTrack message
/// \param[in] _msg CameraTrack message
public: void OnCurrentlyTrackedSub(const msgs::CameraTrack &_msg);

/// \brief Callback when a context menu item is invoked
Expand Down

0 comments on commit 96b602a

Please sign in to comment.