Commit 418c6ac5 authored by William Woodall's avatar William Woodall
Browse files

Cleaned up test program a bit.

parent fc4364f7
......@@ -5,23 +5,6 @@
Serial *serial;
std::string toHex(std::string input) {
std::stringstream ss;
for(unsigned int i = 0; i != input.length(); i++) {
char temp[4];
sprintf(temp, "%.2X", input[i]);
ss << " ";
if(input[i] == 0x0A)
ss << "LF";
else if(input[i] == 0x0D)
ss << "NL";
else
ss << input[i];
ss << " " << std::hex << temp;
}
return ss.str();
};
int main(int argc, char **argv)
{
std::string port("/dev/tty.usbserial-A900cfJA");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment