Skip to content

Smoother serial - #124

Draft
BillThePlatypus wants to merge 6 commits into
mainfrom
smoother_serial
Draft

Smoother serial#124
BillThePlatypus wants to merge 6 commits into
mainfrom
smoother_serial

Conversation

@BillThePlatypus

Copy link
Copy Markdown
Contributor

Improves performance with serial connections:

  • Adds parameters ~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.
  • When the serial connection is lost, displays an error message so stating, and closes gracefully, instead of a thread error.
  • I'm considering adding the ability to automatically reconnect on a lost connection.

Comment thread rosflight/CMakeLists.txt
project(rosflight)

set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Debug)

Copy link
Copy Markdown
Contributor

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?

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);

Copy link
Copy Markdown
Contributor

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?

@bsutherland333

Copy link
Copy Markdown
Member

This is something that we've actually talked about improving, funny that work on it already exists. We should definitely finish this up.

@JMoore5353
JMoore5353 force-pushed the main branch 4 times, most recently from 66057f8 to 0faaba4 Compare December 13, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants