mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 10:32:10 +08:00
TTYPigeon::send : delete unnecessary temporary variables (#19898)
Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 4ac08ce05ec645704befa84c7fb662f36f3ccdef
This commit is contained in:
@@ -181,10 +181,8 @@ void TTYPigeon::set_baud(int baud){
|
||||
}
|
||||
|
||||
void TTYPigeon::send(const std::string &s) {
|
||||
int len = s.length();
|
||||
const char * dat = s.data();
|
||||
int err = write(pigeon_tty_fd, s.data(), s.length());
|
||||
|
||||
int err = write(pigeon_tty_fd, dat, len);
|
||||
if(err < 0) { handle_tty_issue(err, __func__); }
|
||||
err = tcdrain(pigeon_tty_fd);
|
||||
if(err < 0) { handle_tty_issue(err, __func__); }
|
||||
|
||||
Reference in New Issue
Block a user