Commit Graph

9143 Commits

Author SHA1 Message Date
Jon Evans 5657ca5a04 No-connects might not be connected to a pin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13256
2022-12-23 20:50:49 -05:00
Jeff Young 6f44468385 Fix more lifetime issues in simulator tuning.
Fixes https://gitlab.com/kicad/code/kicad/issues/13257
2022-12-23 22:03:24 +00:00
Jeff Young 981254543a Allow line-continuations in name=value parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13255
2022-12-23 20:05:16 +00:00
Jeff Young 00fe8f0f70 Minor tuner panel layout fixes. 2022-12-23 20:04:26 +00:00
Jeff Young 8069e5d5d6 Fix sim bug running a command the first time when no command in doc.
Fixes https://gitlab.com/kicad/code/kicad/issues/11366
2022-12-23 18:21:26 +00:00
Jeff Young bfd3b40672 Bug fixes for tuning.
1) Don't save SCH_ITEM pointers in long-lived structures.  Use KIIDs
   instead.

2) Use the correct sheet for the referenced item, not the current sheet.
2022-12-23 17:40:36 +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 e2f2f3518b Minor improvements to tuner panel look & feel. 2022-12-23 17:40:36 +00:00
jean-pierre charras e5363d164c Lib symbol editor, export SVG: fix incorrect position of the drawings.
Fixes #13249
https://gitlab.com/kicad/code/kicad/issues/13249
2022-12-23 16:31:35 +01:00
Jeff Young 66eafc56bb Don't suggest we're going to cancel already-added signals. 2022-12-23 12:46:18 +00:00
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