Browse Source

Allow common greek letters in passive regex

Adds common letters (µ and Ω) as prefix and unit

Fixes https://gitlab.com/kicad/code/kicad/issues/11289

(cherry picked from commit 15fe2f2fd0)
7.0
Seth Hillbrand 4 years ago
parent
commit
5d5a2f9270
  1. 4
      eeschema/netlist_exporters/netlist_exporter_pspice.cpp

4
eeschema/netlist_exporters/netlist_exporter_pspice.cpp

@ -241,12 +241,12 @@ wxString NETLIST_EXPORTER_PSPICE::GetSpiceFieldDefVal( SPICE_FIELD aField, SCH_S
wxString value = aSymbol->GetField( VALUE_FIELD )->GetShownText();
// Is it a passive component?
if( aCtl & NET_ADJUST_PASSIVE_VALS && ( prim == 'C' || prim == 'L' || prim == 'R' ) )
if( ( aCtl & NET_ADJUST_PASSIVE_VALS ) && ( prim == 'C' || prim == 'L' || prim == 'R' ) )
{
// Regular expression to match common formats used for passive parts description
// (e.g. 100k, 2k3, 1 uF)
wxRegEx passiveVal(
"^([0-9\\. ]+)([fFpPnNuUmMkKgGtT]|M(e|E)(g|G))?([fFhH]|ohm)?([-1-9 ]*)$" );
wxT( "^([0-9\\. ]+)([fFpPnNuUmMkKgGtTμµ𝛍𝜇𝝁 ]|M(e|E)(g|G))?([fFhHΩΩ𝛀𝛺𝝮]|ohm)?([-1-9 ]*)$" ) );
if( passiveVal.Matches( value ) )
{

Loading…
Cancel
Save