diff --git a/openhantek/ChangeLog b/openhantek/ChangeLog index b39c00c..8aa3808 100644 --- a/openhantek/ChangeLog +++ b/openhantek/ChangeLog @@ -161,3 +161,6 @@ 2012-10-03 Oliver Haag * Bugfix: Add CAPTURE_READY2250 for the DSO-2250 + +2012-10-07 Oliver Haag +* Ignore errors after first packet was received by Hantek::Device::bulkReadMulti diff --git a/openhantek/src/hantek/control.cpp b/openhantek/src/hantek/control.cpp index bffe86f..bc0926a 100644 --- a/openhantek/src/hantek/control.cpp +++ b/openhantek/src/hantek/control.cpp @@ -193,8 +193,10 @@ namespace Hantek { int lastCaptureState = captureState; #endif captureState = this->getCaptureState(); + if(captureState < 0) + qWarning("Getting capture state failed: %s", Helper::libUsbErrorString(captureState).toLocal8Bit().data()); #ifdef DEBUG - if(captureState != lastCaptureState) + else if(captureState != lastCaptureState) qDebug("Capture state changed to %d", captureState); #endif switch(captureState) { @@ -271,8 +273,6 @@ namespace Hantek { case CAPTURE_SAMPLING: break; default: - if(captureState < 0) - qWarning("Getting capture state failed: %s", Helper::libUsbErrorString(captureState).toLocal8Bit().data()); break; } } diff --git a/openhantek/src/hantek/device.cpp b/openhantek/src/hantek/device.cpp index 6faaac6..61a07bc 100644 --- a/openhantek/src/hantek/device.cpp +++ b/openhantek/src/hantek/device.cpp @@ -397,10 +397,10 @@ namespace Hantek { received += errorCode; } - if(errorCode < 0) - return errorCode; - else + if(received > 0) return received; + else + return errorCode; } /// \brief Control transfer to the oscilloscope.