Commit graph

43 commits

Author SHA1 Message Date
Francis Gulotta
18b59eff3e Implement .update() on windows (#831) 2016-05-29 00:26:02 -04:00
Francis Gulotta
901c026ed6 whitespace and spelling 2016-05-28 23:24:58 -04:00
Roger Hardiman
19fb6f9e21 Add GetCommState to fix Error 87 on a Virtual Comm Port (#824)
* Add GetCommState to support a Virtual Comm Port
2016-05-24 22:20:37 -04:00
Francis Gulotta
4b984e8995 write binding tests and cleanup (#808)
- Fix bug where write callback was being called multiple times when write operations blocked
 - [windows] refactored write code to be less complex
 - [unix] refactored write code to be less complex
 - added arduino required integration tests
2016-05-16 21:33:00 -04:00
Francis Gulotta
0063e13364 Make update cross platform for baud rates (#763)
- Errors should always be an error or null
 - bindings.close doesn't throw with proper args so why are we catching?
 - throw on update if given bad options
 - support and test updating and opening with custom baud rates
2016-05-12 13:03:59 -04:00
Francis Gulotta
cf678e6f0b Small Update for windows bindings (#785)
- 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
2016-05-05 10:30:50 -04:00
Francis Gulotta
7b815fd6a4 Using clang and cpplint lint our c++ as much as I can (#762)
The `src/win/" vendor files are scary
2016-04-24 00:19:35 -04:00
Francis Gulotta
79ec1789e4 Fixes 100% cpu when serial ports disconnect on windows
- Fix a small memory leak
 - some linting for whitespace and indentation
2016-04-05 23:01:15 -04:00
Paul Kaplan
6d2e4b5fa7 Return after encountering errors in windows write
The unix version breaks the while loop by returning on certain errors.
On Windows, the errors were being contained because the while loop was
never breaking. For example, pulling the USB cable out would raise
“Access Denied” errors but the while loop would run forever and contain
that error.
2016-04-05 23:01:15 -04: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
Kunal Pathak
25d6c18abb Fix heap corruption issue on windows
Fix the heap corruption issue in serialport causing random access violation failures.
2015-11-04 22:16:14 -08:00
Cong Liu
866e4153b2 Upgrade to Nan 2.0.0 2015-10-11 22:00:46 +02:00
Chris Williams
eaa4f0a721 Merge fix. 2015-05-07 11:01:03 -04:00
Jacob Rosenthal
7eba3f8d41 unix support for update baudrate 2015-04-10 16:36:27 -07:00
Jonathan Bendes
3f6c7192cd Added hang up on close option to constructor. 2015-04-06 12:44:32 -04:00
Jacob Rosenthal
55cce115a3 merged new break control signal for both windows and unix platforms 2015-03-01 20:28:05 -07:00
Jacob Rosenthal
7142d2c6a4 add windows brk support 2015-03-01 19:01:05 -07:00
Jacob Rosenthal
30768e179b control signaling for windows 2015-03-01 18:50:32 -07:00
Chris Williams
91460f1d4e Bug fix possibly for windows. 2014-12-10 21:41:52 -05:00
Chris Williams
d2c4dea658 Bug fix possibly for windows. 2014-12-10 21:25:07 -05:00
Johannes Rudolph
7668a1eea6 Seems we can't use NanScope (or anything v8 for that matter) on the libuv threadpool without getting a segfault. Parse options before opening instead and add a small structure with platform options. 2014-10-27 15:04:55 +01:00
Rob Giseburt
9525bae483 Potential fix for windows and Node 0.11.13 (atom-shell) 2014-09-02 14:19:48 -05:00
Rod Vagg
b1ea084ab5 convert to NAN for 0.8->0.11+ compatibility 2013-12-18 13:34:37 +11:00
Jay Beavers
a0ca3f4d39 Refactor win32 pathing from js into _win.cpp to improve mockability 2013-11-12 14:24:08 -08:00
Donald Ness
2bd51cccfb Add drain method to wait until output is transmitted 2013-10-31 10:05:34 -06:00
Jay Beavers
1a41d67be1 Modify Windows serial port behavior to follow new calling pattern used for Linux, fix #226 2013-10-23 14:52:04 -07:00
Bobris
b6fe782fff Fix for truncated error messages on Windows 2013-08-31 22:51:18 +02:00
JayBeavers
58424e9264 Add error text per @mharsch, move to snprintf 2013-07-19 09:11:07 -07:00
Jiří Zůna
12d82f2f07 fix for issue 169, on some windows 7
On some windows machine alerts are shown, when something goes bad when
trying to list com ports. dhToggleExceptions(FALSE) turns those off.
But then, there is sometimes huge number of serial ports reported, which do not have their
name set. We check for the name existence and proceed only when it is
available. For us it fixes
https://github.com/voodootikigod/node-serialport/issues/169
reliably on multiple machines.
2013-07-18 16:17:58 +02:00
Domenic Denicola
d0ca467b09 Cast size_t to DWORD to avoid compiler warning.
This doesn't change any functionality, but silences the following compiler warning (which occurs at least on Windows x64, not sure about elsewhere):

```
..\src\serialport_win.cpp(281): warning C4267: 'argument' : conversion from 'size_t' to 'DWORD', possible loss of data
[c:\Users\Domenic\Dropbox\Programming\WIP\nodebots\node_modules\serialport\build\serialport.vcxproj]
```
2013-05-30 11:55:41 -03:00
mscdex
eb11daf928 src: lint 2013-04-21 10:50:25 -04:00
Frédérick Lebel
29c6119cf4 fixing
Fixed the error :
error C2664: 'uv_queue_work' : cannot convert parameter 4 from 'void
(__cdecl *)(uv_work_t *)' to 'uv_after_work_cb'
2013-03-19 10:25:42 -04:00
Adriano Raiano
1e1463bfdf fixes Errors when unplug device on windows Issue #95 2013-03-13 08:58:30 +01:00
Joe Ferner
b38b3e53ea increase buffer size 2012-12-31 16:21:56 -05:00
Vadim Kosarev
d02bfd3c62 Add new serial ports list method for Win32
New serial ports list method for Win32 allows enumerate some virtual COM
ports not listed in Device Manager
2012-12-30 16:09:01 +06:00
Vadim Kosarev
989248bb31 Rewrite overlapped IO code to fix receiving data loss 2012-12-29 21:01:50 +06:00
U-Mark-Desktop\Mark
cd0889f958 Fix handle leak 2012-09-30 11:34:50 +02:00
U-Mark-Desktop\Mark
bb1292a1ed Cancel timed out read operation to fix random crashes in Node's IoCompletionPort handler 2012-09-30 11:32:20 +02:00
Jay Beavers
39e559fc11 Add fifo queue support to serialportWrite, fix test to detect arduinos under Linux 2012-09-03 17:15:52 -07:00
Kevin McDermott
cd279b9402 Add attempt at Window Flush. 2012-08-23 20:51:56 +01:00
Kevin McDermott
3aa4d03db8 Add flush functionality. 2012-08-23 18:01:51 +01:00
Julian Gautier
a3bc2fbe9b use bufferSize for windows, dont disable DTR 2012-08-12 20:48:21 -07:00
Joe Ferner
f44e7e66f0 working list and terminal on ubuntu 2012-06-26 22:57:16 -04:00