- Error with the provided com port name instead of the mess we use under the hood to talk to the apis
- update _snprintf calls to _snprintf_s as the former is depreciated
- Add a binding test for bad ports
- Better argument handling
- Switch to commander as optimist is deprecated
- more output formats for serial port list
- give serialportterm a list option
- Test requiring the library as part of the build processes on all platforms
- move all js code into ./lib
- move all the easy stuff into ./lib/bindings the rest will bring breaking changes probably
We had ambiguous behavior and documentation around these settings and functions, this preserves all of the previous behavior and defines it in documentation and tests. This is a step towards separating out and cleaning up user supplied options to the constructor.
- isOpen() now pays attention to if we're in the middle of closing
Our faux state machine for opening and closing consists for 4 states
- closed
- opening
- open
- closing
Currently we only really care about if we're in open or not because that's when all our operations can happen. `#open` and `#close` care if they're opening or closing.
- Eliminates use of node-pre-gyp as an actual module dependency (just a package dependency, this might even be just a devDep now?)
- Reduces 5 blocking fs operations to 1
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
- Test for and stop the double opening of ports
- More tests around opening and disconnecting
- Fix mock darwin hardware to be async and hold off zalgo
- Fix broken tests that counted on non async darwin hardware
- Ports correctly respond to `isOpen` during a close event
- cleanup some assertions
- if a CI has a port to test with, open and close it
Bonus
- Appveyor seems to think if you have a `&` in your commit message you’re trying to run a command
We weren’t running these except on node v0.10 now we can! One day we might have a virtual serial port on each CI environment and we can test a lot more. That day isn’t today.
- add another test for listing ports
- mock some more things in our mock binding, specially the real bindings
- Refactor to fix bugs
- Remove the path behind `udevadm` as it’s not always in the same place but it’s so far it is always in the path
- Tests listUnix, (`pnpId` assumes a lot about `udevadm` =( )
- Adds `ttyMDF` to the list of serial ports for “High Speed UART device of Intel Medfield platform”
- turn down the verboseness on appveyor nam installs
- upgrade sandboxed-module for windows support
Fixes#650, #651, #634, #697 and #621
This patch combines #586 and #686
- A closed serialport now uses fd = null
- Emulate a proper fd in mock hardware
- Instead of using the device path as the file descriptor, use a generated
integer as the fd.
This have to use a starting fd of 1 as there are bugs when the fd is 0.
The open(2) manpage states that the file descriptor will be a small
nonnegative integer.
Checking if the fd is falsey leads to the incorrect classification of the
fd 0 as invalid. That is not the case, open(2) specifies the fd as "a
small, nonnegative integer".
This also adds tests for all the cases where the fd was previously
incorrectly considered invalid, which required adding three more methods
to the mock-hardware (update, set and drain).
This solves issue #472