Skip to content
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

Improvements and fixes in SerialPort #16

Merged
merged 2 commits into from
Jun 26, 2021

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented Jun 25, 2021

Description

  • Rework constructor.
  • Remove default values from backing fields as they are being initialized in the constructor anyway.
  • Reorganized fields.
  • SerialPort object is now added to controller in constructor and is not removed from there until it's disposed (the key is the portId which is set in the constructor and can't be changed).
  • Remove setter from PortName as we can't safely support changing UART "on the fly".
  • Add check to properties and calling native config only if port is opened.
  • Remove _hasBeenOpened and associated code.
  • Add missing extern to BytesToRead property.
  • Add debugger attributes to prevent inspection and change by debugger.
  • Bump assembly native version.

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (work on Unit Tests, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@josesimoes josesimoes requested a review from Ellerbach June 25, 2021 19:32
@nfbot nfbot added Type: bug Something isn't working Type: enhancement New feature or request Breaking-Change labels Jun 25, 2021
@josesimoes josesimoes force-pushed the improvements-serial-port branch 2 times, most recently from 269168f to e0a78c0 Compare June 25, 2021 20:08
- Rework constructor.
- Remove default values from backing fields as they are being initialized in the constructor anyway.
- Reorganized fields.
- SerialPort object is now added to controller in constructor and is not removed from there until it's disposed (the key is the portId which is set in the constructor and can't be changed).
- Remove setter from PortName as we can't safely support changing UART "on the fly".
- Add check to properties and calling native config only if port is opened.
- Remove _hasBeenOpened and associated code.
- Add missing extern to BytesToRead property.
- Add debugger attributes to prevent inspection and change by debugger.
- Bump assembly native version.
@josesimoes josesimoes force-pushed the improvements-serial-port branch from e0a78c0 to afc32c6 Compare June 25, 2021 20:17
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for the rework!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking-Change Type: bug Something isn't working Type: enhancement New feature or request
Projects
None yet
3 participants