Bugfixes 2 #208
@@ -513,7 +513,10 @@ bool PISerial::read(void * data, int size, double timeout_ms) {
|
||||
all = readDevice(data, 1);
|
||||
while (all < size) {
|
||||
ret = readDevice(&((uchar *)data)[all], size - all);
|
||||
if (ret > 0) all += ret;
|
||||
if (ret > 0)
|
||||
all += ret;
|
||||
else
|
||||
break;
|
||||
}
|
||||
setOption(BlockingRead, br);
|
||||
received(data, all);
|
||||
@@ -1235,8 +1238,8 @@ PIVector<PISerial::DeviceInfo> PISerial::availableDevicesInfo(bool test) {
|
||||
for (const auto & e: de) { // TODO changes in FileInfo
|
||||
for (const auto & p: prefixes) {
|
||||
if (e.name().startsWith(p)) {
|
||||
di = DeviceInfo();
|
||||
di.path = e.path;
|
||||
di = DeviceInfo();
|
||||
di.path = e.path;
|
||||
# ifdef LINUX
|
||||
ssize_t lsz = readlink(("/sys/class/tty/" + e.name()).dataAscii(), linkbuf, 1024);
|
||||
if (lsz > 0) {
|
||||
|
||||
Reference in New Issue
Block a user