Remove some noisy debugging info

pull/4/head
Paul Hollinsky 2018-10-08 15:09:50 -04:00
parent 6ad4e564b9
commit 600813b7e6
2 changed files with 3 additions and 9 deletions

View File

@ -75,15 +75,12 @@ bool Communication::getSettingsSync(std::vector<uint8_t>& data, std::chrono::mil
std::shared_ptr<SerialNumberMessage> Communication::getSerialNumberSync(std::chrono::milliseconds timeout) {
sendCommand(Command::RequestSerialNumber);
std::shared_ptr<Message> msg = waitForMessageSync(std::make_shared<Main51MessageFilter>(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<SerialNumberMessage>();
}
auto m51 = std::dynamic_pointer_cast<Main51Message>(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<SerialNumberMessage>();
}
return std::dynamic_pointer_cast<SerialNumberMessage>(m51);
}

View File

@ -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));