Skip to content
Snippets Groups Projects
Commit 49447a16 authored by Fabian Paus's avatar Fabian Paus
Browse files

Merge branch 'master' of gitlab.com:ArmarX/RobotAPI

parents 511f5f99 5d1d9b99
No related branches found
No related tags found
No related merge requests found
......@@ -77,8 +77,19 @@ namespace armarx
std::vector<HandDevice> devices = _driver->scanForDevices(mode);
for (HandDevice& d : devices)
{
ARMARX_INFO << "Found device with MAC-Address: " << d.macAdress;
if (d.macAdress == macAddress)
if (mode == KITHandCommunicationDriver::ScanMode::Bluetooth)
{
ARMARX_INFO << "Found device with MAC-Address: " << d.macAdress;
}
else if (mode == KITHandCommunicationDriver::ScanMode::Serial)
{
ARMARX_INFO << "Found device at serial port: " << d.serialDeviceFile;
}
else
{
ARMARX_INFO << "Found hand"; //TODO
}
if (d.macAdress == macAddress || (mode == KITHandCommunicationDriver::ScanMode::Serial))
{
d.hardwareTarget = mode == KITHandCommunicationDriver::ScanMode::Bluetooth ? KITHand::HardwareTarget::Bluetooth : KITHand::HardwareTarget::Serial;
_driver->connect(d);
......@@ -101,7 +112,14 @@ namespace armarx
&& !found
&& std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now() - start).count() < getProperty<int>("ScanTimeout").getValue());
ARMARX_WARNING << "Could not find hand with the given MAC-Address: " << macAddress << " Shutting down this KITHandUnit.";
if (mode == KITHandCommunicationDriver::ScanMode::Bluetooth)
{
ARMARX_WARNING << "Could not find hand with the given MAC-Address: " << macAddress << " Shutting down this KITHandUnit.";
}
else
{
ARMARX_WARNING << "Could not find hand ove serial ports. Shutting down this KITHHandUnit";
}
getArmarXManager()->asyncShutdown();
}
......
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