Commit Graph

264 Commits

Author SHA1 Message Date
Jeff Young aa78abc649 Manual reimplementation of 84c72b087c
(cherry picked from commit 7cc55d2d3a)
2023-05-28 19:38:27 +02:00
Seth Hillbrand e2c0c6362f Revert "Manual reimplementation of 84c72b087c548829908d7fbbecfd2fa5968cc98b"
This reverts commit 7cc55d2d3a.
2023-05-24 08:54:16 -07:00
Jeff Young 7cc55d2d3a Manual reimplementation of 84c72b087c 2023-05-23 09:40:32 +01:00
jean-pierre charras a72fd0ebdd Simulator: Ensure connectivity is up to date (incremental mode) before building netlist
also: SIM_PLOT_FRAME::onShowNetlist(): verify all symbols are annotated.
2023-05-18 10:45:52 +02:00
Jon Evans b0b9e66fad Move to requiring explicit action to save project settings
(cherry picked from commit 610e787ada)

Fixes https://gitlab.com/kicad/code/kicad/issues/14414
2023-03-24 11:49:50 -07:00
Jeff Young 1dc9583e06 Don't attempt to load unknown plot types. 2023-03-20 10:24:22 +00:00
Jeff Young 7f6cb9b07b 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.

(cherry picked from commit 68fe146861)
2023-02-24 20:47:22 +00:00
Jeff Young 123467c8dd Don't throw up debug message when signal is deleted.
Fixes https://gitlab.com/kicad/code/kicad/issues/13711
2023-01-30 21:32:18 +00:00
Jeff Young 4e50c5313d More safety for array access.
Fixes https://gitlab.com/kicad/code/kicad/issues/13583
2023-01-24 00:07:40 +00:00
Seth Hillbrand 4d7ddf619a Remove unused var and cleanup 2023-01-20 13:26:11 -08:00
Wayne Stambaugh ee3e285393 Correctly parent simulator netlist error dialogs. 2023-01-19 07:59:30 -05:00
Jeff Young 0e778f17db Add context menu for simulation cursors.
Fixes https://gitlab.com/kicad/code/kicad/issues/13580
2023-01-19 12:50:21 +00:00
Stefan Brüns 1df81b10e6 Explicitly convert std::string to wxString
In wxWidgets STL builds the compiler has multiple, ambigous choices
for converting - both arguments to std::string first, or just the
first to wxString.

Fixes #13432.
2023-01-14 22:58:54 +00:00
Jeff Young 098d2b30a2 Support for simulation options in workbook and simulation command dlg.
Fixes https://gitlab.com/kicad/code/kicad/issues/13524

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13431
2023-01-14 00:21:45 +00:00
Jeff Young 7fbad183db Gracefully handle Quit when simulator window is open. 2023-01-13 16:35:45 +00:00
Jeff Young 4391fc7a7a Don't be annoying about refusing to create traces when there's no data. 2023-01-13 16:35:45 +00:00
Jeff Young ef6001bfe6 Use consistent terminology: opposite of Add is Remove.
Note: violating string freeze because this change should ease translation,
not make it harder.
2022-12-28 10:40:23 +00:00
Jeff Young e11d39b0f2 If magnitude or phase is specified, don't add both.
Fixes https://gitlab.com/kicad/code/kicad/issues/13202
2022-12-28 10:40:23 +00:00
Jeff Young 80f3abe082 Event safety.
Sentry crash probably happens when an update title event fires either
too early or too late to have a simulator or simulator settings.

Sentry issue https://sentry.io/organizations/kicad/issues/3669444623/events/fce0179f7d5e4ff3a7dbb0d90a0570b4/
2022-12-26 20:33:04 +00:00
Jeff Young bf1c4e7bcd Allow translation of simulation error messages. 2022-12-24 11:30:56 +00: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 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 77998d7c51 Better fix for not selecting all of netlist. 2022-12-14 14:13:25 +00:00
Jeff Young 13d9b061ee Don't select all of netlist when showing it in simulator. 2022-12-14 13:36:29 +00:00
Jeff Young 50ccc4e6da Fix issue converting legacy SPICE models.
1) if a legacy model references a library then we need to see if said
   libraray exists and read model from it if so
2) legacy node ordering is by index, not pin name
3) we can't auto-generate a pin map when we don't know the pin names,
   so don't try
