Skip to content

Commit

Permalink
Rename copy transpose method for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed May 23, 2024
1 parent 820fea3 commit d983615
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OpenEphys.Onix/OpenEphys.Onix/AnalogInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public unsafe override IObservable<AnalogInputDataFrame> Generate()
clockBuffer[sampleIndex] = frame.Clock;
if (++sampleIndex >= bufferSize)
{
var analogData = BufferHelper.CopyBuffer(
var analogData = BufferHelper.CopyTranspose(
analogDataBuffer,
bufferSize,
AnalogIO.ChannelCount,
Expand Down
2 changes: 1 addition & 1 deletion OpenEphys.Onix/OpenEphys.Onix/BufferHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace OpenEphys.Onix
{
static class BufferHelper
{
public static Mat CopyBuffer<TBuffer>(
public static Mat CopyTranspose<TBuffer>(
TBuffer[] buffer,
int sampleCount,
int channelCount,
Expand Down
4 changes: 2 additions & 2 deletions OpenEphys.Onix/OpenEphys.Onix/Rhd2164Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public unsafe override IObservable<Rhd2164DataFrame> Generate()
clockBuffer[sampleIndex] = frame.Clock;
if (++sampleIndex >= bufferSize)
{
var amplifierData = BufferHelper.CopyBuffer(amplifierBuffer, bufferSize, Rhd2164.AmplifierChannelCount, Depth.U16);
var auxData = BufferHelper.CopyBuffer(auxBuffer, bufferSize, Rhd2164.AuxChannelCount, Depth.U16);
var amplifierData = BufferHelper.CopyTranspose(amplifierBuffer, bufferSize, Rhd2164.AmplifierChannelCount, Depth.U16);
var auxData = BufferHelper.CopyTranspose(auxBuffer, bufferSize, Rhd2164.AuxChannelCount, Depth.U16);
observer.OnNext(new Rhd2164DataFrame(clockBuffer, hubClockBuffer, amplifierData, auxData));
hubClockBuffer = new ulong[bufferSize];
clockBuffer = new ulong[bufferSize];
Expand Down
4 changes: 2 additions & 2 deletions OpenEphys.Onix/OpenEphys.Onix/Test0Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public unsafe override IObservable<Test0DataFrame> Generate()
clockBuffer[sampleIndex] = frame.Clock;
if (++sampleIndex >= bufferSize)
{
var dummy = BufferHelper.CopyBuffer(dummyBuffer, bufferSize, dummyWords, Depth.S16);
var message = BufferHelper.CopyBuffer(messageBuffer, bufferSize, 1, Depth.S16);
var dummy = BufferHelper.CopyTranspose(dummyBuffer, bufferSize, dummyWords, Depth.S16);
var message = BufferHelper.CopyTranspose(messageBuffer, bufferSize, 1, Depth.S16);
observer.OnNext(new Test0DataFrame(clockBuffer, hubClockBuffer, message, dummy));
hubClockBuffer = new ulong[bufferSize];
clockBuffer = new ulong[bufferSize];
Expand Down

0 comments on commit d983615

Please sign in to comment.