Permalink
Browse files

Made AR.Drone code less verbose by default

  • Loading branch information...
1 parent b875825 commit 533b2de9f3504621ba3a9b0775fdaf530b59f3a1 @bmcdorman bmcdorman committed Mar 19, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/ardrone.cpp
View
@@ -593,7 +593,9 @@ bool DroneController::fetchNavdata()
return false;
}
if(readLength < 0) return true;
+#ifdef ARDRONE_DEBUG
std::cout << "Read " << readLength << " bytes from navdata stream" << std::endl;
+#endif
memcpy(m_navdata, data, sizeof(m_navdata));
return true;
}
@@ -678,7 +680,9 @@ bool DroneController::sendCurrentCommand()
char realCommand[ARDRONE_MAX_CMD_LENGTH];
sprintf(realCommand, m_commandStack.top().data, m_seq.next());
+#ifdef ARDRONE_DEBUG
std::cout << "Sending " << realCommand << std::endl;
+#endif
if(m_atSocket.sendto(realCommand, strlen(realCommand), m_atAddress) < 0) {
perror("DroneController::run -> sendto");

0 comments on commit 533b2de

Please sign in to comment.