diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.cpp b/eeschema/sch_plugins/altium/altium_parser_sch.cpp index c7afd2f09f..4c07e65eae 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.cpp +++ b/eeschema/sch_plugins/altium/altium_parser_sch.cpp @@ -74,8 +74,15 @@ ASCH_PIN::ASCH_PIN( const std::map& aProperties ) text = ALTIUM_PARSER::PropertiesReadString( aProperties, "TEXT", "" ); designator = ALTIUM_PARSER::PropertiesReadString( aProperties, "DESIGNATOR", "" ); + int symbolOuterInt = ALTIUM_PARSER::PropertiesReadInt( aProperties, "SYMBOL_OUTER", 0 ); + symbolOuter = static_cast( symbolOuterInt ); + + int symbolInnerInt = ALTIUM_PARSER::PropertiesReadInt( aProperties, "SYMBOL_INNER", 0 ); + symbolInner = static_cast( symbolInnerInt ); + int symbolOuterEdgeInt = ALTIUM_PARSER::PropertiesReadInt( aProperties, "SYMBOL_OUTEREDGE", 0 ); - symbolOuterEdge = ( symbolOuterEdgeInt >= 0 && symbolOuterEdgeInt <= 1 ) ? + symbolOuterEdge = ( symbolOuterEdgeInt == 0 || symbolOuterEdgeInt == 1 + || symbolOuterEdgeInt == 4 || symbolOuterEdgeInt == 17 ) ? static_cast( symbolOuterEdgeInt ) : ASCH_PIN_SYMBOL_OUTEREDGE::UNKNOWN; diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.h b/eeschema/sch_plugins/altium/altium_parser_sch.h index 9ecf12a430..ccf66cf9f7 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.h +++ b/eeschema/sch_plugins/altium/altium_parser_sch.h @@ -93,11 +93,44 @@ struct ASCH_COMPONENT }; +enum class ASCH_PIN_SYMBOL_OUTER +{ + UNKNOWN = -1, + NO_SYMBOL = 0, + RIGHT_LEFT_SIGNAL_FLOW = 2, + ANALOG_SIGNAL_IN = 5, + NOT_LOGIC_CONNECTION = 6, + DIGITAL_SIGNAL_IN = 25, + LEFT_RIGHT_SIGNAL_FLOW = 33, + BIDI_SIGNAL_FLOW = 34 +}; + + +enum class ASCH_PIN_SYMBOL_INNER +{ + UNKNOWN = -1, + NO_SYMBOL = 0, + POSPONED_OUTPUT = 8, + OPEN_COLLECTOR = 9, + HIZ = 10, + HIGH_CURRENT = 11, + PULSE = 12, + SCHMITT = 13, + OPEN_COLLECTOR_PULL_UP = 22, + OPEN_EMITTER = 23, + OPEN_EMITTER_PULL_UP = 24, + SHIFT_LEFT = 30, + OPEN_OUTPUT = 32 +}; + + enum class ASCH_PIN_SYMBOL_OUTEREDGE { - UNKNOWN = -1, - NO_SYMBOL = 0, - NEGATED = 1, + UNKNOWN = -1, + NO_SYMBOL = 0, + NEGATED = 1, + LOW_INPUT = 4, + LOW_OUTPUT = 17 }; @@ -142,6 +175,9 @@ struct ASCH_PIN wxString text; wxString designator; + ASCH_PIN_SYMBOL_OUTER symbolOuter; + ASCH_PIN_SYMBOL_INNER symbolInner; + ASCH_PIN_SYMBOL_OUTEREDGE symbolOuterEdge; ASCH_PIN_SYMBOL_INNEREDGE symbolInnerEdge; diff --git a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp index 1e1f363b45..5e424a5ac0 100644 --- a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp +++ b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp @@ -555,6 +555,22 @@ void SCH_ALTIUM_PLUGIN::ParsePin( const std::map& aPropertie break; } } + else if( elem.symbolOuterEdge == ASCH_PIN_SYMBOL_OUTEREDGE::LOW_INPUT ) + { + switch( elem.symbolInnerEdge ) + { + case ASCH_PIN_SYMBOL_INNEREDGE::CLOCK: + pin->SetShape( GRAPHIC_PINSHAPE::CLOCK_LOW ); + break; + default: + pin->SetShape( GRAPHIC_PINSHAPE::INPUT_LOW ); + break; + } + } + else if( elem.symbolOuterEdge == ASCH_PIN_SYMBOL_OUTEREDGE::LOW_OUTPUT ) + { + pin->SetShape( GRAPHIC_PINSHAPE::OUTPUT_LOW ); + } else { switch( elem.symbolInnerEdge )