Skip to content
Snippets Groups Projects
Commit 26226997 authored by Johann Mantel's avatar Johann Mantel
Browse files

check for proper name in ViewSelection::commitGazeTarget

parent c332f913
No related branches found
No related tags found
1 merge request!5Feature/call via memory
......@@ -65,6 +65,11 @@ namespace armarx::view_selection::client
"ViewSelection::connect() in onConnectComponent()?";
return;
}
if (target.name == "")
{
ARMARX_WARNING << "The target name is empty. Did you forget to initialize it?";
return;
}
gaze_targets::arondto::GazeTarget dto;
toAron(dto, target);
......
......@@ -26,7 +26,6 @@ namespace armarx::view_selection::gaze_targets
{
GazeTarget::GazeTarget()
{
creationTimestamp = core::time::DateTime::Now();
}
GazeTarget::GazeTarget(std::string name,
......
......@@ -32,8 +32,8 @@
namespace armarx::view_selection::gaze_targets
{
/**
* @brief Business Object (BO) class of GazeTarget.
*/
* @brief Business Object (BO) class of GazeTarget.
*/
class GazeTarget
{
public:
......@@ -42,7 +42,7 @@ namespace armarx::view_selection::gaze_targets
FramedPosition position;
// Scheduler values
TargetPriority priority = TargetPriority(AttentionType::RandomEvent, 0.0);
armarx::core::time::Duration duration;
armarx::core::time::Duration duration = armarx::Duration::MicroSeconds(0);
bool keepInQueue = false;
// Event logging
TargetStatus status = TargetStatus::Requested;
......@@ -59,6 +59,11 @@ namespace armarx::view_selection::gaze_targets
armarx::core::time::Duration duration,
const bool keepInQueue);
bool
isActive() const
{
return activationTimestamp.toMicroSecondsSinceEpoch() > 0;
}
bool
isReached() const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment