Skip to content

Commit ce10562

Browse files
committed
Add special case handling for Acquisition Board in ProcessorGraph and ProcessorManager
1 parent 70f8839 commit ce10562

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

Source/Processors/PlaceholderProcessor/PlaceholderProcessorEditor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ PlaceholderProcessorEditor::PlaceholderProcessorEditor (GenericProcessor* parent
2727
: GenericEditor (parentNode), processorName (pName), libName (lName), libVersion (lVer)
2828
{
2929
notfoundLabel = new Label ("Not found", "Plugin not found");
30-
notfoundLabel->setBounds (10, 25, 100, 20);
30+
notfoundLabel->setBounds (10, 28, 170, 15);
3131
addAndMakeVisible (notfoundLabel);
3232

33-
libLabel = new Label ("Plugin", libName + " ver. " + String (libVersion));
34-
libLabel->setBounds (10, 40, 160, 40);
33+
libLabel = new Label ("Plugin", libName);
34+
libLabel->setBounds (10, 45, 170, 40);
3535
addAndMakeVisible (libLabel);
3636

3737
nameLabel = new Label ("Processor", "Missing processor: " + processorName);
38-
nameLabel->setBounds (10, 75, 160, 40);
38+
nameLabel->setBounds (10, 85, 170, 40);
3939
addAndMakeVisible (nameLabel);
4040

4141
desiredWidth = 180;

Source/Processors/ProcessorGraph/ProcessorGraph.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,15 @@ void ProcessorGraph::loadFromXml (XmlElement* xml)
20172017
{
20182018
String pName = processor->getStringAttribute ("pluginName");
20192019

2020+
/* Special case for OE FPGA Acquisition Board.
2021+
** Overrides plugin and library names to allow loading configs from v0.6.x. */
2022+
if (pName.equalsIgnoreCase ("OE FPGA Acquisition Board"))
2023+
{
2024+
pName = "Acquisition Board";
2025+
processor->setAttribute ("pluginName", pName);
2026+
processor->setAttribute ("libraryName", pName);
2027+
}
2028+
20202029
if (! isConsoleApp)
20212030
{
20222031
auto loadedPlugins = AccessClass::getProcessorList()->getItemList();

Source/Processors/ProcessorManager/ProcessorManager.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ std::unique_ptr<GenericProcessor> createProcessor (Plugin::Description descripti
341341
if (description.name.equalsIgnoreCase (info.name))
342342
{
343343
int libIndex = pm->getLibraryIndexFromPlugin (Plugin::DATA_THREAD, i);
344-
if (description.libName.equalsIgnoreCase (pm->getLibraryName (libIndex)))
344+
345+
/* Special case for Acquisition Board.
346+
** Skips library name match to allow loading configs from v0.6.x. */
347+
if (description.libName.equalsIgnoreCase (pm->getLibraryName (libIndex))
348+
|| description.name.equalsIgnoreCase ("Acquisition Board"))
345349
{
346350
proc = new SourceNode (info.name, info.creator);
347351
proc->setPluginData (Plugin::DATA_THREAD, i);

0 commit comments

Comments
 (0)