Skip to content

Commit 03328c5

Browse files
committed
Merge branch 'development' of github.com:open-ephys/plugin-GUI into development
2 parents 83e6d7f + a290304 commit 03328c5

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

Source/Processors/Editors/GenericEditor.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ void GenericEditor::update()
550550
drawerButton->setVisible(true);
551551
}
552552

553-
553+
554554

555555
updateVisualizer(); // does nothing unless this method
556556
// has been implemented
@@ -649,9 +649,9 @@ void GenericEditor::setChannelSelectionState(int chan, bool p, bool r, bool a)
649649
{
650650
if (!isSplitOrMerge)
651651
{
652-
channelSelector->setParamStatus(chan+1, p);
653-
channelSelector->setRecordStatus(chan+1, r);
654-
channelSelector->setAudioStatus(chan+1, a);
652+
channelSelector->setParamStatus(chan, p);
653+
channelSelector->setRecordStatus(chan, r);
654+
channelSelector->setAudioStatus(chan, a);
655655
}
656656
}
657657

@@ -1438,4 +1438,3 @@ void ThresholdSlider::setValues(Array<double> v)
14381438
{
14391439
valueArray = v;
14401440
}
1441-

Source/Processors/GenericProcessor/GenericProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ void GenericProcessor::loadChannelParametersFromXml(XmlElement* channelInfo, Inf
10821082
{
10831083
if (subNode->hasTagName("SELECTIONSTATE"))
10841084
{
1085-
getEditor()->setChannelSelectionState(channelNum - 1,
1085+
getEditor()->setChannelSelectionState(channelNum,
10861086
subNode->getBoolAttribute("param"),
10871087
subNode->getBoolAttribute("record"),
10881088
subNode->getBoolAttribute("audio"));

Source/Processors/Serial/ofSerial.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#include <dirent.h>
1313
#endif
1414

15+
#ifdef TARGET_LINUX
16+
#include <linux/serial.h>
17+
#endif
1518

1619
#pragma comment(lib, "setupapi.lib")
1720
#include <fcntl.h>
@@ -418,8 +421,21 @@ bool ofSerial::setup(string portName, int baud)
418421
options.c_cflag &= ~PARENB;
419422
options.c_cflag &= ~CSTOPB;
420423
options.c_cflag &= ~CSIZE;
424+
options.c_iflag &= (tcflag_t) ~(INLCR | IGNCR | ICRNL | IGNBRK);
425+
options.c_oflag &= (tcflag_t) ~(OPOST);
426+
#if defined( TARGET_LINUX )
427+
options.c_cflag |= CRTSCTS;
428+
options.c_lflag &= ~(ICANON | ECHO | ISIG);
429+
#endif
421430
options.c_cflag |= CS8;
422431
tcsetattr(fd,TCSANOW,&options);
432+
#ifdef TARGET_LINUX
433+
struct serial_struct kernel_serial_settings;
434+
if (ioctl(fd, TIOCGSERIAL, &kernel_serial_settings) == 0) {
435+
kernel_serial_settings.flags |= ASYNC_LOW_LATENCY;
436+
ioctl(fd, TIOCSSERIAL, &kernel_serial_settings);
437+
}
438+
#endif
423439

424440
bInited = true;
425441
printf("Success in opening serial connection!\n\n");

0 commit comments

Comments
 (0)