Jeff Young
5fa7be0320
Update signals after running a sim.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
3 years ago
Jeff Young
a126d961d8
More dead code removal and a bit of formatting and const& for strings.
3 years ago
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.
3 years ago
Jeff Young
29f21cdde6
Terminology and more dead code.
3 years ago
Jeff Young
90adc26b73
Remove dead and redundant code.
3 years ago
aris-kimi
543a3317b4
Fix typo
3 years ago
Jeff Young
761b59da90
Read and write user-defined signals and measurements to workbook file.
3 years ago
Jeff Young
7fd707952b
Easier editing of new sim measurements.
3 years ago
Jeff Young
6fcb95b24e
ADDED user-defined signals.
3 years ago
Jeff Young
f6fcae479c
Don't generate error messages fetching sim data we know isn't there.
3 years ago
jean-pierre charras
b05b33a9ff
Fix a compil issue with gcc12.2 and Coverity warnings.
3 years ago
jean-pierre charras
31be74b8b3
Fix a few Coverity warnings
3 years ago
Marek Roszko
d55e2049e5
Silence some warnings with static_casts
3 years ago
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
3 years ago
Fabien Corona
facd50f4fd
sim - missing assignment
3 years ago
jean-pierre charras
07f79208b9
Minor fixes: Coverity and compil minor warnings.
3 years ago
Fabien Corona
5482bc2905
sim - Check FindParam() results before using them
3 years ago
Fabien Corona
f5902dad28
sim - don't write dc parameter twice
3 years ago
Fabien Corona
fa0cc09917
sim - allow sources that are both AC and TRAN
3 years ago
Fabien Corona
39a1b14a0f
sim: VSIN - allow user to specify a phase
TD is not the same as PHASE.
TD is the delay before the source turns on.
PHASE is ... the phase
If only TD is set, the signal starts later, but the phase is still 0 when compared to the t=0 of the simulation.
3 years ago
Jeff Young
8b1318c92f
Update associated data structures after changing trace colour.
Also removes likely benign but never-the-less useless grid even processing
during rebuilding of the grids.
Fixes https://gitlab.com/kicad/code/kicad/issues/13956
3 years ago
Jeff Young
d5e50b70bb
Display a generic "Value" column label when there are no cursors.
3 years ago
Jeff Young
f50d114b27
Push gain & phase for .probe statements in AC analysis.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
3 years ago
Jeff Young
95232edd0d
Do a better job of looking for .probe commands in directives.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
3 years ago
Jeff Young
d8a4f9821e
Smarten regex to accept ':' in signal names.
(In fact, just accept anything up to the closing paren.)
Fixes https://gitlab.com/kicad/code/kicad/issues/13942
3 years ago
Jeff Young
c618bb7046
Correctly netlist a voltage source with both AC and DC values.
Fixes https://gitlab.com/kicad/code/kicad/issues/13912
3 years ago
aris-kimi
dca1281263
Fix some typos
3 years ago
Jeff Young
9ce18dffdd
Better startup experience for simulator.
Pre-load signals list (and plot panel if there is an schText simulation
command).
Also fixes a bug where the workbook was getting dirtied on open because
the events would fire after the dirty flag had been cleared.
3 years ago
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
3 years ago
Marek Roszko
2cc3d8e9bc
Prevent a crash when a spice SW_I lacks two pin net names
Fixes KICAD-5D
3 years ago
Jeff Young
74eb587291
Better sorting within sections (voltage, current, power).
Fixes https://gitlab.com/kicad/code/kicad/issues/13846
3 years ago
Marek Roszko
4665823089
Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.
In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments
MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
3 years ago
Graham Keeth
6af3dadaee
Fix SPICE pins for BJTs and MESFETs
- MESFETs don't have a substrate/bulk pin
- BJTs have a substrate pin, and HICUM/VBIC have TJ
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13848
3 years ago
Jeff Young
a22964a977
Prepend correct SPICE prefix when necessary for plotting currents.
Fixes https://gitlab.com/kicad/code/kicad/issues/13850
3 years ago
Jeff Young
1e756dbdd8
Save cursor positions in sim workbook.
3 years ago
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.
3 years ago
Jeff Young
78746b77c6
Save trace colors and cursor value formatting in sim workbook.
3 years ago
Jeff Young
84c72b087c
Simplify (and fix) logic for starting new simulations.
Fixes https://gitlab.com/kicad/code/kicad/issues/13853
3 years ago
jean-pierre charras
1fb2d138b4
Fix a compil issue.
3 years ago
Jeff Young
9d3a3d705d
ADDED simulation measurements.
3 years ago
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).
3 years ago
Jeff Young
bc108023b3
ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
3 years ago
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
3 years ago
Jeff Young
b3ffbd6258
Don't include unconnected nets in signals list.
Fixes https://gitlab.com/kicad/code/kicad/issues/4961
3 years ago
Jeff Young
39d35a8bec
Better cursor feedback for plot window.
3 years ago
Jeff Young
9a99106981
Cleanup.
3 years ago
Jeff Young
f0bd25b397
ADDED use-settable simulation trace colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/2536
3 years ago
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
3 years ago
Jeff Young
6bc89ee180
Don't disable run when there's no command: just ask for a command.
3 years ago
Jeff Young
7d7a48070e
Separate error messages when sim model and project paths are the same.
3 years ago