Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions Source/devices/oni/AcqBoardONI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ bool AcqBoardONI::detectBoard()
{
LOGC ("Open Ephys ECP5-ONI FPGA open. Gateware version v", major, ".", minor, ".", patch);
}
hasI2cSupport = major >= 1 && minor >= 5;
hasMemoryMonitorSupport = major >= 1 && minor >= 5 && patch >= 1;
hasI2cSupport = CheckSemVer (major, minor, patch, 1, 5, 0);
hasMemoryMonitorSupport = CheckSemVer (major, minor, patch, 1, 5, 1);

if (major == 0)
{
Expand Down Expand Up @@ -2177,3 +2177,21 @@ bool AcqBoardONI::getMemoryMonitorSupport() const
{
return hasMemoryMonitorSupport;
}

bool AcqBoardONI::CheckSemVer (int major, int minor, int patch, int targetMajor, int targetMinor, int targetPatch)
{
if (major > targetMajor)
return true;
else if (major < targetMajor)
return false;

if (minor > targetMinor)
return true;
else if (minor < targetMinor)
return false;

if(patch >= targetPatch)
return true;

return false;
}
2 changes: 2 additions & 0 deletions Source/devices/oni/AcqBoardONI.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ class AcqBoardONI : public AcquisitionBoard

DataBuffer* memBuffer = nullptr;
Array<DataBuffer*, juce::DummyCriticalSection, NUMBER_OF_PORTS> bnoBuffers;

static bool CheckSemVer (int major, int minor, int patch, int targetMajor, int targetMinor, int targetPatch);
};

#endif
Loading