Skip to content

Commit

Permalink
Check return value of vimba startup
Browse files Browse the repository at this point in the history
  • Loading branch information
icolwell-as committed Nov 22, 2021
1 parent ac04eb2 commit 1c1260f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ namespace trigger
{

Trigger::Trigger() : vimba_system_(AVT::VmbAPI::VimbaSystem::GetInstance()), pnh_("~")
{
vimba_system_.Startup();
}
{}

Trigger::~Trigger()
{
Expand All @@ -15,6 +13,14 @@ Trigger::~Trigger()

void Trigger::Init()
{
VmbErrorType return_value = vimba_system_.Startup();

if (return_value != VmbErrorSuccess)
{
ROS_ERROR_STREAM("Failed to start Vimba system, vimba error code: " << return_value);
ros::shutdown();
}

LoadParams();
InitializeAddress();

Expand Down

0 comments on commit 1c1260f

Please sign in to comment.