Commit Graph

101 Commits

Author SHA1 Message Date
Jeff Young 0b58fdb910 Use KIUI to specify the simulation plot axis fonts.
Also fixes a bug in generating the x-axis for the first trace.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14997
2023-06-19 22:53:08 +01:00
Jeff Young 9199d7a781 Update simulation results as the sim runs.
Also adds a time axis which grows by 2X at a time rather than to the
size of the current data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11255
2023-06-18 16:52:11 +01:00
Jeff Young 5c4ca9f092 Renaming to support potential future usage of SIMULATOR_PANEL as a panel within SIMULATOR_FRAME. 2023-06-15 17:39:10 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
Jeff Young b6d0b65261 Naming conventions and commenting. No functional changes. 2023-03-04 00:10:01 +00:00
Jeff Young 63a545ebfd We don't need "(gain)" or "(phase)" in names any more.
Fixes https://gitlab.com/kicad/code/kicad/issues/14140
2023-03-02 00:38:39 +00:00
Jeff Young 766b1a1ca8 Continue rationalisation of vector, trace and signal names.
Also add a little bit more code so user-defined signals can be edited
without resetting their properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/14072
2023-02-27 21:11:31 +00:00
Jeff Young beb177fa79 Try and sort out the mess that is trace names and trace titles.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-26 18:08:42 +00:00
Jeff Young 23c1a23faf Provide power axis for DC-sweep analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14087
2023-02-25 23:11:29 +00:00
Fabien Corona f2419e9e9b sim - Fix power graphs 2023-02-22 13:18:12 +01:00
Jeff Young 6fcb95b24e ADDED user-defined signals. 2023-02-21 13:32:01 +00:00
Jeff Young 1e756dbdd8 Save cursor positions in sim workbook. 2023-02-12 20:40:23 +00:00
Jeff Young 83dd06e5d1 Allow opening of workbook when simulation frame is opened.
This involved splitting creation of traces from setting of trace
data.

Also renamed SIM_WORKBOOK to SIM_NOTEBOOK.  This class is a subclass
of wxAiuNotebook and represents the collection of simulation plot tabs.
It is NOT the same thing as a simulation workbook, which contains other
stuff such as measurements, plotted signals, colours, etc.

This also removes a bunch of "friend" declarations.
2023-02-12 20:40:23 +00:00
Jeff Young e5176ff4d6 ADDED power dissipation plotting and cursors.
Also fixes a bug so that voltages, currents and power dissipations are
only probed if the flag is set -- this keeps ngspice from throwing an
error if you probe something twice (for instance, if you have .probe
commands in text and turn off the auto-probing).
2023-02-11 21:11:07 +00:00
Jeff Young 2a5bb71fbd ADDED operating point text variables for labels and symbols.
ADDED formatting for cursors and operationg points

Also fixes a bunch of bugs to make the new cursors work with .ac sims.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6965
2023-02-11 21:11:07 +00:00
Jeff Young 39d35a8bec Better cursor feedback for plot window. 2023-02-11 21:11:07 +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 09822c7f18 ADDED direct access to signals & cursors.
ADDED differential cursors.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6221
2023-02-11 21:11:07 +00:00
Jeff Young a1a1a49729 On-the-fly language updates for simulator window.
Fixes https://gitlab.com/kicad/code/kicad/issues/13357
2023-02-11 21:11:07 +00:00
Jeff Young b000d68def Move simulator to tool framework. 2023-02-11 21:11:07 +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 b2498f5673 Coding standards & formatting. 2022-12-11 23:12:55 +00:00
Ian McInerney fdb97a46c1 Don't copy items in for loops when not needed 2022-09-24 03:46:06 +01:00
Mikolaj Wielgus 6450ec6b85 Sim: Spice netlist exporter rewrite
Rewrite the spice exporter to work with the new simulation model
architecture and data model, with many bugfixes related to the latter
two along the way.
2022-07-30 02:25:34 +00:00
Seth Hillbrand 9b4c293f14 Ensure that any excess spaces removed
The sim command may have additional whitespace between the type and
first char
2021-10-18 10:12:53 -07:00
Seth Hillbrand 82ba456567 Remove unnecessary RegEx
This broke for signals using underscores.  More critically, RegEx is
fragile and should not be used with user input if at all possible

