Commit Graph

9657 Commits

Author SHA1 Message Date
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
Seth Hillbrand 3207d1386e Avoid forcing all units
When the enduser is not allowed to change the status of "common to all
units", then it should be disabled

Fixes https://gitlab.com/kicad/code/kicad/issues/14084
2023-02-28 13:25:32 -08:00
Graham Keeth cc110399ea Fix column offset in BOM script
Debugged by @svk28

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14128
2023-02-28 19:10:56 +00:00
Jeff Young a1ceb585c7 Always highlight children when they're selected on their own.
Fixes https://gitlab.com/kicad/code/kicad/issues/13876
2023-02-28 13:39:07 +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
Roberto Fernandez Bautista b03366c9e8 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions
2023-02-27 23:57:39 +01: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
Mike Williams 45e67950fd Schematic: fix global labels overriding wrong power symbols
Need to check pin netname now that we support changing the value of the
power symbol.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14076
2023-02-27 09:25:05 -05: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
Roberto Fernandez Bautista bcdb979128 CADSTAR SCH: Use screen grid instead of working grid when centering the design 2023-02-26 19:50:18 +01:00
Roberto Fernandez Bautista 698d0b7e92 CADSTAR Sch: Fix loading of graphical arc shapes
Correctly load arc shapes as real arcs instead of approximating now that
v7 supports graphical arcs in the schematic.

Also fix calculation of arc geometry for ccw arcs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14101
2023-02-26 19:46:34 +01: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
jean-pierre charras 51d46c0e73 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
2023-02-26 14:44:53 +01: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 c06cea2fe9 Fix units for ":power" operating points. 2023-02-25 23:30:01 +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 2a79a453ec Get rid of m_sortedSymbolPinList in favour of a properly scoped variable.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:11 +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
JamesJCode 9dca70a773 Eeschema netlist output: Propagate NC across hierarchical schematics
Fixes #12580

Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.

Adds testing of pin types to netlist QA unit tests.
2023-02-25 00:02:46 +00:00
Jeff Young 2b96161d0e Log new undo record at the start of Change Symbols.
Also fixes a bug where the "screen" variable was used with stale
data.

Fixes https://gitlab.com/kicad/code/kicad/issues/14061
2023-02-24 22:41:46 +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
Jeff Young be54ab396e Move selection shadows to overlay.
This change doesn't appear to have any effect, but I think it's
correct.
2023-02-24 12:44:55 +00:00
Jeff Young ddf8d115c4 Handle de-highlighting items outside selection when selection changes.
Also adds selection cleared event to handled events.

And a small performance boost to not scan items for selection changes
when find is not seleciton-based.
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
aris-kimi 22bca5c2a0 Disable link maps by default and fix compile issue with lld linker
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.

Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.

xref: https://github.com/llvm/llvm-project/issues/60932

Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Stefan 04165b22d1 Altium Schematic Import: add note that blanket's are not yet supported 2023-02-22 23:10:40 +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
Mike Williams 959a19a461 Power Symbols: automatically fix mismatched legacy symbols, add tests
Has netlist generation test for legacy power symbols, and test for
fixing legacy mismatched power symbol text fields and invisible pin names.
2023-02-22 18:01:47 +00:00
Mike Williams 5995e0e516 Power Symbols: make value editable, use as netname
QA: update tests for editable power symbol values
2023-02-22 18:01:47 +00:00
Mike Williams ca5004b1d2 Power Symbols: rename IsPowerConnection to IsGlobalPower
It's kind of confusing because we have power type pins, and pins that
make global power nets as part of power symbols.
2023-02-22 18:01:47 +00:00
Mike Williams dd461d6ad6 Power Symbols: drop requirement for invisible pins 2023-02-22 18:01:47 +00: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
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.
2023-02-22 10:45:27 +00:00
Jeff Young 29f21cdde6 Terminology and more dead code. 2023-02-22 10:45:27 +00:00
Jeff Young 90adc26b73 Remove dead and redundant code. 2023-02-22 10:45:27 +00:00
Chris Morgan 80b55f5980 Symbol editor: simpler creation of a new derived symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13407
2023-02-22 01:49:46 +00:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Marek Roszko 39e69a3d29 Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14011
2023-02-21 20:26:41 -05:00
aris-kimi 543a3317b4 Fix typo 2023-02-21 18:01:13 +00:00
Jeff Young 761b59da90 Read and write user-defined signals and measurements to workbook file. 2023-02-21 13:32:01 +00:00
Jeff Young 7fd707952b Easier editing of new sim measurements. 2023-02-21 13:32:01 +00:00
Jeff Young 6fcb95b24e ADDED user-defined signals. 2023-02-21 13:32:01 +00:00
Jeff Young f6fcae479c Don't generate error messages fetching sim data we know isn't there. 2023-02-21 13:32:01 +00:00
jean-pierre charras b05b33a9ff Fix a compil issue with gcc12.2 and Coverity warnings. 2023-02-21 11:54:38 +01:00
Fabien Corona 3751b250c6 sim - fix a QA case for XSPICE 2023-02-20 19:40:59 +01:00
Fabien Corona 869447fedd sim - ngspice does not support .probe p(Adevice)
Fixes #13979
2023-02-20 19:30:45 +01:00
Fabien Corona 2a3b70b7eb sim - Remember the option to save powers
Fixes #13978
2023-02-20 19:30:45 +01:00
jean-pierre charras 31be74b8b3 Fix a few Coverity warnings 2023-02-20 09:25:01 +01:00
Marek Roszko d55e2049e5 Silence some warnings with static_casts 2023-02-18 23:36:50 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Marek Roszko dffd2da8c8 Fix the shared_lock added and micro-opt the reindex 2023-02-18 11:28:19 -05:00
Fabien Corona facd50f4fd sim - missing assignment 2023-02-18 15:36:47 +00:00
jean-pierre charras 07f79208b9 Minor fixes: Coverity and compil minor warnings. 2023-02-18 13:04:43 +01:00
Fabien Corona 5482bc2905 sim - Check FindParam() results before using them 2023-02-18 12:54:55 +01:00
Fabien Corona f5902dad28 sim - don't write dc parameter twice 2023-02-18 10:07:29 +00:00
Fabien Corona fa0cc09917 sim - allow sources that are both AC and TRAN 2023-02-18 02:17:48 +00:00
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.
2023-02-18 00:38:46 +00:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
Jon Evans fc68b8d71a Make selected background layers translucent
We can't render them underneath other objects, but we can at least
make it possible to see other objects through them.
2023-02-16 22:45:29 -05:00
Alex bd4758e4df Keep image sizes when loading/saving 7.0- schematic file formats.
Previously, images were assumed to have 300 PPI density when loading from
schematic, but not after initial placement.
2023-02-17 03:53:44 +03:00
Alex ecb28ddf1c Prevent ghost image after canceling bitmap placement. 2023-02-17 03:53:44 +03:00
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
2023-02-17 00:47:01 +00:00
Paweł Płóciennik 614755f24e Dialogs autocompletion with backspace support. 2023-02-16 23:28:27 +00:00
Jon Evans 053d20e13d Fix selection overlay being wiped when changing sheets 2023-02-16 17:14:08 -05:00
Jeff Young d5e50b70bb Display a generic "Value" column label when there are no cursors. 2023-02-16 16:55:26 +00:00
Jeff Young f50d114b27 Push gain & phase for .probe statements in AC analysis.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 16:14:25 +00:00
Jon Evans ec2fc161e1 Handle another case where schematic view was being cleared
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:25:18 -05:00
Jeff Young 5967ab9a4d Don't allow SCH_LABEL_LOCATE_ANY_T to steal SCH_LABEL_LOCATE_WIRE_T's items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13936
2023-02-16 13:21:00 +00:00
Jon Evans 955a5a13eb Symbol editor: stop removing overlay from view
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:17:12 -05:00
Jeff Young 95232edd0d Do a better job of looking for .probe commands in directives.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 12:42:54 +00:00