Commit Graph

791 Commits

Author SHA1 Message Date
Jeff Young 630ff02369 Fix bone-headed logic.
(Else clause never gets called because 3 is always > 2.)
2023-03-06 10:26:59 +00:00
aris-kimi 5b43dc4e7b Simulator: Fix diode ibv unit 2023-03-05 19:23:33 +02:00
Alex d2bd7e33b9 Remove extra canvas redraws when changing sheets. 2023-03-05 04:33:07 +03:00
Jon Evans 610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Wayne Stambaugh 4e99812145 Coverity fixes and code cleaning. 2023-03-04 13:02:05 -05:00
Jeff Young d714ff8549 Don't commit changes on paint events or updateUI events.
Also use std::numeric_limits::epsilon for comparing doubles.

Fixes https://gitlab.com/kicad/code/kicad/issues/13851
2023-03-04 00:10:01 +00:00
Jeff Young b6d0b65261 Naming conventions and commenting. No functional changes. 2023-03-04 00:10:01 +00:00
Jeff Young 14f1f3ec79 Convert inline models in Sim.Params fields to SPICE syntax.
Fixes https://gitlab.com/kicad/code/kicad/issues/14157
2023-03-03 18:18:03 +00:00
Jeff Young dcba555d44 Make SME prop-grid hack Mac-only.
Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-03-02 10:42:13 +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 190ee58ccf Don't deliver pedantic error messages to user. 2023-03-02 00:38:39 +00:00
aris-kimi db2780090c Simulator: Fix RLGC c unit 2023-03-01 23:03:54 +00:00
Jeff Young 9c68d4792f Fix bungle from earlier merge. 2023-03-01 13:43:46 +00:00
Jeff Young f5edcf82f2 Move only-write-model-if-it-contains-overrides up to base class.
It's necessary to keep us from writing out model lines for included
models and fall-backs of included models.
2023-03-01 13:31:57 +00:00
aris-kimi 4a761179d0 Simulator: Fix some cases with initial conditions 2023-02-28 21:31:04 +00:00
Jeff Young 281fde71b9 Make SIM_MODEL_SPICE_FALLBACK act more like the model it's a fallback for.
In particular, install/show the parameters, and keep the existing name
field.

Fixes https://gitlab.com/kicad/code/kicad/issues/14102
2023-02-28 12:26:04 +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
Fabien Corona 5b2784f418 sim - switches: open <-> closed in description 2023-02-27 09:54:14 +00:00
Jeff Young 79f13ea9c7 Don't eval empty string.
Fixes https://gitlab.com/kicad/code/kicad/issues/13756
2023-02-26 23:14:09 +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 551773bf17 Save plot prefs (legend, grid, and dotted-secondary).
Fixes https://gitlab.com/kicad/code/kicad/issues/13940
2023-02-26 11:57:49 +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
Jeff Young 8c8c5e1824 Provide a default xaxis for DC-sweep so we can add traces before sim is run. 2023-02-25 22:42:52 +00:00
Jeff Young 1fdc81e68d Make substrate and thermal junction nodes optional.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:30 +00:00
Jeff Young 77ed53ab25 Nullptr safety. 2023-02-25 18:33:32 +00:00
jean-pierre charras 49a9fe38a0 Fix a compil warning 2023-02-25 19:06:46 +01:00
Jeff Young 4b427b2d0c Add second instance of "don't mess up user formatting" fix.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-25 16:31:16 +00:00
Jeff Young 2e5bf0210a Clear model name when switching to internal model.
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.

Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 15:22:20 +00:00
Jeff Young 9a0aeb4344 Adjust AC-small-signal plot names when saving placeholders.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-25 13:26:33 +00:00
Jeff Young ee956673b1 Respect readOnly cells in GRID_TRICKS.
Also fixes setting colors in the signals grid as it allows us to make
it editable again.

Fixes https://gitlab.com/kicad/code/kicad/issues/14079
2023-02-25 11:02:12 +00:00
Jeff Young 5a12e5ee76 Only write included models if they have overridden parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13953
2023-02-24 20:31:35 +00:00
Jeff Young c188318174 Change strategy for committing values from SIM_MODEL propGrid.
Note that the PCB editor's propGrid doesn't seem to need this workaround,
but I haven't yet figured out what's different between it and the sim model
propGrid.

Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-02-24 14:22:00 +00:00
Jeff Young 200a06a677 Cleanup some dead code, and add a potentially needed fix for non-Mac.
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)
2023-02-24 12:44:55 +00:00
Jeff Young 8059edff0e Don't mess up user formatting if eval'ing didn't actually change value.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-24 12:44:55 +00:00
Jeff Young 71df3f9edb Don't allow extra text in Sim.* fields.
(In particular, the field name.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13996
2023-02-24 12:44:55 +00:00
jean-pierre charras 2b3eb0b522 fix minor compil warnings 2023-02-23 09:50:28 +01:00
Jeff Young 4917abe655 Make sure whitespace at end of command doesn't mess up detection.
(Fixes the failing test case.)
2023-02-22 23:29:13 +00:00
Fabien Corona cdbb868198 sim - allow users to delete several measurements at once 2023-02-22 19:27:20 +01:00
Fabien Corona 9006f38e70 sim - Don't allow user to delete the type-in measure entry 2023-02-22 19:27:20 +01:00
Fabien Corona 1170fb2e18 sim - don't create measurement duplicates 2023-02-22 19:27:20 +01:00
Fabien Corona aa006e9b91 sim - allow to add several measurements at once. 2023-02-22 19:27:20 +01:00
Jeff Young 6fcae34f6b Clear operating points on all sim types.
(We'll fill them back in if we have data.)

Also improves handling when a plot tab is closed.

Also fixes dirtying of the view for op changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/13990
2023-02-22 15:54:18 +00:00
Jeff Young fe2679d965 Implement default levels for JFETs, MOSFETs and MESFETs. 2023-02-22 15:54:18 +00:00
Fabien Corona ae3a5c1c5f sim - set the dialog list as read only 2023-02-22 15:54:49 +01:00
Fabien Corona f2419e9e9b sim - Fix power graphs 2023-02-22 13:18:12 +01:00
Jeff Young cb71ea872b Don't allow 0 field text size.
Fixes https://gitlab.com/kicad/code/kicad/issues/13987
2023-02-22 11:40:49 +00:00
Fabien Corona e24ddd0be4 ADDED: Measurement on power signals and integrals
Fixes #14028
2023-02-22 12:11:09 +01:00
Jeff Young f828d50cb0 Better processing of single-empty-row rule for measurements grid. 2023-02-22 10:45:27 +00:00
Jeff Young 5fa7be0320 Update signals after running a sim.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-22 10:45:27 +00:00
Jeff Young a126d961d8 More dead code removal and a bit of formatting and const& for strings. 2023-02-22 10:45:27 +00:00