Robin Krens
ed9f89ca31
Add support for serial bluetooth ports on Linux ( #237 )
...
Added search blob /dev/rfcomm*. rfcomm* is a commonly used naming
convention for bluetooth ports on linux
2021-06-10 15:14:48 -07:00
Matthias Behr
57f72772a9
Add EINTR handling to SerialImpl::write ( #233 )
...
EINTR can still happen on write. Don't throw the exception in that
case but retry.
In case of other errors add more details to the SerialException.
2021-06-10 15:13:58 -07:00
Atomie CHEN
a93fc844d9
Solve issue Custom Baudrate OSX #139 of original repo; inspired by PySerial source code and #57 of github.com/npat-efault/picocom, we need to set custom baudrate after calling tcsetattr; tested on macOS Mojave 10.14.4 ( #218 )
2021-06-10 14:57:40 -07:00
Hannes Kamecke
7439db1228
Fix windows com port prefix ( #179 )
...
The check in `_prefix_port_if_needed` does not work, as it's currently comparing the whole input string to the prefix. As a consequence, port strings will be prefixed, even if they're already prefixed. This commit changes the call to `wstring::compare` to use an overload that compares a substring of the input string only.
2021-06-10 14:57:28 -07:00
Chenchen
9e331e7977
fix invalid memory access when eol size >1 ( #220 )
...
Co-authored-by: chenguojun <chenguojun@yogorobot.com>
2021-06-10 14:49:29 -07:00
bsbaliga
683e12d2f6
Fix memory leak when exception is thrown by impl classes in ( #198 )
...
Serial::read() vector and string variants.
2019-03-25 15:25:33 -07:00
Ben Moyer
235a5f716d
print GetLastError() result instead of errno ( #154 )
2018-01-13 12:16:50 -08:00
Ben Moyer
534141aa8f
implement flushInput and flushOutput for windows ( #153 )
2018-01-13 12:15:36 -08:00
José Manuel Díez
ce085ce88c
Problem: hardware flow control uses RTS_CONTROL_TOGGLE ( #132 )
...
RTS_CONTROL_HANDSHAKE raises RTS when there is space in the input
buffer; RTS_CONTROL_TOGGLE only raises RTS when bytes are available for
transmission.
Also replace numeric constants with symbolic constants.
2018-01-13 12:10:11 -08:00
Mike Purvis
d3713af096
Support 500kbps serial ports. ( #167 )
2018-01-09 07:22:43 -08:00
rhd
827c4a784d
Fix issue with write() and a timeout of 0. ( #137 )
...
* Fix issue with write() and a timeout of 0.
* fix up style
2017-01-20 17:34:49 -08:00
aleksey-sergey
02dfff7883
fixing unix timeouts handling ("timer_tests.short_interval" failure) ( #147 )
2016-11-28 17:38:53 -08:00
aleksey-sergey
4d69fb2e41
fix timeouts handling on Unix systems ( #142 )
...
fixed "singed long" overflow that took place on attempt
to use ~3000ms or bigger timeouts on Unix systems
2016-11-28 14:06:00 -08:00
dontsovcmc
c16faab6ea
resource leak if exception in SerialImpl constructor ( #146 )
2016-11-21 14:48:07 -08:00
Rimco
22dce33fa4
Updated serial.cc for FreeBSD 9 compatibility.
2015-11-26 22:15:48 +01:00
Patrick O'Leary
c5b4bbd181
on OS X, use SYSTEM_CLOCK, not CALENDAR_CLOCK
...
Analogously to using `CLOCK_MONOTONIC` on Linux to time events in favor of `CLOCK_REALTIME`, `SYSTEM_CLOCK` should be used in favor of `CALENDAR_CLOCK` on OS X.
Ref: http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx
2015-11-10 17:28:45 -06:00
Patrick O'Leary
98f1c31e81
on Linux, use CLOCK_MONOTONIC for clock_gettime()
...
On Linux systems which are being driven by an external time source (NTP or PTP), it is possible that time appears to slew in reverse under `CLOCK_REALTIME`. Since the timer function is used to time durations of events (calls to `select()`), it is better to use `CLOCK_MONOTONIC`, which isn't subject to slewing.
2015-11-10 09:40:30 -06:00
Vladimir Gamalian
402657574c
Comment unreferenced formal parameter
...
Fix warning from static analysis tools.
2015-09-27 19:41:56 +07:00
William Woodall
b8320d31a7
fix warning on Windows
2015-04-27 14:44:16 -07:00
William Woodall
03ca3be6a8
Merge pull request #96 from wjwwood/issue_84
...
fix handling of COM ports over 10 on Windows, fixes #84
2015-04-21 21:38:04 -07:00
William Woodall
e438077cba
[style] whitespace and configs
2015-04-21 21:15:51 -07:00
William Woodall
985c3a5172
fix handling of COM ports over 10 on Windows, fixes #84
2015-04-21 20:43:54 -07:00
William Woodall
33bbde42c8
fix typo
2015-04-21 20:07:55 -07:00
William Woodall
3a9e6be834
[style] whitespace
2015-04-21 19:01:59 -07:00
Konstantina Kastanara
42aa78ae98
Release io_iterator_t object when finished with it in list_ports_osx.cc.
2015-04-21 18:59:58 -07:00
Alexander Bulychev
e26a977173
fix for clang build on macosx
2015-04-06 16:53:33 +03:00
DarkDemiurg
29cb551c41
Fix for mingw32
2015-03-24 23:19:15 +03:00
Tomaz Solc
dda5b6308e
Add 576000 baud support for Unix
2015-01-06 15:15:31 +01:00
William Woodall
8036553a1e
improve error message when mark or space parity are not supported
2014-12-09 13:50:24 -08:00
David Hodo
6f464948f0
Make MARK/SPACE partiy support optional
2014-12-09 14:50:37 -06:00
achronop
b376f85fb0
Add MARK/SPACE parity bit option
2014-12-07 21:33:53 +02:00
Konstantina Kastanara
7bce3e0fdc
CloseHanle fd_ if SetCommState fails in function Serial::SerialImpl::reconfigurePort ().
2014-08-19 18:24:48 +03:00
Dawid Piotrowski
49b6762927
support for mxe
2014-08-16 22:08:56 +02:00
William Woodall
8fe085c45f
Merge pull request #69 from linquize/vs
...
Many Visual Studio fixes
2014-07-27 14:38:49 -07:00
Linquize
54d7a9474a
Fix warning in Win64
2014-07-26 21:59:53 +08:00
Christopher Baker
3f0d49a602
Make sure AvailabilityMacros.h is included for build systems that do not include it by default.
...
- Required for macros such as MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_MIN_REQUIRED, etc.
2014-07-21 12:29:38 -05:00
William Woodall
17aac9b77d
Merge pull request #68 from bakercp/mingw_vs_text
...
Fixes to allow cross correct encoding on both codeblocks / mingw and VS
2014-07-15 13:35:28 -07:00
Christopher Baker
24564c59d3
Remove confusing comment.
2014-07-13 09:17:27 -05:00
Christopher Baker
d9847ff87b
Fixes to allow cross correct encoding on both codeblocsk / mingw and visual studio.
2014-07-11 09:28:55 -05:00
Christopher Baker
e16f43b1e4
Revert c++11 feature for better backward compatibility.
2014-07-10 23:57:19 -05:00
William Woodall
de704369db
fixup removal of read_cache_
2014-07-02 15:17:02 -07:00
William Woodall
76c5575f80
Merge pull request #66 from bakercp/bugfix_osx_compiling
...
Add defines to new list_ports methods to compile on OSX.
2014-07-02 15:05:15 -07:00
William Woodall
033b009480
Merge pull request #65 from wjwwood/fix_locking
...
fix usage of scoped locks
2014-07-02 15:03:41 -07:00
William Woodall
051824894b
style fixup
2014-07-02 15:01:53 -07:00
Christopher Baker
24a8722f3e
Fix typo.
2014-07-02 11:18:11 -05:00
Christopher Baker
b46681e8cc
Add defines to new list_ports methods to compile on OSX.
2014-07-02 10:47:45 -05:00
William Woodall
72af8435c5
fix usage of scoped locks
...
previously they were getting destroyed
immediately because they were not stored in a
temporary scope variable
2014-06-23 11:23:27 -07:00
Konstantina Kastanara
04d4763926
Added return value control in Serial::SerialImpl::close () in unix.cc and win.cc
2014-05-07 18:49:37 +03:00
William Woodall
2df3499e81
Merge pull request #49 from clearpathrobotics/wait-functions
...
Wait functions
2014-04-28 10:58:55 -07:00
Craig Lilley
10fa977dad
Fixed a syntax error.
...
In list_ports_win.cc.
2014-04-28 00:01:42 +01:00