Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
73dfd1aa
Commit
73dfd1aa
authored
11 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
Switch order of channels in RHD2000Thread so all neural data channels are grouped together
parent
8eebf62c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/Processors/Channel.cpp
+5
-0
5 additions, 0 deletions
Source/Processors/Channel.cpp
Source/Processors/Channel.h
+3
-0
3 additions, 0 deletions
Source/Processors/Channel.h
Source/Processors/DataThreads/RHD2000Thread.cpp
+52
-35
52 additions, 35 deletions
Source/Processors/DataThreads/RHD2000Thread.cpp
with
60 additions
and
35 deletions
Source/Processors/Channel.cpp
+
5
−
0
View file @
73dfd1aa
...
...
@@ -61,6 +61,11 @@ String Channel::getName()
}
void
Channel
::
setName
(
String
name_
)
{
name
=
name_
;
}
void
Channel
::
reset
()
{
createDefaultName
();
...
...
This diff is collapsed.
Click to expand it.
Source/Processors/Channel.h
+
3
−
0
View file @
73dfd1aa
...
...
@@ -61,6 +61,9 @@ public:
/** Returns the name of a given channel. */
String
getName
();
/** Sets the name of a given channel. */
void
setName
(
String
);
/** Restores the default settings for a given channel. */
void
reset
();
...
...
This diff is collapsed.
Click to expand it.
Source/Processors/DataThreads/RHD2000Thread.cpp
+
52
−
35
View file @
73dfd1aa
...
...
@@ -826,6 +826,7 @@ bool RHD2000Thread::updateBuffer()
int
streamNumber
=
-
1
;
int
channel
=
-
1
;
// do the neural data channels first
for
(
int
dataStream
=
0
;
dataStream
<
MAX_NUM_DATA_STREAMS
;
dataStream
++
)
{
if
(
numChannelsPerDataStream
[
dataStream
]
>
0
)
...
...
@@ -842,48 +843,64 @@ bool RHD2000Thread::updateBuffer()
thisSample
[
channel
]
=
float
(
value
-
32768
)
*
0.195
f
;
}
// TEMPORARILY DISABLED -- causing problems
if
(
samp
%
4
==
1
)
{
// every 4th sample should have auxiliary input data
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
0
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
}
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
1
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
}
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
2
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
streamNumber
=
-
1
;
}
else
{
// repeat last values from buffer
channel
++
;
thisSample
[
channel
]
=
auxBuffer
[
channel
];
channel
++
;
thisSample
[
channel
]
=
auxBuffer
[
channel
];
channel
++
;
thisSample
[
channel
]
=
auxBuffer
[
channel
];
}
// then do the ADC channels
for
(
int
dataStream
=
0
;
dataStream
<
MAX_NUM_DATA_STREAMS
;
dataStream
++
)
{
if
(
numChannelsPerDataStream
[
dataStream
]
>
0
)
{
streamNumber
++
;
if
(
samp
%
4
==
1
)
{
// every 4th sample should have auxiliary input data
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
0
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
1
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
channel
++
;
thisSample
[
channel
]
=
0.0374
*
float
(
dataBlock
->
auxiliaryData
[
dataStream
][
1
][
samp
+
2
]);
auxBuffer
[
channel
]
=
thisSample
[
channel
];
}
else
{
// repeat last values from buffer
if
(
acquireAdcChannels
)
{
for
(
int
adcChan
=
0
;
adcChan
<
8
;
++
adcChan
)
{
channel
++
;
// ADC waveform units = volts
thisSample
[
channel
]
=
0.000050354
*
float
(
dataBlock
->
boardAdcData
[
adcChan
][
samp
]);
}
thisSample
[
channel
]
=
auxBuffer
[
channel
];
channel
++
;
thisSample
[
channel
]
=
auxBuffer
[
channel
];
channel
++
;
thisSample
[
channel
]
=
auxBuffer
[
channel
];
}
}
}
}
}
// finally, loop through ADC channels if necessary
if
(
acquireAdcChannels
)
{
for
(
int
adcChan
=
0
;
adcChan
<
8
;
++
adcChan
)
{
channel
++
;
// ADC waveform units = volts
thisSample
[
channel
]
=
0.000050354
*
float
(
dataBlock
->
boardAdcData
[
adcChan
][
samp
]);
}
}
// std::cout << channel << std::endl;
timestamp
=
dataBlock
->
timeStamp
[
samp
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment