Skip to content

Commit

Permalink
set receiving port on host machine to 43210
Browse files Browse the repository at this point in the history
  • Loading branch information
adynathos committed Nov 18, 2016
1 parent 5228e9b commit 0464832
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bebop_driver/src/bebop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,21 @@ void Bebop::Connect(ros::NodeHandle& nh, ros::NodeHandle& priv_nh, const std::st
error_discovery = ARDISCOVERY_Device_InitWifi(device_ptr_,
ARDISCOVERY_PRODUCT_ARDRONE, "Bebop",
bebop_ip_.c_str(), 44444);

if (error_discovery != ARDISCOVERY_OK)
{
throw std::runtime_error("Discovery failed: " + std::string(ARDISCOVERY_Error_ToString(error_discovery)));
}

error_discovery = ARDISCOVERY_Device_WifiSetDeviceToControllerPort(device_ptr_, 43210);
if (error_discovery == ARDISCOVERY_OK)
{
ARSAL_PRINT(ARSAL_PRINT_WARNING, LOG_TAG, "Set receiving port on host machine to 43210");
}
else
{
throw std::runtime_error("ARDISCOVERY_Device_WifiSetDeviceToControllerPort failed: " + std::string(ARDISCOVERY_Error_ToString(error_discovery)));
}

device_controller_ptr_ = ARCONTROLLER_Device_New(device_ptr_, &error_);
ThrowOnCtrlError(error_, "Creation of device controller failed: ");

Expand Down

0 comments on commit 0464832

Please sign in to comment.