Fixes https://gitlab.com/kicad/code/kicad/issues/9421
2021-10-18 10:08:29 -07:00
Sylwester Kocjan f9c5c97f74 eeschema, sim: fix wrong names of the signals
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9062
2021-09-08 23:15:29 +02:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Wayne Stambaugh dffe2661e6 Fix SPICE simulator plot bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1944
2021-07-09 16:20:35 -04:00
Mikolaj Wielgus 28531a982d Simulator: Use SIM_WORKBOOK in place of wxAuiNotebook
SIM_WORKBOOK is now a subclass of wxAuiNotebook, removing the problem of
having to maintain two separate workbook states.
2021-07-04 14:04:03 +00:00
Sylwester Kocjan b0e6bbb39c eeschema: remove m_simCommand from SIM_WORKBOOK 2021-06-07 20:00:48 +00:00
Sylwester Kocjan 917e329bdf eeschema: remove TRACE_DESC from SIM_WORKBOOK 2021-06-07 20:00:48 +00:00
Sylwester Kocjan 959ae73a01 Eeschema,sim: extract plot colors to new class 2021-03-01 18:50:37 +00:00
Marek Roszko b80fdad511 Don't generate a format specifier length of ":"
It's ambiguous, are we talking the length of a human colon or a pigs?

Fix #7556
2021-02-17 18:53:07 -05:00
Sylwester Kocjan 6a48e21eb2 simulator: update dialog to handle R, I & TEMP DC sweeps
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2370
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6195
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2386
2021-01-25 21:29:13 +00:00
Seth Hillbrand 67bd49b4a8 Fix order-of-ops issue in sim plot 2020-06-27 19:59:49 -07:00
Sylwester Kocjan fdccdd5cb9 Eeschema: adding .op SPICE simulation support
ADDED new tab on simulation settings dialog, which allows to run .op analysis.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2368
2020-04-15 01:51:58 +00:00
jean-pierre charras 0e51ed32f9 ADDED: Sim plot panel: option to plot on a white background or a black background. 2020-02-01 18:20:18 +01:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Jonatan Liljedahl f433037dcd Eeschema: simulator: allow dotted traces for current and phase.
ADD: Allow drawing of current and phase traces with dotted style
for easier differentiation from voltage and magnitude. The option
is available in the View menu of the simulator.
2020-01-07 19:45:44 +00:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
jean-pierre charras c5290de6ec housekeeping:
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
2019-11-16 09:39:36 +01:00
Jonatan Liljedahl fa14d5b9fa Eeschema: simulator: more trace colors, smarter color allocation
NEW: The simulator plot now avoids colors already in use, if possible.
The palette is replaced with a larger one with less saturated colors.

Fixes: lp:1851372
* https://bugs.launchpad.net/kicad/+bug/1851372
2019-11-11 17:20:56 +00:00
Jon Evans 5287ab6e4f Eeschema: improve simulator behavior for two-source DC analysis
Fixes: lp:1830478
* https://bugs.launchpad.net/kicad/+bug/1830478

(cherry picked from commit 356ccd0314)
2019-05-27 18:23:56 -04:00
Maciej Suminski 85ef058458 Spice simulator: change gain units to dBV 2018-09-22 19:05:04 +02:00
Maciej Suminski 61597db12d Make the Simulator dialog strings translatable 2018-05-25 11:24:25 +02:00
Maciej Suminski 9960416e32 Spice simulator: plot currents in DC sweep simulation
Fixes: lp:1767457
* https://bugs.launchpad.net/kicad/+bug/1767457
2018-04-28 01:14:00 +02:00
Maciej Suminski 2018d48946 Fixed removal order in SIM_PLOT_PANEL::DeleteTrace() 2017-06-16 23:17:34 +02:00
jean-pierre charras 673b094b2b Fix a few missing override qualifiers and shadowed vars. 2016-09-27 10:58:05 +02:00