Commit Graph

9133 Commits

Author SHA1 Message Date
Jeff Young 3f49fa5361 Don't write sim.params for library model unless we actually have overrides. 2022-12-23 12:46:18 +00:00
Jeff Young cd7be966c0 Fix typo when un-escaping parameter name. 2022-12-23 12:46:18 +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 d0d6dc6ce0 Clang-tidy warnings reduction. 2022-12-22 22:35:09 +00:00
Mike Williams 9b782fa827 Schematic: don't deselect line ends when right clicking off-selection 2022-12-22 14:16:38 -05:00
Mike Williams 8b7d0d71fb Schematic: show update/change symbols for multiple symbol selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13231
2022-12-22 14:00:51 -05:00
Jon Evans 66799b60f8 DbLib: Reconnect if connection is lost 2022-12-22 12:15:04 -05:00
Mike Williams 3037f2b444 Schematic: don't require cursor on selected net to assign netclass
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13199
2022-12-22 10:15:48 -05:00
Jeff Young 7abfa46531 Inferred sim value improvements, and a unit test for them. 2022-12-21 17:03:49 +00:00
Jeff Young e64852c833 Clearer naming. 2022-12-21 17:03:46 +00:00
Jeff Young e7e3f3bced SIM_MODEL code simplification.
1) Reduce API surface.
2) Prefer for(int) loops when what we're looking for is the index of
   the item to be found
3) Move "_" escape processing to SIM_MODEL_NGSPICE (which is the only
   model which uses the escape mechanism)
2022-12-21 17:01:58 +00:00
jean-pierre charras 8e4911bba2 Simulation: make a few errors thrown from PEGTL a bit more understandable. 2022-12-20 18:54:14 +01:00
Mike Williams 093c0c2c98 Schematic: add simulation button to toolbar
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2331
2022-12-20 08:56:36 -05:00
Mike Williams fc054bda8e Schematic: fix edit symbol assert
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13197
2022-12-20 08:23:02 -05:00
Jeff Young 97010b598d Update all units when a schematic symbol is edited in the Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/13208
2022-12-19 23:09:13 +00:00
Mike Williams 389f0655cd Schematic: re-enable old break wire functionality, add slice
Also fix break/slice wires for multiple wires. The shortcut and code
always allowed it, the context menu just didn't appear.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13163
2022-12-19 15:55:59 -05:00
Jeff Young 8db015bc0f Accept thousands separators in inferred values. 2022-12-19 20:05:54 +00:00
Jeff Young 58ce0bb804 Simulation bug fixes.
1) Use C-locale when converting output of parsers to strings.

2) InferSimModel() must run on local copy of fields, not the fields in
the symbol (which might be different if they've already been edited in
the Symbol Properties Dialog, for instance).

3) InferSimModel() should accept a deviceType already set to RLC.

4) Don't output trailing decimal separators if there's no fraction.
2022-12-19 18:14:13 +00:00
Jeff Young cbb70f0da1 Formatting and CLang-Tidy warning reduction. 2022-12-19 13:51:49 +00:00
Jeff Young 113fd83fdd Fix Clang-tidy warnings. 2022-12-19 13:19:21 +00:00
Jeff Young ebcc1ac062 Use current cursorPos when creating sheet pins.
Fixes https://gitlab.com/kicad/code/kicad/issues/13206
2022-12-19 12:27:55 +00:00
Jeff Young a3a2e2e5b1 Update demos and legacy qa files SpiceMapping -> Spice_Node_Sequence.
Also removes migration in the code as it will no longer be needed.
2022-12-19 12:04:53 +00:00
Jeff Young 04f50ce687 Generate default pinMap from symbol's pins when we don't know SIM_MODEL's pins. 2022-12-19 11:40:52 +00:00
Jeff Young df8eb59854 Don't use SPICE_MODEL_SUBCKT::CreatePins to crate a default pinMap.
(It creates a fully-unconnected map on the premise that it's easier
to add a pinMap than to edit one.  This is probably no longer true
now that you don't have to un-assign a pin before re-assigning it.)
2022-12-19 11:40:52 +00:00
Jeff Young 1ce6cd6d4d Naming clarity. 2022-12-19 01:51:24 +00:00
Jeff Young 7433322778 Handle a couple more legacy formats found in legacy_sallen_key demo. 2022-12-19 01:47:23 +00:00
Jeff Young b06c245b8f Don't double-add DC parameters.
(Remember that DC's inlineTypeString used to be "".)
2022-12-19 01:19:55 +00:00
Jeff Young 7192c565b8 Add simple VI model inference. 2022-12-18 22:54:12 +00:00
jean-pierre charras a9acb2e215 Fix incorrect format in a wxString::Format() 2022-12-18 20:30:15 +01:00
Ian McInerney 618347ef50 Regenerate ibis dialog to remove unused sizer from header
It appears the dialog had already been updated to remove it from the
formbuilder project and the cpp file, but the header wasn't checked in
at the same time.
2022-12-17 23:37:24 +00:00
Ian McInerney 2f8cc194c1 Initialize variables inside file dialog customizer classes 2022-12-17 23:37:24 +00:00
Ian McInerney 0bd39516c4 Cleanup eeschema save as extra control creation to match pcbnew 2022-12-17 23:37:24 +00:00
Jeff Young 8324c0b0cc Fix event order bugs in Sim Model Editor dialog.
onParamGridChanged was firing before CommitPendingChanges which meant
the edited value didn't get saved if the editor was still open when
OK was clicked.
2022-12-17 22:33:00 +00:00
Jeff Young 321de57d7c Bug fixes for simulator.
1) Finish removing pin-count based APIs.  We need to know the pin names
as well, not just the count.

2) Fix a bug in the regexp for SPICE functions to allow both lowercase
and uppercase function names

3) Move CreatePins() overrides to the new API so that we get pins on
raw SPICE models.

Fixes https://gitlab.com/kicad/code/kicad/issues/13190
2022-12-17 20:29:24 +00:00
Jeff Young 6b70c679cf Migrate more V6 SPICE syntax to V7.
Also fixes various bugs if symbols contained non-indexed pin numbers.
We really need to know the actual pin names when creating models, rather
than just assuming 1, 2... etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/13183
2022-12-17 15:23:51 +00:00
Jeff Young 09302296f4 Use SCH_SHEET_PATH interface to get page numbers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13021
2022-12-16 22:49:42 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 65552df6ce Quite Coverity. 2022-12-16 19:11:34 +00:00
Jeff Young dba3c589d0 More bug fixes for escaped model parameters.
Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....More bug fixes for escaped model parameters.

Note that this whole escaping thing seems like a bad idea to me, but
I don't fully understand the difference between model parameters and
instance parameters so I don't know if there's a better way to handle
it or not....

Fixes https://gitlab.com/kicad/code/kicad/issues/13179
2022-12-16 16:34:41 +00:00
Jeff Young 08a8a20794 Sort pins in numeric order before attempting to match to SPICE model.
Fixes https://gitlab.com/kicad/code/kicad/issues/13164
2022-12-16 14:18:44 +00:00
Jeff Young 24786fe0e9 Fix multi-unit symbol bugs.
1) SPICE pins need to include all units
2) Already-seen-unit-x needs to be reset when getting netlist again.

Fixes https://gitlab.com/kicad/code/kicad/issues/13164
2022-12-16 13:57:46 +00:00
jean-pierre charras 89153ca75a Eeschema: fix incorrect calculation of unit id in reference: U1.A was shown as U1A.
Fixes #13178
https://gitlab.com/kicad/code/kicad/issues/13178
2022-12-16 11:48:26 +01:00
Seth Hillbrand 6d5a9153ab Move resolve function to general usage
Libraries are created multiple times, so we need to resolve the library
locations each time

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
2022-12-15 15:34:48 -08:00
Seth Hillbrand e91c039ed3 Prevent event stackup when init pages
The paged book initialization (and others) can generate events,
re-laying out the whole dialog multiple times during initialization.
This halts events during the layout period

Fixes https://gitlab.com/kicad/code/kicad/issues/13158
2022-12-15 11:39:03 -08:00
Jeff Young a41f27a022 Silence Coverity. 2022-12-15 18:14:19 +00:00
Seth Hillbrand bb7682f913 Resolve using env/project if lib isn't found
Relative include commands resolve in the following order:

1. local to the file from which they are included
2. local to the project
3. local to the SPICE_LIB_DIR directory

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
2022-12-15 09:41:25 -08:00
Wayne Stambaugh 84f927d057 Schematic import bug fix.
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic.  This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic.  This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues.  This bug does not apply when opening
the full project.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11076
2022-12-15 09:58:39 -05:00
Jeff Young 1e812b8b69 Remove selection from grid before deleting rows. 2022-12-15 14:40:57 +00:00
Jeff Young a8e73cf92c Check for model existence in library. 2022-12-15 14:25:25 +00:00
Jeff Young 5ef9fbdd19 Fix broken loop logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/13168
2022-12-15 14:22:03 +00:00