Added config macro UAVCAN_TOSTRING

This commit is contained in:
Pavel Kirienko
2014-04-10 13:32:35 +04:00
parent 29138214dc
commit d0b541e22d
20 changed files with 62 additions and 21 deletions
+2 -1
View File
@@ -3,7 +3,6 @@
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#include <cstdio>
#include <cassert>
#include <uavcan/driver/can.hpp>
@@ -57,6 +56,7 @@ bool CanFrame::priorityHigherThan(const CanFrame& rhs) const
return clean_id < rhs_clean_id;
}
#if UAVCAN_TOSTRING
std::string CanFrame::toString(StringRepresentation mode) const
{
using namespace std; // For snprintf()
@@ -115,5 +115,6 @@ std::string CanFrame::toString(StringRepresentation mode) const
}
return std::string(buf);
}
#endif
}