Skip to content

Commit c90f98f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into mastermerge
Conflicts: Builds/Linux/Makefile Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj Builds/VisualStudio2012/open-ephys.vcxproj Builds/VisualStudio2012/open-ephys.vcxproj.filters Builds/VisualStudio2013/open-ephys.vcxproj Builds/VisualStudio2013/open-ephys.vcxproj.filters Source/CoreServices.cpp Source/Plugins/ArduinoOutput/ArduinoOutput.cpp Source/Plugins/EcubeSource/EcubeThread.h Source/Plugins/NetworkEvents/NetworkEvents.cpp Source/Plugins/RecordControl/RecordControl.h Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp Source/Processors/DataThreads/RhythmNode/RHD2000Thread.h Source/Processors/DataThreads/RhythmNode/rhythm-api/rhd2000evalboard.cpp Source/Processors/DataThreads/RhythmNode/rhythm-api/rhd2000evalboard.h Source/Processors/ProcessorGraph/ProcessorGraph.cpp Source/UI/ProcessorList.cpp open-ephys.jucer
2 parents 2f81aba + 6a8b414 commit c90f98f

32 files changed

Lines changed: 806 additions & 40 deletions

File tree

Builds/MacOSX/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<key>CFBundleSignature</key>
1717
<string>????</string>
1818
<key>CFBundleShortVersionString</key>
19-
<string>0.3.5</string>
19+
<string>0.3.6</string>
2020
<key>CFBundleVersion</key>
21-
<string>0.3.5</string>
21+
<string>0.3.6</string>
2222
<key>NSHumanReadableCopyright</key>
2323
<string>Open Ephys</string>
2424
<key>NSHighResolutionCapable</key>

Builds/VisualStudio2012/resources.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
#include <windows.h>
88

99
VS_VERSION_INFO VERSIONINFO
10-
FILEVERSION 0,3,5,0
10+
FILEVERSION 0,3,6,0
1111
BEGIN
1212
BLOCK "StringFileInfo"
1313
BEGIN
1414
BLOCK "040904E4"
1515
BEGIN
1616
VALUE "CompanyName", "Open Ephys\0"
1717
VALUE "FileDescription", "open-ephys\0"
18-
VALUE "FileVersion", "0.3.5\0"
18+
VALUE "FileVersion", "0.3.6\0"
1919
VALUE "ProductName", "open-ephys\0"
20-
VALUE "ProductVersion", "0.3.5\0"
20+
VALUE "ProductVersion", "0.3.6\0"
2121
END
2222
END
2323

Builds/VisualStudio2013/resources.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
#include <windows.h>
88

99
VS_VERSION_INFO VERSIONINFO
10-
FILEVERSION 0,3,5,0
10+
FILEVERSION 0,3,6,0
1111
BEGIN
1212
BLOCK "StringFileInfo"
1313
BEGIN
1414
BLOCK "040904E4"
1515
BEGIN
1616
VALUE "CompanyName", "Open Ephys\0"
1717
VALUE "FileDescription", "open-ephys\0"
18-
VALUE "FileVersion", "0.3.5\0"
18+
VALUE "FileVersion", "0.3.6\0"
1919
VALUE "ProductName", "open-ephys\0"
20-
VALUE "ProductVersion", "0.3.5\0"
20+
VALUE "ProductVersion", "0.3.6\0"
2121
END
2222
END
2323

JuceLibraryCode/JuceHeader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
namespace ProjectInfo
4040
{
4141
const char* const projectName = "open-ephys";
42-
const char* const versionString = "0.3.5";
43-
const int versionNumber = 0x305;
42+
const char* const versionString = "0.3.6";
43+
const int versionNumber = 0x306;
4444
}
4545

4646
#endif // __APPHEADERFILE_YNSYIRR__

JuceLibraryCode/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
#endif
3030

3131
//==============================================================================
32+
#pragma GCC diagnostic push
33+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
34+
#pragma GCC diagnostic ignored "-Wnonnull"
3235
struct SystemVol
3336
{
3437
SystemVol (AudioObjectPropertySelector selector)
@@ -123,6 +126,7 @@ struct SystemVol
123126
&& isSettable;
124127
}
125128
};
129+
#pragma GCC diagnostic pop
126130

127131
#define JUCE_SYSTEMAUDIOVOL_IMPLEMENTED 1
128132
float JUCE_CALLTYPE SystemAudioVolume::getGain() { return SystemVol (kAudioHardwareServiceDeviceProperty_VirtualMasterVolume).getGain(); }

JuceLibraryCode/modules/juce_core/native/juce_mac_Files.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,15 @@ static bool launchExecutable (const String& pathAndArguments)
311311
{
312312
NSString* p = juceStringToNS (getFullPathName());
313313

314+
#pragma GCC diagnostic push
315+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
314316
return [[NSWorkspace sharedWorkspace]
315317
performFileOperation: NSWorkspaceRecycleOperation
316318
source: [p stringByDeletingLastPathComponent]
317319
destination: nsEmptyString()
318320
files: [NSArray arrayWithObject: [p lastPathComponent]]
319321
tag: nil ];
322+
#pragma GCC diagnostic pop
320323
}
321324
#endif
322325
}

JuceLibraryCode/modules/juce_core/native/juce_mac_Network.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,11 @@ void finishedLoading()
243243

244244
void run() override
245245
{
246+
#pragma GCC diagnostic push
247+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
246248
connection = [[NSURLConnection alloc] initWithRequest: request
247249
delegate: delegate];
250+
#pragma GCC diagnostic pop
248251
while (! threadShouldExit())
249252
{
250253
JUCE_AUTORELEASEPOOL

JuceLibraryCode/modules/juce_graphics/native/juce_mac_Fonts.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,22 @@ static CFAttributedStringRef createCFAttributedString (const AttributedString& t
272272
}
273273

274274
// Paragraph Attributes
275+
#pragma GCC diagnostic push
276+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
275277
CTTextAlignment ctTextAlignment = kCTLeftTextAlignment;
278+
#pragma GCC diagnostic pop
276279
CTLineBreakMode ctLineBreakMode = kCTLineBreakByWordWrapping;
277280
const CGFloat ctLineSpacing = text.getLineSpacing();
278281

279282
switch (text.getJustification().getOnlyHorizontalFlags())
280283
{
281284
case Justification::left: break;
285+
#pragma GCC diagnostic push
286+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
282287
case Justification::right: ctTextAlignment = kCTRightTextAlignment; break;
283288
case Justification::horizontallyCentred: ctTextAlignment = kCTCenterTextAlignment; break;
284289
case Justification::horizontallyJustified: ctTextAlignment = kCTJustifiedTextAlignment; break;
290+
#pragma GCC diagnostic pop
285291
default: jassertfalse; break; // Illegal justification flags
286292
}
287293

JuceLibraryCode/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ - (BOOL) webView: (UIWebView*) webView shouldStartLoadWithRequest: (NSURLRequest
160160
static DownloadClickDetectorClass cls;
161161
clickListener = [cls.createInstance() init];
162162
DownloadClickDetectorClass::setOwner (clickListener, owner);
163-
[webView setPolicyDelegate: clickListener];
164-
[webView setFrameLoadDelegate: clickListener];
165-
[webView setUIDelegate: clickListener];
163+
// [webView setPolicyDelegate: (id <WebPolicyDelegate>)clickListener];
164+
// [webView setFrameLoadDelegate: (id <WebFrameLoadDelegate>)clickListener];
165+
// [webView setUIDelegate: (id <WebUIDelegate>)clickListener];
166166
#else
167167
webView = [[UIWebView alloc] initWithFrame: CGRectMake (0, 0, 1.0f, 1.0f)];
168168
setView (webView);

Resources/Python/event_listener.py

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
from __future__ import print_function, unicode_literals
2+
from collections import OrderedDict
3+
from itertools import chain, repeat
4+
try:
5+
from itertools import izip
6+
except ImportError:
7+
izip = zip # Python 3
8+
import struct
9+
10+
import zmq
11+
12+
13+
# Event types
14+
TTL = 3
15+
SPIKE = 4
16+
MESSAGE = 5
17+
BINARY_MSG = 6
18+
19+
20+
def unpacker(format, *fields):
21+
s = struct.Struct(format)
22+
23+
def unpack(data):
24+
values = s.unpack(data[:s.size])
25+
if (len(values) == 1) and (not fields):
26+
assert len(data) == s.size
27+
return values[0], ''
28+
assert len(values) <= len(fields)
29+
return (OrderedDict(izip(fields, chain(values, repeat(None)))),
30+
data[s.size:])
31+
32+
return unpack
33+
34+
35+
unpack_standard = unpacker('3BxB',
36+
'node_id',
37+
'event_id',
38+
'event_channel',
39+
'source_node_id',
40+
)
41+
42+
43+
unpack_ttl = unpacker('<Q')
44+
45+
46+
unpack_spike = unpacker('<2q2x5H3B2fH',
47+
'timestamp',
48+
'timestamp_software',
49+
'n_channels',
50+
'n_samples',
51+
'sorted_id',
52+
'electrode_id',
53+
'channel',
54+
'color_r', 'color_g', 'color_b',
55+
'pc_proj_x', 'pc_proj_y',
56+
'sampling_frequency_hz',
57+
'data',
58+
'gain',
59+
'threshold',
60+
)
61+
62+
63+
def run(hostname='localhost', port=5557):
64+
with zmq.Context() as ctx:
65+
with ctx.socket(zmq.SUB) as sock:
66+
sock.connect('tcp://%s:%d' % (hostname, port))
67+
68+
for etype in (TTL, SPIKE, MESSAGE):
69+
sock.setsockopt(zmq.SUBSCRIBE, chr(etype).encode('utf-8'))
70+
71+
while True:
72+
try:
73+
parts = sock.recv_multipart()
74+
assert len(parts) == 3
75+
76+
etype = ord(parts[0])
77+
timestamp_seconds = struct.unpack('d', parts[1])[0]
78+
body = parts[2]
79+
80+
if etype == SPIKE:
81+
spike, body = unpack_spike(body)
82+
print('%g: Spike: %s' % (timestamp_seconds, spike))
83+
body = '' # TODO: unpack other data
84+
85+
else:
86+
header, body = unpack_standard(body)
87+
88+
if etype == TTL:
89+
word, body = unpack_ttl(body)
90+
print('%g: TTL: Channel %d: %s' %
91+
(timestamp_seconds,
92+
header['event_channel'] + 1,
93+
'ON' if header['event_id'] else 'OFF'))
94+
95+
elif etype == MESSAGE:
96+
msg, body = body.decode('utf-8'), ''
97+
print('%g: Message: %s' % (timestamp_seconds, msg))
98+
99+
100+
# Check that all data was consumed
101+
assert len(body) == 0
102+
103+
except KeyboardInterrupt:
104+
print() # Add final newline
105+
break
106+
107+
108+
if __name__ == '__main__':
109+
run()

0 commit comments

Comments
 (0)