Eeschema Eagle Import: Fix power symbol import. - Set pins to power in to match current power supply symbols. - Change IsPowerConnection() to match POWER_IN pins from power symbols as well.
This commit is contained in:
parent
d4201ef51f
commit
aeb43b055c
|
@ -37,6 +37,7 @@ class SCH_COMPONENT;
|
||||||
|
|
||||||
#include "pin_shape.h"
|
#include "pin_shape.h"
|
||||||
#include "pin_type.h"
|
#include "pin_type.h"
|
||||||
|
#include "class_libentry.h"
|
||||||
|
|
||||||
// Circle diameter drawn at the active end of pins:
|
// Circle diameter drawn at the active end of pins:
|
||||||
#define TARGET_PIN_RADIUS 12
|
#define TARGET_PIN_RADIUS 12
|
||||||
|
@ -362,7 +363,13 @@ public:
|
||||||
* Return whether this pin forms an implicit power connection: i.e., is hidden
|
* Return whether this pin forms an implicit power connection: i.e., is hidden
|
||||||
* and of type POWER_IN.
|
* and of type POWER_IN.
|
||||||
*/
|
*/
|
||||||
bool IsPowerConnection() const { return !IsVisible() && GetType() == PIN_POWER_IN; }
|
bool IsPowerConnection() const {
|
||||||
|
|
||||||
|
return (
|
||||||
|
( !IsVisible() && GetType() == PIN_POWER_IN )
|
||||||
|
||
|
||||||
|
( (LIB_PART*)GetParent()->IsPower() && GetType() == PIN_POWER_IN )
|
||||||
|
) ; }
|
||||||
|
|
||||||
int GetPenSize() const override;
|
int GetPenSize() const override;
|
||||||
|
|
||||||
|
|
|
@ -1301,7 +1301,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
|
||||||
if(wxString(*ePin.direction).Lower()== "sup")
|
if(wxString(*ePin.direction).Lower()== "sup")
|
||||||
{
|
{
|
||||||
ispower = true;
|
ispower = true;
|
||||||
pin->SetType(PIN_POWER_OUT);
|
pin->SetType(PIN_POWER_IN);
|
||||||
}
|
}
|
||||||
else if(wxString(*ePin.direction).Lower()== "pas")
|
else if(wxString(*ePin.direction).Lower()== "pas")
|
||||||
{
|
{
|
||||||
|
@ -1373,6 +1373,8 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode,
|
||||||
{
|
{
|
||||||
pin->SetPartNumber( gateNumber );
|
pin->SetPartNumber( gateNumber );
|
||||||
pin->SetUnit( gateNumber );
|
pin->SetUnit( gateNumber );
|
||||||
|
wxString stringPinNum = wxString::Format(wxT("%i"),pincount);
|
||||||
|
pin->SetPinNumFromString(stringPinNum);
|
||||||
aPart->AddDrawItem( pin.release() );
|
aPart->AddDrawItem( pin.release() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue