kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #42275
[PATCH] SPICE .option confused with .op simulation
Hi all,
If user wants to add custom SPICE options on schematic, for example
.option TEMP=60
.option TNOM=27
It will get confused with .op simulation and will be included on
DIALOG_SIM_SETTINGS in custom simulation directive text field.
Eventually simulation will fail.
Please find the patch attached, where this issue is prevented.
Best regards,
Sylwester
From 96dd3e764cf1a949f6720158c4c97bced6c6fe76 Mon Sep 17 00:00:00 2001
From: Sylwester Kocjan <s.kocjan@xxxxx>
Date: Sat, 19 Oct 2019 21:33:43 +0200
Subject: [PATCH] eeschema: fixed recognizing SPICE sim directive
---
eeschema/sim/netlist_exporter_pspice_sim.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eeschema/sim/netlist_exporter_pspice_sim.cpp b/eeschema/sim/netlist_exporter_pspice_sim.cpp
index a7ab32470..45aeba85a 100644
--- a/eeschema/sim/netlist_exporter_pspice_sim.cpp
+++ b/eeschema/sim/netlist_exporter_pspice_sim.cpp
@@ -119,9 +119,9 @@ SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::GetSimType()
SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType( const wxString& aCmd )
{
const std::map<wxString, SIM_TYPE> simCmds = {
- { ".ac", ST_AC }, { ".dc", ST_DC }, { ".disto", ST_DISTORTION }, { ".noise", ST_NOISE },
- { ".op", ST_OP }, { ".pz", ST_POLE_ZERO }, { ".sens", ST_SENSITIVITY }, { ".tf", ST_TRANS_FUNC },
- { ".tran", ST_TRANSIENT }
+ { ".ac ", ST_AC }, { ".dc ", ST_DC }, { ".disto ", ST_DISTORTION }, { ".noise ", ST_NOISE },
+ { ".op ", ST_OP }, { ".pz ", ST_POLE_ZERO }, { ".sens ", ST_SENSITIVITY }, { ".tf ", ST_TRANS_FUNC },
+ { ".tran ", ST_TRANSIENT }
};
wxString lcaseCmd = aCmd.Lower();
--
2.23.0
Follow ups