diff --git a/eeschema/qa/data/eagle_schematics/eagle-import-testfile.sch b/eeschema/qa/data/eagle_schematics/eagle-import-testfile.sch
index 713ced48c8..273b2c4a2e 100644
--- a/eeschema/qa/data/eagle_schematics/eagle-import-testfile.sch
+++ b/eeschema/qa/data/eagle_schematics/eagle-import-testfile.sch
@@ -13112,6 +13112,87 @@ DIN A4, landscape with location and doc. field
+
+<b>AVR Devices</b><p>
+Configurable logic, microcontrollers, nonvolatile memories<p>
+Based on the following sources:<p>
+<ul>
+<li>www.atmel.com
+<li>CD-ROM : Configurable Logic Microcontroller Nonvolatile Memory
+<li>CadSoft download site, www.cadsoft.de or www.cadsoftusa.com , file at90smcu_v400.zip
+<li>avr.lbr
+</ul>
+<author>Revised by librarian@cadsoft.de</author>
+
+
+<B>Dual In Line</B>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>NAME
+>VALUE
+
+
+
+
+
+
+
+
+>NAME
+>VALUE
+
+
+
+
+
+
+
+
+
+
+
+
+2-wire serial <B>EEPROM</B>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -13142,6 +13223,10 @@ DIN A4, landscape with location and doc. field
+
+
+
+
@@ -13154,6 +13239,9 @@ DIN A4, landscape with location and doc. field
Bus B is present on both sheets, therefore global labels should be used
Arc test symbol.
Eagle used think lines and no line ending to emulate a filled arc. Kicad expands the arc to the necessary radius and uses a direct fill
+normal
+Smashed
+hidden name and value
@@ -13172,6 +13260,16 @@ Eagle used think lines and no line ending to emulate a filled arc. Kicad expands
+
+
+
+
+
+
+
+
+
+
diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp
index 9bc19c2c7e..afe7872616 100644
--- a/eeschema/sch_eagle_plugin.cpp
+++ b/eeschema/sch_eagle_plugin.cpp
@@ -1034,7 +1034,11 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
EPART* epart = m_partlist[einstance.part].get();
std::string gatename = epart->deviceset + epart->device + einstance.gate;
- std::string symbolname = epart->deviceset + epart->device;
+ wxString sntemp( epart->deviceset + epart->device );
+ sntemp.Replace("*", "");
+ std::string symbolname = sntemp.ToStdString();
+
+
// KiCad enumerates units starting from 1, Eagle starts with 0
int unit = m_eaglelibraries[epart->library].gate_unit[gatename];
std::string package = m_eaglelibraries[epart->library].package[symbolname];
@@ -1085,10 +1089,8 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
}
else
{
- if(epart->device.length()>0)
- component->GetField( VALUE )->SetText( epart->device );
- else if(epart->deviceset.length()>0)
- component->GetField( VALUE )->SetText( epart->deviceset );
+
+ component->GetField( VALUE )->SetText( symbolname );
}
if(part->GetField(REFERENCE)->IsVisible())
@@ -1238,6 +1240,7 @@ EAGLE_LIBRARY SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode )
EDEVICESET edeviceset = EDEVICESET( devicesetNode );
// std::cout << "Importing Eagle device set "<< edeviceset.name << std::endl;
+ wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : "" ;
NODE_MAP aDeviceSetChildren = MapChildren( devicesetNode );
wxXmlNode* deviceNode = getChildrenNodes( aDeviceSetChildren, "devices" );
@@ -1251,6 +1254,7 @@ EAGLE_LIBRARY SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode )
// Create symbol name from deviceset and device names.
wxString symbolName = wxString( edeviceset.name + edevice.name );
// std::cout << "Creating Kicad Symbol: " << symbolName.ToStdString() << '\n';
+ symbolName.Replace("*", "");
if( edevice.package )
elib.package[symbolName.ToStdString()] = edevice.package.Get();
@@ -1262,6 +1266,19 @@ EAGLE_LIBRARY SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode )
wxXmlNode* gateNode = getChildrenNodes( aDeviceSetChildren, "gates" );
int gates_count = countChildren( aDeviceSetChildren["gates"], "gate" );
kpart->SetUnitCount( gates_count );
+
+ LIB_FIELD* reference = kpart->GetField(REFERENCE);
+ if( prefix.length() ==0 )
+ {
+ std::cout << "length == 0" << '\n';
+ reference->SetVisible( false );
+ }
+ else
+ {
+ std::cout << "a prefix" << '\n';
+ reference->SetText( prefix );
+ }
+ std::cout << "after prefix" << '\n';
int gateindex;
bool ispower = false;