Commit graph

688 commits

Author SHA1 Message Date
Guilherme Francescon
7151eb3fbf Fixes double open() call on unix 2016-04-05 14:47:43 -04:00
Francis Gulotta
5df5a779ee A release of grunt broke our builds
We’ll happily upgrade at some point but not today.
2016-04-05 14:46:50 -04:00
Francis Gulotta
540a96015c Add npm run stress to run stress tests
- Fixed the write memory leak test

 - failed attempt at a open close memory leak test



Closes #602
2016-04-03 21:21:26 -04:00
Francis Gulotta
a9a5d865f6 Test port open errors 2016-04-03 18:31:22 -04:00
Francis Gulotta
a49eebf791 Cleanup the output of serialDuplexTest 2016-04-03 17:18:54 -04:00
Francis Gulotta
abc3c19565 Test & Fix a race condition when closing a port & trying to do anything
- 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.
2016-04-03 01:05:41 -04:00
Francis Gulotta
ac464eb948 Make the fact we drop all event listeners very clear in close and disconnect 2016-04-03 00:59:58 -04:00
Francis Gulotta
a43a67d27a Add more details to the readme around many sections
- Installation now has more navigation links

 - The `.list` function is now documented

 - We now have more valid examples with consistent quotes

 - Command line tools are now kinda documented
2016-04-03 00:56:56 -04:00
Francis Gulotta
99adeee0a6 Free the function from the factory
- No longer make use of the serial port factory
2016-04-02 23:00:09 -04:00
Rick Waldron
a79ff28d88 Dependency cleanup (quick pass)
- 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>
2016-04-02 20:29:02 -04:00
Francis Gulotta
962c54a4f2 Superseded by test/serialport-integration.js 2016-04-02 19:01:32 -04:00
Francis Gulotta
836064abe3 Fix double open
- 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
2016-04-02 18:44:22 -04:00
Francis Gulotta
38d9ca91ce Merge pull request #713 from voodootikigod/open-close-open-close
Closing a port is better tested & correctly reports isOpen in it’s event
2016-03-31 19:02:43 -04:00
Francis Gulotta
77851e2e75 Closing a port is better tested & correctly reports isOpen in it’s event
- 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
2016-03-31 15:20:07 -04:00
Francis Gulotta
b5be6a0d16 Merge pull request #711 from voodootikigod/integration-tests
Integration Tests!
2016-03-31 11:44:27 -04:00
Francis Gulotta
4fbf6d923b Integration Tests!
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
2016-03-30 23:19:59 -04:00
Francis Gulotta
eed507969f Merge pull request #708 from voodootikigod/listunix-refactor
Move listUnix to its own module
2016-03-30 21:16:26 -04:00
Francis Gulotta
c93fb3b81f Move listUnix to its own module
- 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
2016-03-30 18:51:47 -04:00
Francis Gulotta
2250223fc2 Merge pull request #709 from voodootikigod/linting
linting binaries, cleaning up tests, add a doc
2016-03-30 16:18:52 -04:00
Francis Gulotta
72b6ee9e8c Merge pull request #710 from mhart/patch-1
Add instructions for Alpine Linux
2016-03-30 13:38:13 -04:00
Michael Hart
83530e74b7 Add instructions for Alpine Linux 2016-03-30 13:13:42 -04:00
Francis Gulotta
cf2f461127 linting binaries, cleaning up tests, add a doc 2016-03-30 11:27:25 -04:00
Francis Gulotta
050ca327c1 Merge pull request #706 from voodootikigod/tigoe-master
Rebase of #600
2016-03-29 17:10:03 -04:00
tigoe
e4a88e02a7 added new serial duplex test with no dependencies other than node-serialport
This test works with the ArduinoEcho.ino sketch. It runs well as long as
the remote device is sending reasonably infrequently (a few bytes every
10ms, for example). But when the remote device is sending constantly
(comment out the delay in arduinoEcho.ino), this will stop at 852 bytes.
I have yet to determine a cause for this. Buffer overflow, perhaps?
2016-03-29 14:58:21 -04:00
Francis Gulotta
bffcf9efa9 Merge pull request #704 from pabigot/bugfix/file_descriptor_0
add pieces missed in pr #703
2016-03-29 14:46:39 -04:00
Peter A. Bigot
c526fe793e serialport: replace outdated check for open descriptor 2016-03-29 00:35:41 -05:00
Peter A. Bigot
0b0c446c4c serialport: avoid assigning undefined to fd property
When an error is returned the bindings pass undefined instead of null.
2016-03-29 00:35:35 -05:00
Jacob Rosenthal
3469c1a013 Version 2.0.7-beta2 2016-03-28 23:12:30 -04:00
Jacob Rosenthal
2093668826 Merge branch 'release' 2016-03-28 23:09:18 -04:00
Jacob Rosenthal
398e7cc1cf Merge branch 'bugfix/file_descriptor_0' 2016-03-28 23:03:08 -04:00
Francis Gulotta
3731b514fb Address #686 race condition closing serial port causing a segfault 2016-03-28 19:44:15 -04:00
Linus Wallgren
090b26b58b Bugfixes around JS handling of file descriptors
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
2016-03-28 19:41:34 -04:00
Francis Gulotta
5d843c95dc Update AUTHORS.md 2016-03-28 17:31:43 -04:00
Francis Gulotta
23a2c5570d Update AUTHORS.md 2016-03-28 17:31:27 -04:00
Francis Gulotta
78d4dd99e2 Merge pull request #701 from nebrius/readme_update
Updated Raspberry Pi docs to link to Raspi IO
2016-03-28 10:15:17 -04:00
Bryan Hughes
b2cbe54379 Updated Raspberry Pi docs to link to Raspi IO 2016-03-27 21:49:44 -07:00
Jacob Rosenthal
8174327f93 Merge pull request #698 from voodootikigod/update-linting
Switch to eslint and fixup a lot of linting issues.
2016-03-27 16:34:10 -04:00
Francis Gulotta
c2c424c620 Switch to eslint and fixup a lot of listing issues.
There are not a ton of open PRs that would be effected by this, I think it's a good time to go ahead and merge this right away.
2016-03-27 15:03:15 -04:00
Francis Gulotta
1ed0fa5f83 Merge pull request #694 from voodootikigod/doc-improvements
Update the README and add an ISSUE_TEMPLATE
2016-03-27 13:07:11 -04:00
Francis Gulotta
5ecb5909ad Update the README and add an ISSUE_TEMPLATE 2016-03-27 12:37:45 -04:00
Jacob Rosenthal
b5deddf786 add beta release instructions, remove makefile for release 2016-03-25 18:36:39 -04:00
Francis Gulotta
b9aa077c99 Add a note about write issues
when writing to a recently opened Arduino port.
2016-03-25 18:24:42 -04:00
Jacob Rosenthal
9f08b81c31 Version 2.0.7-beta1 2016-03-10 14:22:39 -05:00
Francis Gulotta
c670840c03 Merge pull request #593 from rodovich/check-callback
Check `callback` before calling it in no-error case.
2016-03-09 16:44:02 -05:00
Jim Rodovich
79e7fbfce6 Check callback before calling it in no-error case.
It appears to be an optional parameter because we check it before calling it in every other case.

Also simplify the error handling in a few callbacks.
2016-03-08 14:13:02 -06:00
Francis Gulotta
1ff7f92266 Merge pull request #662 from voodootikigod/win10dcb
Remove deprecated BuildCommDCB for windows 10 support
2016-03-02 15:29:57 -05:00
Francis Gulotta
0bf2ed2da3 Remove deprecated BuildCommDCB for windows support
- This replaces the removed shortcut methods to build a serial port
object with the non deprecated long form.
- Unit and Smoke tested on windows 10.
- Replaces #550 as that source tree has disappeared.
2016-01-26 12:39:29 -05:00
Francis Gulotta
117a114911 Merge pull request #654 from sayanee/svg-badges
add clearer svg badges
2016-01-22 07:47:33 -05:00
Sayanee
d50d694116 add clearer svg badges 2016-01-05 21:01:16 +08:00
Jacob Rosenthal
348ab17f91 Version 2.0.6 2015-12-23 12:17:35 -07:00