Skip to content

Commit 48ffe99

Browse files
committed
Reset error flag before acquisition
1 parent e2a37a9 commit 48ffe99

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Source/Devices/PortController.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ int PortController::enableDevice()
4040
return 0;
4141
}
4242

43+
void PortController::startAcquisition()
44+
{
45+
errorFlag = false;
46+
}
47+
4348
void PortController::stopAcquisition()
4449
{
4550
while (!frameArray.isEmpty())

Source/Devices/PortController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class PortController : public OnixDevice
9090

9191
int updateSettings() override { return 0; }
9292

93-
void startAcquisition() override {};
93+
void startAcquisition() override;
9494

9595
void stopAcquisition() override;
9696

Source/OnixSource.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ bool OnixSource::isReady()
454454
if (!devicesFound)
455455
return false;
456456

457-
if (editor->isHeadstageSelected(PortName::PortA) && !portA->checkLinkState() && portA->getErrorFlag()) return false;
458-
if (editor->isHeadstageSelected(PortName::PortB) && !portB->checkLinkState() && portB->getErrorFlag()) return false;
457+
if (editor->isHeadstageSelected(PortName::PortA) && !portA->checkLinkState()) return false;
458+
if (editor->isHeadstageSelected(PortName::PortB) && !portB->checkLinkState()) return false;
459459

460460
for (auto source : sources)
461461
{
@@ -562,5 +562,5 @@ bool OnixSource::updateBuffer()
562562
portA->processFrames();
563563
portB->processFrames();
564564

565-
return !portA->getErrorFlag() && !portB->getErrorFlag();
565+
return portA->getErrorFlag() || portB->getErrorFlag();
566566
}

0 commit comments

Comments
 (0)