Skip to content

Commit

Permalink
Flush input buffer t oget rid of leading zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
gabekole committed Sep 28, 2024
1 parent b53c99d commit f0fbebe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hardware/RF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>

#include <termios.h>

#include "RF.hpp"

Expand Down Expand Up @@ -150,6 +150,8 @@ RF::Command RF::GetCommand() // Will check for commands and return the received

std::string input_line(buffer);


tcflush(SerialFd, TCIFLUSH);

std::cout << "String:" << input_line << "\n" << std::flush;

Expand Down

0 comments on commit f0fbebe

Please sign in to comment.