Commit Graph

57 Commits

Author SHA1 Message Date
Jeff Young c5e195bdff Cleanup (includes and formatting). 2021-08-03 18:37:23 +01:00
luz paz 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Jonathan Haas 55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
jean-pierre charras c155218582 Sim plot: fix a rounding issue that can create a missing point in a plot.
Due to a truncation when converting a value to integer, the first point was
sometimes missing because it looked like out of plot range.
Fix also a cosmetic issue in dialog.
Fixes #7345
https://gitlab.com/kicad/code/kicad/issues/7345
2021-01-31 10:36:26 +01:00
jean-pierre charras 42350a4928 Minor code cleanup: remove useless include or useless code.
fix also a minor compil warning
2020-10-01 11:36:15 +02:00
jean-pierre charras 3f8c9d49f8 Revert "Code cleanup: remove useless wx/wx.h include inside a few files."
due to compil issue on Linux

This reverts commit cffccc3970.
2020-09-30 20:47:20 +02:00
jean-pierre charras cffccc3970 Code cleanup: remove useless wx/wx.h include inside a few files.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
2020-09-30 20:03:27 +02:00
Ian McInerney c40470ed0b Initialize more variables 2020-09-22 12:29:13 +01:00
jean-pierre charras d122321162 mathplot.cpp: fix an issue in plot function optimization. 2020-08-25 10:08:18 +02:00
jean-pierre charras d1e2b57d96 mathplot.cpp: optimize a plot function to have a better look for dashed lines,
and less lines to plot when they can be merged.
2020-08-24 18:40:38 +02:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
jean-pierre charras 0103164571 Simulator: optimize a plot function, to support large amount of points.
Redundant points are not plotted.

Fixes #4737
https://gitlab.com/kicad/code/kicad/issues/4737
2020-07-27 10:47:52 +02:00
Jeff Young 8eb15fe911 Tidy up some Coverity issues. 2020-04-07 17:29:58 +01: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 b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Jonatan Liljedahl 7c7d9c3e3f Eeschema: simulator plot: allow standard mac pan and pinch to zoom 2019-11-25 09:24:31 -05:00
jean-pierre charras 19cf78f802 simulator: plot curves: fix incorrect draw area limits calculation when zooming.
Fixes: lp:1674132
https://bugs.launchpad.net/kicad/+bug/1674132
2019-09-26 16:29:52 +02:00
Jeff Young 2ac270ce8e Fix bug with high-frequency plots.
Fixes: lp:1839712
* https://bugs.launchpad.net/kicad/+bug/1839712
2019-09-08 01:11:51 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Jon Evans 27a5ed1a9f Mathplot: properly set foreground color when saving screenshots
Fixes: lp:1810914
* https://bugs.launchpad.net/kicad/+bug/1810914
2019-06-05 22:43:50 -04:00
Seth Hillbrand c1c4a0925d sim: Prevent stepping
Introduced by 416e64a334.  The code
appears to have been stepped on purpose but this would be incorrect for
most applications.  There remains a good deal of cleanup in mathplot
available for the motivated dev.

Fixes: lp:1810311
* https://bugs.launchpad.net/kicad/+bug/1810311
2019-03-26 14:56:33 -07:00
Hal Gentz 416e64a334 Spice plot widget: more accurate rendering
Patch modifies the way graphs are displayed: instead of drawing one
point for each X coordinate, there is a line segment joining min and max
values for continuous graphs and all unique points are displayed for
discrete graphs.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:49:41 +02:00
Maciej Suminski 70c1de3275 Spice simulator: faster graph rendering
Graph rendering takes a lot of time, especially when there is a high number
of points to be drawn. The initial implementation drew all points/lines
even if the the coordinates were duplicates, in the new version duplicated
coordinates are skipped.

Fixes: lp:1674143
* https://bugs.launchpad.net/kicad/+bug/1674143
2018-10-04 22:39:38 +02:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
jean-pierre charras a9fbedfb12 More Coverity warnings fixes. 2016-12-30 14:36:23 +01:00
jean-pierre charras dec2d6e8cc Fix a few Coverity warnings. A bit of clean code in export_vrml.cpp. 2016-12-30 12:40:05 +01:00
jean-pierre charras 5d7d210f28 Simulator, plot panel: fix incorrect calculation of the vertical size of the traces when resizing the simulator frame 2016-11-28 15:37:00 +01:00
jean-pierre charras c225af747f mathplot: fix a bug and remove unused variables ( it fixes a few compil warnings) from Coverity analysis.
Uncrustify mathplot.h and fix a few coding style issues.
2016-11-28 14:18:22 +01:00
Maciej Suminski 1420a0179f Removed deprecated pragmas to mute warnings 2016-09-26 14:53:43 +02:00
jp-charras 26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
Maciej Suminski 9714ece53f Initialize bestStep (wxMathPlot) 2016-08-15 10:53:36 +02:00
Simon Richter eec632a651 Remove definition of log10(double) in wxMathPlot widget 2016-08-15 10:19:42 +02:00
jean-pierre charras 42f9be4019 uncrustify mathplot.cpp, make debug strings not translatable, and remove not compilable debug lines (due to changes in internal code). No actual change in code. 2016-08-12 10:10:33 +02:00
Maciej Suminski 557f9270c7 wxMathPlot basic code formatting 2016-08-11 14:42:18 +02:00
jp charras b2f60009a6 wxWidgets 3.1/Win7 fixes 2016-08-11 14:42:15 +02:00
Maciej Suminski 67e283c3af Removed 'Lock aspect' from wxMathPlot widget context menu 2016-08-11 14:42:12 +02:00
Tomasz Wlostowski b20f941bd0 sim: hopefully final version of plot axis unit/suffix handling. 2016-08-11 14:42:10 +02:00
Maciej Suminski 63bdb3995e Fixes for limited view panning 2016-08-11 14:42:08 +02:00
Tomasz Wlostowski e9609fe19d mathplot: removed some warnings, fixes to labelling code 2016-08-11 14:42:04 +02:00
Maciej Suminski 9d8b40b93d Reset scales when a plot is removed 2016-08-11 14:42:03 +02:00
Tomasz Wlostowski f4033f776f mathplot: fix freeze in scale ticks calculation 2016-08-11 14:42:02 +02:00
Tomasz Wlostowski d0e1f2e412 mathplot: silence debugging messages 2016-08-11 14:42:01 +02:00
Maciej Suminski 5c32e35d27 Minor fixes to wxMathPlot 2016-08-11 14:41:56 +02:00
Maciej Suminski b25781814d Fixed cursors 2016-08-11 14:41:55 +02:00
Tomasz Wlostowski e8d6a42e1a simulator: working on magnitude/phase plots 2016-08-11 14:41:49 +02:00
Tomasz Wlostowski b9e31f6d3a mathplot: further improvements for simulator [wip] 2016-08-11 14:41:49 +02:00
Tomasz Wlostowski 30c87527da mathplot: slave scale locking [wip] 2016-08-11 14:41:48 +02:00