-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smoother serial #124
base: main
Are you sure you want to change the base?
Smoother serial #124
Conversation
@@ -1,7 +1,7 @@ | |||
cmake_minimum_required(VERSION 2.8.3) | |||
project(rosflight) | |||
|
|||
set(CMAKE_BUILD_TYPE Release) | |||
set(CMAKE_BUILD_TYPE Debug) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you just remove this line?
@@ -84,25 +85,67 @@ rosflightIO::rosflightIO() | |||
std::string port = nh_private.param<std::string>("port", "/dev/ttyACM0"); | |||
int baud_rate = nh_private.param<int>("baud_rate", 921600); | |||
|
|||
wait_for_serial_ = nh_private.param<bool>("wait_for_serial", false); | |||
serial_retry_delay_s_ = nh_private.param<float>("serial_check_period", 1.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems long. (I assume that this is designed for hardfault recovery.) How small can we make this?
This is something that we've actually talked about improving, funny that work on it already exists. We should definitely finish this up. |
Improves performance with serial connections:
~wait_for_serial
and~serial_check_period
. If~wait_for_serial
is set to true, and the serial port is not available when the node comes up, it will wait~serial_check_period
seconds and then try again, until the node is killed or connects.