Jeff Young
c80eb44900
Disentangle IBIS model controls from built-in model controls.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13855
2023-09-17 12:42:06 +01:00
Jeff Young
ede542f911
Collect comment lines into following spice unit.
...
This can't distinguish a header block comment in front of a file
with multiple spice units, and so will include that into the first
unit only.
Also fixes the pin assignments reference textbox to use a
fixed-width font as many .subckt's contain ASCII graphics for
pin definitions (not that it helps any with the test case from
the given bug).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15660
2023-09-15 20:08:45 +01:00
Jeff Young
7a2a2e2df0
Remove error-prone SetReporter() API.
2023-09-06 11:37:50 +01:00
Alex Shvartzkop
ee2f954bbe
Revert "Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow."
...
This reverts commit 26f398a4b1
.
2023-09-06 08:02:01 +03:00
Marek Roszko
4fe7c7a902
Prevent crash trying to load missing spice lib
2023-09-05 21:13:29 -04:00
Jeff Young
30a6d33177
Better fix for primary param in value field with other params in params field.
...
(Replaces 2c8178829982c6e15e443b5a7868b8c953d5126f.)
2023-08-30 00:53:01 +01:00
Jeff Young
f6a901f84a
Attempt to fix ctrl-enter from parameter grid on MSW.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15244
2023-08-29 00:09:18 +01:00
Jeff Young
2c81788299
HasAutofill should not preclude a primary parameter in the value field
2023-08-28 17:44:45 +01:00
Alex Shvartzkop
26f398a4b1
Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow.
...
It could've been set to point to local variable "reporter" in loadLibrary.
Fixes KICAD-15C
2023-08-25 20:59:56 +03:00
Seth Hillbrand
db8e15ce88
Require wxWidgets 3.2
...
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Fabien Corona
886a7c2c04
ADDED: S-parameters simulation
2023-07-04 16:01:12 +00:00
jean-pierre charras
a29f261d31
dialog_sim_model: ensure the Model panel is always correctly built.
...
Fixes #14904
https://gitlab.com/kicad/code/kicad/-/issues/14904
2023-06-12 16:41:21 +02:00
Jeff Young
102d61ed39
Terminology cleanup.
2023-05-20 21:04:39 +01:00
Jeff Young
58f4943597
ADDED voltage- & current-controlled voltage & current sources
...
Added GUI support for ngspice VCVS, VCCS, CCVS and CCCS.
2023-05-20 21:04:39 +01:00
Jeff Young
fdcc97e604
De Morgan conversions are equivalences, not additional items to simulate.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14230
2023-05-09 18:09:15 +01:00
Jeff Young
69500bfcaa
LTSpice schematic import based on the work of Chetan Shinde.
2023-04-24 13:52:52 +01:00
Ian McInerney
6c05801d9e
Make the property grid compatible with wx 3.3
2023-04-12 18:57:12 +01:00
Jeff Young
1788db53e5
Don't complain about no sim model when running Sim Model Editor dialog.
...
Also removes some atrophied code, and makes sure changes to the parameter
grid for raw spice models gets saved.
2023-03-25 20:22:04 +00:00
Jeff Young
6d296038f3
Improve simulation error reporting.
...
1) More REPORTER, less exception processing
2) Remove UI calls from SPICE_MODEL
3) Don't replace netlist with errors; show both
4) Don't bail out of netlist generation after single error
Fixes https://gitlab.com/kicad/code/kicad/issues/14295
2023-03-16 16:12:29 +00:00
Mike Williams
b32ba16da4
UI: Add Numpad Enter as "Return" equivalent in missing places
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young
7547e550aa
Use name (even for fallback models) *if* it's specified in dropdown.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12425
2023-03-06 11:17:39 +00:00
Wayne Stambaugh
4e99812145
Coverity fixes and code cleaning.
2023-03-04 13:02:05 -05:00
Jeff Young
d1b7fa6b0f
Slight improvement to property grid col widths in SME.
2023-03-04 00:10:01 +00:00
Jeff Young
281fde71b9
Make SIM_MODEL_SPICE_FALLBACK act more like the model it's a fallback for.
...
In particular, install/show the parameters, and keep the existing name
field.
Fixes https://gitlab.com/kicad/code/kicad/issues/14102
2023-02-28 12:26:04 +00:00
Jeff Young
2e5bf0210a
Clear model name when switching to internal model.
...
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 15:22:20 +00:00
Jeff Young
c188318174
Change strategy for committing values from SIM_MODEL propGrid.
...
Note that the PCB editor's propGrid doesn't seem to need this workaround,
but I haven't yet figured out what's different between it and the sim model
propGrid.
Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-02-24 14:22:00 +00:00
Jeff Young
200a06a677
Cleanup some dead code, and add a potentially needed fix for non-Mac.
...
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)
2023-02-24 12:44:55 +00:00
Jeff Young
68fe146861
Remove most of SIM_VALUE in favour of good old wxString.
...
This allows us to save the user's intent, including units, formatting,
and crucially variable references.
2023-02-22 10:45:27 +00:00
Jeff Young
90adc26b73
Remove dead and redundant code.
2023-02-22 10:45:27 +00:00
Jeff Young
64f1808d60
Don't use the just-in-time model resolver when updating the dialog.
...
If it changes in the middle it will leave you in a world of hurt.
Also don't update the library after a loss-of-focus unless the path
really changed.
Fixes https://gitlab.com/kicad/code/kicad/issues/13869
Fixes https://gitlab.com/kicad/code/kicad/issues/13854
2023-02-15 00:31:04 +00:00
Jeff Young
df00585a55
ReadDataFields must be a separate step from Create.
...
Create() is done without execption processing, while ReadDataFields
should have exception processing.
(This also fixes a case where exception processing on ReadDataFields
was missing.)
Also fixes a bug where the pinSelect menu wasn't checked for -1 before
fetching.
Fixes https://gitlab.com/kicad/code/kicad/issues/13856
2023-02-13 12:43:25 +00:00
Jeff Young
f0bd25b397
ADDED use-settable simulation trace colors.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2536
2023-02-11 21:11:07 +00:00
Jeff Young
9be872a85a
Better bounds checking for DIALOG_SIM_MODEL::curModel().
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13767
2023-02-04 20:16:50 +00:00
Jeff Young
f588da2bef
Bounds checking for DIALOG_SIM_MODEL::curModel().
2023-02-04 19:17:13 +00:00
Jeff Young
27109bfc8a
MRU path for simulation model libraries.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13581
2023-01-20 00:18:55 +00:00
Jeff Young
87377d1aac
Stop stepping on user's data.
...
Just because we can't find the file doesn't mean the path to it has
no value. Don't delete it. And don't crash afterwards either.
Fixes https://gitlab.com/kicad/code/kicad/issues/13578
2023-01-18 13:50:40 +00:00
Jeff Young
3af9c658e6
Don't specify fonts in wxFormBuilder. It only leads to pain.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-18 12:28:07 +00:00
Marek Roszko
d2c0f5fc2a
More wxSing
2023-01-16 23:14:38 -05:00
Jeff Young
4c5a344629
Allow editing of raw SPICE models through code tab.
2023-01-14 02:43:34 +00:00
Jeff Young
52163c7b31
Hold off on one-library-per-SIM_LIB_MGR. It's too risky for 7.0.
2023-01-12 16:29:51 +00:00
Jeff Young
d839f11d49
Rip out parsing of SPICE libraries for netlisting.
...
We only need to parse the libraries for the Sim Model Editor dialog
(so that we can determine the models to put in the popup). Doing it
for netlisting just opens us up to incorrectly parsing the SPICE, and
returns no value.
This also means that a SIM_LIB_MGR manages a single library, and
never multiple libraries.
This also allows the tidying-up of some error reporting structures to
better inform the user what went wrong.
Fixes https://gitlab.com/kicad/code/kicad/issues/13431
2023-01-12 14:51:03 +00:00
Jeff Young
7af718f1a5
Don't use std::string for things with wxString APIs.
...
It's too bug-prone.
Fixes https://gitlab.com/kicad/code/kicad/issues/13380
2023-01-05 14:16:39 +00:00
Jeff Young
9583b28063
Fix store-in-value bugs.
...
1) Always honour the dialog checkbox value.
2) Don't expect the absence of the primary parameter in Sim.Params to
mean that Value stores it. It might be the default parameter value.
3) Update spiceTypeInfo when matching legacy data to an internal model.
4) Initialize the store-in-value checkbox depending on whether or not
we found the primary parameter in the Value field.
2023-01-03 17:20:23 +00:00
Jeff Young
9b9795a87d
Reduce reliance on exception processing -- it's waay too bugy at present.
...
This moves some stuff to REPORTER APIs. Moving more stuff would be good,
but it probably too high-risk at present. We'll wait for 8.0 for that....
Fixes https://gitlab.com/kicad/code/kicad/issues/13359
2023-01-03 17:20:23 +00:00
Jeff Young
55b8f0bc00
Gracefully fall back to raw spice when we can't parse the data.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13329
2022-12-31 18:52:26 +00:00
Jeff Young
77b361a077
Add reference material to SPICE model pin assignment tab.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13309
2022-12-31 18:52:26 +00:00
Jeff Young
a3fcc8bbf7
Move Exclude from Simulation to Symbol Properties.
...
Also brings the layout of Symbol Properties for Symbol Editor more in
line with Symbol Properties for Schematic Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/13299
2022-12-28 13:44:13 +00:00
Jeff Young
604d7a72d6
Fix bug in tuning when value is stored in Value field.
2022-12-23 17:40:36 +00:00
Jeff Young
7f60b87d1d
Implement fallback models for SPICE .lib models that we can't parse.
2022-12-22 22:35:09 +00:00
Jeff Young
e64852c833
Clearer naming.
2022-12-21 17:03:46 +00:00