Skip to content

Conversation

@NestorDP
Copy link
Owner

Summary

  • implement new get function and its tests

Changes

  • API changes
  • Behavior changes
  • Docs updated
  • Tests added/updated

Details

  • Briefly list the key changes and files touched

How to test

  • Commands and steps to validate locally
  • Include any environment requirements (Linux only, kernel version, etc.)

Screenshots/Logs (optional)

  • Paste relevant output/logs if helpful

Checklist

  • Builds locally (Release + Debug)
  • All tests pass (if applicable)
  • Lint/format pass: make cppcheck / make cpplint / make uncrustify
  • Example(s) tested (if touched)
  • Documentation updated (README/docs)

Risks and rollbacks

  • Potential impact areas, and how to revert if needed

@NestorDP NestorDP requested a review from Copilot October 29, 2025 17:50
@NestorDP NestorDP self-assigned this Oct 29, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds getter methods for read timeout and minimum number of characters to read settings, refactors the timeout handling mechanism, and updates tests accordingly.

  • Adds getReadTimeout() and getMinNumberCharRead() methods to retrieve current serial port configuration
  • Removes redundant timeout_ member variable and modifies setTimeOut() to directly use the parameter value
  • Updates setReadTimeout() to call the internal setTimeOut() method for consistency
  • Comments out a previously failing test (SetTermios2WithFail) and adds two new tests for the getter methods

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
include/libserial/serial.hpp Adds public getter method declarations for read timeout and minimum character read settings; removes redundant timeout_ member variable documentation
src/serial.cpp Implements the new getter methods; refactors setTimeOut() to remove member variable assignment; updates setReadTimeout() to call setTimeOut()
test/test_serial_pty.cpp Comments out failing SetTermios2WithFail test; adds new tests for SetGetReadTimeout and SetGetMinNumberCharRead

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@NestorDP NestorDP merged commit 3287c61 into main Oct 29, 2025
5 checks passed
@NestorDP NestorDP deleted the feat-improve-tests branch October 29, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants