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

Remove the serial port factory and throw errors on invalid arguments #822

Merged
merged 1 commit into from
May 26, 2016

Conversation

reconbot
Copy link
Member

@reconbot reconbot commented May 24, 2016

  • Constructor now throws errors when given invalid options
  • The Constructor’s callback is given to .open() if openImmediately is set
  • Depreciation warning when using the old style SerialPort.SerialPort

Closes #820

@@ -49,7 +49,7 @@ var openOptions = {
stopBits: args.stopbits
};

var port = new serialport.SerialPort(args.port, openOptions);
var port = new Serialport(args.port, openOptions);
Copy link

Choose a reason for hiding this comment

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

Just to mention, you might want to hunt for Serialport -> SerialPort for consistency

 - Constructor now throws errors when given invalid options
 - The Constructor’s callback is given to `.open()` if `openImmediately` is set
 - Depreciation warning when using the old style SerialPort.SerialPort
@reconbot
Copy link
Member Author

@gnarf thanks for the clever one time depreciation warning!

@reconbot reconbot merged commit 9a98ede into master May 26, 2016
@reconbot reconbot deleted the throw-errs branch May 26, 2016 15:41
reconbot added a commit that referenced this pull request Jul 24, 2018
…822)

 - Constructor now throws errors when given invalid options
 - The Constructor’s callback is given to `.open()` if `openImmediately` is set
 - Depreciation warning when using the old style SerialPort.SerialPort
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants