Skip to content
Snippets Groups Projects
Commit d688ffa7 authored by jsiegle's avatar jsiegle
Browse files

Added custom editors for FPGA and Arduino output nodes

parent 0cf24d6d
No related branches found
No related tags found
No related merge requests found
Showing
with 363 additions and 16 deletions
......@@ -88,6 +88,8 @@ OBJECTS := \
$(OBJDIR)/SpikeDetector_300d85e7.o \
$(OBJDIR)/AudioNode_94606ff3.o \
$(OBJDIR)/EventNode_95c842b7.o \
$(OBJDIR)/FPGAOutputEditor_cfe00f8a.o \
$(OBJDIR)/ArduinoOutputEditor_1118f008.o \
$(OBJDIR)/ChannelSelector_c1430874.o \
$(OBJDIR)/ParameterEditor_91f62ae8.o \
$(OBJDIR)/SpikeDisplayEditor_e1812c1.o \
......@@ -376,6 +378,16 @@ $(OBJDIR)/EventNode_95c842b7.o: ../../Source/Processors/EventNode.cpp
@echo "Compiling EventNode.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/FPGAOutputEditor_cfe00f8a.o: ../../Source/Processors/Editors/FPGAOutputEditor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling FPGAOutputEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/ArduinoOutputEditor_1118f008.o: ../../Source/Processors/Editors/ArduinoOutputEditor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling ArduinoOutputEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/ChannelSelector_c1430874.o: ../../Source/Processors/Editors/ChannelSelector.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling ChannelSelector.cpp"
......
......@@ -62,6 +62,8 @@
4BE0DDA01B73223EF0BD934A = { isa = PBXBuildFile; fileRef = 3DD0741FCFBC7563EC722D9B; };
08B501E0D7764C6B613AF529 = { isa = PBXBuildFile; fileRef = B7750B27E4F3748ECCCCF69D; };
9CBA3837CC8CAA03A03F2D9C = { isa = PBXBuildFile; fileRef = FA57CE4F63FF1592D6B3F9B5; };
9C77BFFE7BA865E20121E707 = { isa = PBXBuildFile; fileRef = 7738196148E539781B237854; };
BA64AA28A3E0DC10AB0A9380 = { isa = PBXBuildFile; fileRef = DAFD5D2E1F875321584C7147; };
BCB6C021A03F0AB0248C7F8A = { isa = PBXBuildFile; fileRef = 51D2678E9F30DC261CCB61B0; };
632C915D01C42D27E828BFA9 = { isa = PBXBuildFile; fileRef = 47ECF9384C1D27EB2FBEBF9E; };
DD22A06702F4CF995893DD5C = { isa = PBXBuildFile; fileRef = F0B09605D4108F0F94EF3B57; };
......@@ -278,6 +280,10 @@
12866D44BE115E8837468F48 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioNode.h; path = ../../Source/Processors/AudioNode.h; sourceTree = SOURCE_ROOT; };
FA57CE4F63FF1592D6B3F9B5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = EventNode.cpp; path = ../../Source/Processors/EventNode.cpp; sourceTree = SOURCE_ROOT; };
32163C956C8A6F5C1DD7FE7F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EventNode.h; path = ../../Source/Processors/EventNode.h; sourceTree = SOURCE_ROOT; };
7738196148E539781B237854 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FPGAOutputEditor.cpp; path = ../../Source/Processors/Editors/FPGAOutputEditor.cpp; sourceTree = SOURCE_ROOT; };
5F43022E89D254273CF827A5 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FPGAOutputEditor.h; path = ../../Source/Processors/Editors/FPGAOutputEditor.h; sourceTree = SOURCE_ROOT; };
DAFD5D2E1F875321584C7147 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ArduinoOutputEditor.cpp; path = ../../Source/Processors/Editors/ArduinoOutputEditor.cpp; sourceTree = SOURCE_ROOT; };
5F0DC90995C8E7BB7E3176F7 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ArduinoOutputEditor.h; path = ../../Source/Processors/Editors/ArduinoOutputEditor.h; sourceTree = SOURCE_ROOT; };
51D2678E9F30DC261CCB61B0 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ChannelSelector.cpp; path = ../../Source/Processors/Editors/ChannelSelector.cpp; sourceTree = SOURCE_ROOT; };
1A64B7009173729093BA3D96 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ChannelSelector.h; path = ../../Source/Processors/Editors/ChannelSelector.h; sourceTree = SOURCE_ROOT; };
47ECF9384C1D27EB2FBEBF9E = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ParameterEditor.cpp; path = ../../Source/Processors/Editors/ParameterEditor.cpp; sourceTree = SOURCE_ROOT; };
......@@ -522,6 +528,10 @@
0C5335B0E57C9DC92FC57E5F,
7738F51AE0EC63D76EE0F761 ); name = Visualization; sourceTree = "<group>"; };
953CC35B9116404D6AA8D1C7 = { isa = PBXGroup; children = (
7738196148E539781B237854,
5F43022E89D254273CF827A5,
DAFD5D2E1F875321584C7147,
5F0DC90995C8E7BB7E3176F7,
51D2678E9F30DC261CCB61B0,
1A64B7009173729093BA3D96,
47ECF9384C1D27EB2FBEBF9E,
......@@ -791,6 +801,8 @@
4BE0DDA01B73223EF0BD934A,
08B501E0D7764C6B613AF529,
9CBA3837CC8CAA03A03F2D9C,
9C77BFFE7BA865E20121E707,
BA64AA28A3E0DC10AB0A9380,
BCB6C021A03F0AB0248C7F8A,
632C915D01C42D27E828BFA9,
DD22A06702F4CF995893DD5C,
......
......@@ -167,6 +167,8 @@
<ClCompile Include="..\..\Source\Processors\SpikeDetector.cpp"/>
<ClCompile Include="..\..\Source\Processors\AudioNode.cpp"/>
<ClCompile Include="..\..\Source\Processors\EventNode.cpp"/>
<ClCompile Include="..\..\Source\Processors\Editors\FPGAOutputEditor.cpp"/>
<ClCompile Include="..\..\Source\Processors\Editors\ArduinoOutputEditor.cpp"/>
<ClCompile Include="..\..\Source\Processors\Editors\ChannelSelector.cpp"/>
<ClCompile Include="..\..\Source\Processors\Editors\ParameterEditor.cpp"/>
<ClCompile Include="..\..\Source\Processors\Editors\SpikeDisplayEditor.cpp"/>
......@@ -270,6 +272,8 @@
<ClInclude Include="..\..\Source\Processors\SpikeDetector.h"/>
<ClInclude Include="..\..\Source\Processors\AudioNode.h"/>
<ClInclude Include="..\..\Source\Processors\EventNode.h"/>
<ClInclude Include="..\..\Source\Processors\Editors\FPGAOutputEditor.h"/>
<ClInclude Include="..\..\Source\Processors\Editors\ArduinoOutputEditor.h"/>
<ClInclude Include="..\..\Source\Processors\Editors\ChannelSelector.h"/>
<ClInclude Include="..\..\Source\Processors\Editors\ParameterEditor.h"/>
<ClInclude Include="..\..\Source\Processors\Editors\SpikeDisplayEditor.h"/>
......
......@@ -370,6 +370,12 @@
<ClCompile Include="..\..\Source\Processors\EventNode.cpp">
<Filter>open-ephys\Source\Processors</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\Processors\Editors\FPGAOutputEditor.cpp">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\Processors\Editors\ArduinoOutputEditor.cpp">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\Processors\Editors\ChannelSelector.cpp">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClCompile>
......@@ -675,6 +681,12 @@
<ClInclude Include="..\..\Source\Processors\EventNode.h">
<Filter>open-ephys\Source\Processors</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Processors\Editors\FPGAOutputEditor.h">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Processors\Editors\ArduinoOutputEditor.h">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\Processors\Editors\ChannelSelector.h">
<Filter>open-ephys\Source\Processors\Editors</Filter>
</ClInclude>
......
......@@ -36,11 +36,11 @@ ArduinoOutput::~ArduinoOutput()
}
// AudioProcessorEditor* ArduinoOutput::createEditor()
// {
// editor = new ArduinoOutputEditor(this);
// return editor;
// }
AudioProcessorEditor* ArduinoOutput::createEditor()
{
editor = new ArduinoOutputEditor(this);
return editor;
}
void ArduinoOutput::handleEvent(int eventType, MidiMessage& event)
{
......@@ -64,6 +64,9 @@ void ArduinoOutput::handleEvent(int eventType, MidiMessage& event)
arduino.sendDigital(13, ARD_HIGH);
state = true;
}
//ArduinoOutputEditor* ed = (ArduinoOutputEditor*) getEditor();
//ed->receivedEvent();
}
}
......
......@@ -26,9 +26,11 @@
#include "../../JuceLibraryCode/JuceHeader.h"
#include "Editors/ArduinoOutputEditor.h"
#include "Serial/ofArduino.h"
#include "GenericProcessor.h"
/**
*UNDER CONSTRUCTION*
......@@ -57,7 +59,7 @@ public:
bool enable();
bool disable();
//AudioProcessorEditor* createEditor();
AudioProcessorEditor* createEditor();
bool isSink() {return true;}
......
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 Open Ephys
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ArduinoOutputEditor.h"
#include <stdio.h>
ArduinoOutputEditor::ArduinoOutputEditor (GenericProcessor* parentNode)
: GenericEditor(parentNode)
{
accumulator = 0;
desiredWidth = 150;
Image im;
im = ImageCache::getFromMemory (BinaryData::ArduinoIcon_png,
BinaryData::ArduinoIcon_pngSize);
icon = new ImageIcon(im);
addAndMakeVisible(icon);
icon->setBounds(15,15,120,120);
icon->setOpacity(0.3f);
}
ArduinoOutputEditor::~ArduinoOutputEditor()
{
deleteAllChildren();
}
void ArduinoOutputEditor::receivedEvent()
{
icon->setOpacity(0.8f);
startTimer(50);
}
void ArduinoOutputEditor::timerCallback()
{
repaint();
accumulator++;
if (isFading) {
if (accumulator > 15.0)
{
stopTimer();
isFading = false;
}
} else {
if (accumulator < 10.0)
{
icon->setOpacity(0.8f-(0.05*float(accumulator)));
accumulator++;
} else {
icon->setOpacity(0.3f);
stopTimer();
accumulator = 0;
}
}
}
\ No newline at end of file
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 Open Ephys
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ARDUINOOUTPUTEDITOR_H_28EB4CC9__
#define __ARDUINOOUTPUTEDITOR_H_28EB4CC9__
#include "../../../JuceLibraryCode/JuceHeader.h"
#include "GenericEditor.h"
#include "ImageIcon.h"
class ImageIcon;
class ArduinoOutputEditor : public GenericEditor
{
public:
ArduinoOutputEditor (GenericProcessor* parentNode);
virtual ~ArduinoOutputEditor();
void receivedEvent();
ImageIcon* icon;
private:
void timerCallback();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ArduinoOutputEditor);
};
#endif // __ARDUINOOUTPUTEDITOR_H_28EB4CC9__
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 Open Ephys
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "FPGAOutputEditor.h"
#include <stdio.h>
FPGAOutputEditor::FPGAOutputEditor (GenericProcessor* parentNode)
: GenericEditor(parentNode)
{
accumulator = 0;
desiredWidth = 150;
Image im;
im = ImageCache::getFromMemory (BinaryData::OpenEphysBoardLogoBlack_png,
BinaryData::OpenEphysBoardLogoBlack_pngSize);
icon = new ImageIcon(im);
addAndMakeVisible(icon);
icon->setBounds(15,15,120,120);
icon->setOpacity(0.3f);
}
FPGAOutputEditor::~FPGAOutputEditor()
{
deleteAllChildren();
}
void FPGAOutputEditor::receivedEvent()
{
icon->setOpacity(0.8f);
startTimer(50);
}
void FPGAOutputEditor::timerCallback()
{
repaint();
accumulator++;
if (isFading) {
if (accumulator > 15.0)
{
stopTimer();
isFading = false;
}
} else {
if (accumulator < 10.0)
{
icon->setOpacity(0.8f-(0.05*float(accumulator)));
accumulator++;
} else {
icon->setOpacity(0.3f);
stopTimer();
accumulator = 0;
}
}
}
\ No newline at end of file
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 Open Ephys
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FPGAOUTPUTEDITOR_H_5A646CD3__
#define __FPGAOUTPUTEDITOR_H_5A646CD3__
#include "../../../JuceLibraryCode/JuceHeader.h"
#include "GenericEditor.h"
#include "ImageIcon.h"
class ImageIcon;
class FPGAOutputEditor : public GenericEditor
{
public:
FPGAOutputEditor (GenericProcessor* parentNode);
virtual ~FPGAOutputEditor();
void receivedEvent();
ImageIcon* icon;
private:
void timerCallback();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FPGAOutputEditor);
};
#endif // __FPGAOUTPUTEDITOR_H_5A646CD3__
......@@ -44,6 +44,10 @@ SourceNodeEditor::SourceNodeEditor (GenericProcessor* parentNode)
} else if (getName().equalsIgnoreCase("File Reader")) {
im = ImageCache::getFromMemory (BinaryData::FileReaderIcon_png,
BinaryData::FileReaderIcon_pngSize);
} else if (getName().equalsIgnoreCase("Custom FPGA")) {
im = ImageCache::getFromMemory (BinaryData::OpenEphysBoardLogoGray_png,
BinaryData::OpenEphysBoardLogoGray_pngSize);
} else {
im = ImageCache::getFromMemory (BinaryData::DefaultDataSource_png,
BinaryData::DefaultDataSource_pngSize);
......@@ -53,6 +57,10 @@ SourceNodeEditor::SourceNodeEditor (GenericProcessor* parentNode)
addAndMakeVisible(icon);
icon->setBounds(50,40,70,70);
if (getName().equalsIgnoreCase("Custom FPGA")) {
icon->setBounds(20,15,120,120);
}
//Array<int> values;
//values.add(1); values.add(2), values.add(3);
......
......@@ -27,7 +27,6 @@
#include "GenericEditor.h"
#include "ImageIcon.h"
class FilterViewport;
class ImageIcon;
class WiFiOutputEditor : public GenericEditor
......
......@@ -36,11 +36,11 @@ FPGAOutput::~FPGAOutput()
}
// AudioProcessorEditor* FPGAOutput::createEditor()
// {
// editor = new FPGAOutputEditor(this);
// return editor;
// }
AudioProcessorEditor* FPGAOutput::createEditor()
{
editor = new FPGAOutputEditor(this);
return editor;
}
void FPGAOutput::handleEvent(int eventType, MidiMessage& event)
{
......
......@@ -28,11 +28,9 @@
#include "../../JuceLibraryCode/JuceHeader.h"
#include "GenericProcessor.h"
//#include "Editors/WiFiOutputEditor.h"
#include "Editors/FPGAOutputEditor.h"
class FilterViewport;
/**
Allows the signal chain to send outputs to the Open Ephys acquisition board.
......@@ -56,7 +54,7 @@ public:
void handleEvent(int eventType, MidiMessage& event);
//AudioProcessorEditor* createEditor();
AudioProcessorEditor* createEditor();
bool isSink() {return true;}
......
......@@ -274,6 +274,14 @@
<FILE id="hGnGAjh" name="EventNode.cpp" compile="1" resource="0" file="Source/Processors/EventNode.cpp"/>
<FILE id="dUtRN6" name="EventNode.h" compile="0" resource="0" file="Source/Processors/EventNode.h"/>
<GROUP id="AqvwO6w" name="Editors">
<FILE id="mvixd58" name="FPGAOutputEditor.cpp" compile="1" resource="0"
file="Source/Processors/Editors/FPGAOutputEditor.cpp"/>
<FILE id="phTDDOR" name="FPGAOutputEditor.h" compile="0" resource="0"
file="Source/Processors/Editors/FPGAOutputEditor.h"/>
<FILE id="oYeB8Hh" name="ArduinoOutputEditor.cpp" compile="1" resource="0"
file="Source/Processors/Editors/ArduinoOutputEditor.cpp"/>
<FILE id="xfwOAJs" name="ArduinoOutputEditor.h" compile="0" resource="0"
file="Source/Processors/Editors/ArduinoOutputEditor.h"/>
<FILE id="rZGNxjv" name="ChannelSelector.cpp" compile="1" resource="0"
file="Source/Processors/Editors/ChannelSelector.cpp"/>
<FILE id="Yga4B3Z" name="ChannelSelector.h" compile="0" resource="0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment