serialport
Advanced tools
Comparing version 6.0.5 to 6.1.0
@@ -0,1 +1,10 @@ | ||
<a name="6.1.0"></a> | ||
# 6.1.0 (2018-02-06) | ||
* chore(github): lock old issues and prs ([c8d2655](https://github.com/node-serialport/node-serialport/commit/c8d2655)) | ||
* chore(package): update eslint-plugin-node to version 6.0.0 (#1466) ([bac94a0](https://github.com/node-serialport/node-serialport/commit/bac94a0)), closes [#1466](https://github.com/node-serialport/node-serialport/issues/1466) | ||
* feat(linux): Custom baud rates for linux (eg 250k baudrate) (#1464) ([910438c](https://github.com/node-serialport/node-serialport/commit/910438c)), closes [#1464](https://github.com/node-serialport/node-serialport/issues/1464) | ||
<a name="6.0.5"></a> | ||
@@ -2,0 +11,0 @@ ## 6.0.5 (2018-02-04) |
@@ -191,2 +191,16 @@ 'use strict'; | ||
/** | ||
* Get the OS reported baud rate for the open port. | ||
* Used mostly for debugging custom baud rates. | ||
* @returns {Promise} Resolves with the current baud rate. | ||
* @throws {TypeError} When given invalid arguments, a `TypeError` is thrown. | ||
*/ | ||
getBaudRate() { | ||
debug('getBuadRate'); | ||
if (!this.isOpen) { | ||
return Promise.reject(new Error('Port is not open')); | ||
} | ||
return Promise.resolve(); | ||
} | ||
/** | ||
* Flush (discard) data received but not read, and written but not transmitted. | ||
@@ -193,0 +207,0 @@ * @returns {Promise} Resolves once the flush operation finishes. |
@@ -83,2 +83,7 @@ 'use strict'; | ||
getBaudRate() { | ||
return super.get() | ||
.then(() => promisify(binding.getBaudRate)(this.fd)); | ||
} | ||
drain() { | ||
@@ -85,0 +90,0 @@ return super.drain() |
@@ -84,2 +84,7 @@ 'use strict'; | ||
getBaudRate() { | ||
return super.getBaudRate() | ||
.then(() => promisify(binding.getBaudRate)(this.fd)); | ||
} | ||
drain() { | ||
@@ -86,0 +91,0 @@ return super.drain() |
@@ -209,2 +209,12 @@ 'use strict'; | ||
getBaudRate() { | ||
return super.getBaudRate() | ||
.then(resolveNextTick) | ||
.then(() => { | ||
return { | ||
baudRate: this.port.openOpt.baudRate | ||
}; | ||
}); | ||
} | ||
flush() { | ||
@@ -211,0 +221,0 @@ return super.flush() |
@@ -89,2 +89,7 @@ 'use strict'; | ||
getBaudRate() { | ||
return super.get() | ||
.then(() => promisify(binding.getBaudRate)(this.fd)); | ||
} | ||
drain() { | ||
@@ -91,0 +96,0 @@ return super.drain() |
{ | ||
"name": "serialport", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "Node.js package to access serial ports. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!", | ||
@@ -77,3 +77,3 @@ "main": "lib", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eslint-plugin-node": "^5.1.0", | ||
"eslint-plugin-node": "^6.0.0", | ||
"eslint-plugin-promise": "^3.5.0", | ||
@@ -80,0 +80,0 @@ "eslint-plugin-standard": "^3.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199414
48
2198