diff --git a/communication/communication.cpp b/communication/communication.cpp index c10f6c5..fecf9f8 100644 --- a/communication/communication.cpp +++ b/communication/communication.cpp @@ -75,15 +75,12 @@ bool Communication::getSettingsSync(std::vector& data, std::chrono::mil std::shared_ptr Communication::getSerialNumberSync(std::chrono::milliseconds timeout) { sendCommand(Command::RequestSerialNumber); std::shared_ptr msg = waitForMessageSync(std::make_shared(Command::RequestSerialNumber), timeout); - if(!msg) { - std::cout << "Didn't get a message in time" << std::endl; + if(!msg) // Did not receive a message return std::shared_ptr(); - } + auto m51 = std::dynamic_pointer_cast(msg); - if(!m51) { - std::cout << "msg could not be cast to main51 " << msg->network << std::endl; + if(!m51) // Could not upcast for some reason return std::shared_ptr(); - } return std::dynamic_pointer_cast(m51); } diff --git a/device/device.cpp b/device/device.cpp index ed99c52..e767302 100644 --- a/device/device.cpp +++ b/device/device.cpp @@ -138,9 +138,6 @@ bool Device::open() { return false; } - if(i != 0) - std::cout << "Took " << i << " tries to get the serial number" << std::endl; - std::string currentSerial = getNeoDevice().serial; if(currentSerial == SERIAL_FIND_ON_OPEN) { strncpy(getWritableNeoDevice().serial, serial->deviceSerial.c_str(), sizeof(getNeoDevice().serial));