2022-12-14 13:36:28 +00:00
Jeff Young 419fe236ad Fix logic error in parsing sim command, and DC source types in dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/9064
2022-12-11 23:12:55 +00:00
Jeff Young 9c129ed03f More dialog adjustments for wx 3.2. Also renames files to match dialog. 2022-12-11 15:49:29 +00:00
Jeff Young 56aae7a147 Reduce compiler warnings. 2022-12-11 13:39:59 +00:00
Jeff Young 3581a9773f Move simulator settings disposal earlier so it happens before parent.
Fixes https://gitlab.com/kicad/code/kicad/issues/12370
2022-12-11 01:32:20 +00:00
Jeff Young bb6544914e Bring simulator file menu commands more in line with rest of Kicad. 2022-12-08 23:57:42 +00:00
Jon Evans 5251ea6f27 Prevent crash on exit due to simulator settings being double freed 2022-12-07 21:04:49 -05:00
Jeff Young 4872dd7238 Don't put empty lines in the workbook.
Fixes https://gitlab.com/kicad/code/kicad/issues/12299
2022-12-07 11:39:47 +00:00
Jeff Young f8e0a272c0 Remove a bunch of 'auto'. 2022-12-06 16:01:18 +00:00
Fabien Corona 4c76082f77 "Sim Params/Settings" -> "Sim Command"
The window only really sets the simulation command.
In the future, we might want a simulation setting window with things such as SPICE optimizations.
2022-12-05 23:12:04 +00:00
Jeff Young 8e4cd1e1a6 Check for sheet directive changes when running simulations.
Fixes https://gitlab.com/kicad/code/kicad/issues/10486
2022-12-05 20:03:42 +00:00
Jeff Young b7d41e0e56 Update simulator with NUMERIC_EVAL, decimal separator processing, etc.
Also includes fixes for instance data and resolving of textvar
references.

Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.

Fixes https://gitlab.com/kicad/code/kicad/issues/12357
2022-12-05 12:40:29 +00:00
Jeff Young e09e521162 Remove GUI calls from netlisting. 2022-11-18 15:29:16 +00:00
jean-pierre charras b9ac486000 simulator: remove unused includes, and reorder a few includes to fix conflicts
Conflicts happen only on msys2 with wxWidgets 3.0. But this minor reorder
allows me to test Kicad compilation with "old" wxWidgets, used on Linux.
2022-11-16 10:09:54 +01:00
jean-pierre charras 7c9f3981ef Revert "Reorder includes is some simulator files to fix issues on msys2 (no code change)"
This reverts commit 78e45fa1b9.
Looks like it creates a compil issue on MSVC
2022-11-12 20:47:36 +01:00
jean-pierre charras 78e45fa1b9 Reorder includes is some simulator files to fix issues on msys2 (no code change)
Due to pegtl.hpp included in some files, reordering include fix some conflicts:
wxWidgets files must be included before pegtl.hpp, to compile with wxWidgets 3.0
I sometimes use wxWidgets 3.0 for debugging purposes.
2022-11-12 19:54:26 +01:00
Jeff Young ece752d5a2 Move annotation error reporting to preflight before simulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/9220
2022-11-08 12:13:15 +00:00
Jeff Young 5af506777c Formatting and wxT 2022-11-08 12:13:15 +00:00
Mikolaj Wielgus e8762da4f4 Revert "Support for variable references in SPICE models."
This reverts commit 95ebfeeed1.
This reverts commit 672ce650a9.
2022-11-07 19:37:40 +01:00
Jeff Young 95ebfeeed1 Support for variable references in SPICE models.
Also fixes a couple of bugs where sheet instance data wasn't being
handled correctly.
2022-11-07 10:57:34 +00:00
Mikolaj Wielgus 9b6cc6c505 Sim: Fix tuners 2022-10-24 11:04:47 +02:00
jean-pierre charras 63002cec57 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 12:50:26 +02:00
Mikolaj Wielgus 958bd1897d Sim: Add potentiometer model 2022-10-22 04:33:52 +02:00
Mikolaj Wielgus 952f3da53f Sim: Only set sim command if the sheet sim command is different 2022-10-19 03:02:32 +02:00
Mikolaj Wielgus f68df09696 Sim: Fix analysis set from GUI 2022-10-19 02:32:50 +02:00