Commit Graph

189 Commits

Author SHA1 Message Date
Maciej Suminski 81e015036e Fixes for drawing color labels in simulator's signal list 2016-08-30 14:25:59 +02:00
Maciej Suminski 67573f15be Do not use double component primitives in Spice netlist exporter
Fixes: lp:1617768
* https://bugs.launchpad.net/kicad/+bug/1617768
2016-08-30 14:25:56 +02:00
Johannes Maibaum b87bac22c7 Simulator: Fix probe and tune cursors on OSX. 2016-08-30 10:48:40 +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
jean-pierre charras 7e3aedda82 Slightly modify the way DIALOG_SIM_SETTINGS m_settingsDlg is created in SIM_PLOT_FRAME frame: for an obscure reason, if it is created in ctor SIM_PLOT_FRAME, m_settingsDlg has an annoying issue on Windows: when shown, the parent SIM_PLOT_FRAME is sent to the background. When created outside the ctor, this issue is gone. 2016-08-20 19:51:33 +02:00
jean-pierre charras 2456db3817 Simulator: Make a few strings translatable. 2016-08-20 17:37:51 +02:00
Maciej Suminski 42f6cf33a1 Unbind REPORTER from NGSPICE before deleting 2016-08-19 16:39:46 +02:00
Maciej Suminski fe30985742 Do not delete the NGSPICE singleton 2016-08-19 16:33:31 +02:00
Maciej Suminski 2a6b8f153b NGSPICE as a singleton
One cannot call ngSpice_Init() twice without unloading the dll. When calling
ngSpice_Init, we pass a pointer to a NGSPICE instance and thus it cannot be changed.
When any of the callback function is called with a stale pointer everything crashes.
2016-08-19 15:51:19 +02:00
Maciej Suminski cac571c056 Initialize ngspice only once 2016-08-18 18:10:00 +02:00
Maciej Suminski 43d93682a2 Fix locale in NGSPICE methods using LOCALE_IO instead of setlocale.
More information: https://lists.launchpad.net/kicad-developers/msg25763.html
2016-08-15 15:52:07 +02:00
Maciej Suminski 75f8b20493 libngspice is linked at compile time 2016-08-15 13:52:13 +02:00
Maciej Suminski 497b2a9442 CMake module for libngspice 2016-08-12 15:56:51 +02:00
jean-pierre charras 6e5628ceaf Avoid simulator crash if the simulation was not run, when using most of main menu commands, due to a null pointer not tested. 2016-08-12 15:36:43 +02:00
jean-pierre charras dd395a6854 Fix deprecated and shadowed var compil warnings 2016-08-12 11:00:58 +02:00
Maciej Suminski 18e99fa30f Fixed a crash with certain shared library versions 2016-08-11 14:42:21 +02:00
Maciej Suminski 6b3584ce9b fxup system ngspice.h 2016-08-11 14:42:19 +02:00
Maciej Suminski 0cb1e80e00 Activate eeschema on tune/probe 2016-08-11 14:42:19 +02:00
Maciej Suminski dfb5c6bfdd Do not update values if simulation is rerun Otherwise sometimes the signal list might be cleared and a new list is not yet available, resulting in loss of signals and cursors. 2016-08-11 14:42:19 +02:00
Maciej Suminski d15eef06f9 Removed redundant debugging info 2016-08-11 14:42:18 +02:00
Maciej Suminski 2c29133c57 Use system ngspice.h file 2016-08-11 14:42:18 +02:00
Maciej Suminski 0667b7ba63 Fixed ngspice freeze when there is an error in the simulated netlist Does not work with current ngspice head, it has to be compiled from the official master branch. 2016-08-11 14:42:18 +02:00
Maciej Suminski 8227cd6d80 Do not recreate the simulator every time simulation is run 2016-08-11 14:42:17 +02:00
Maciej Suminski eeeb3e0a9a Simulator code formatting and clean up 2016-08-11 14:42:17 +02:00
Maciej Suminski 957c6ec417 Removed hard limit for ngspice netlist 2016-08-11 14:42:17 +02:00
Maciej Suminski 0a6390701d NGSPICE uses a more convenient function to generate DLL name 2016-08-11 14:42:16 +02:00
Maciej Suminski 46ecfd8139 Resized simulator dialogs 2016-08-11 14:42:16 +02:00
Johannes Maibaum c78462c4f5 sim: Modifications to compile the simulator on OSX. 2016-08-11 14:42:15 +02:00
Maciej Suminski c9a1b45666 Fixed probe & tune cursors under Windows. 2016-08-11 14:42:15 +02:00
Tomasz Wlostowski 1930cd4d66 sim: display labels on current scale when only currents are added to transient plot 2016-08-11 14:42:14 +02:00
Maciej Suminski e452992a6c Cursor centering fix 2016-08-11 14:42:14 +02:00
Maciej Suminski ca36f15fee Temporary disable cursor centering 2016-08-11 14:42:14 +02:00
Maciej Suminski 2c576afdf3 Fixed menu entries 2016-08-11 14:42:13 +02:00
Maciej Suminski ca13dc93b1 Support for simulation workbooks 2016-08-11 14:42:12 +02:00
Maciej Suminski 7b81516b61 Fixed SIM_PLOT_FRAME::CurrentPlot() 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 01d18bad97 Save simulation command directive for every plot 2016-08-11 14:42:10 +02:00
Maciej Suminski fb56420654 Do not store Spice vector names, but regenerate them 2016-08-11 14:42:10 +02:00
Maciej Suminski ed8f555331 Remove plots that are invalid after component removal 2016-08-11 14:42:09 +02:00
Maciej Suminski 672fd76995 Remove tuners for components that were removed 2016-08-11 14:42:09 +02:00
Maciej Suminski 06287e4986 Display an error message for unannotated schematics 2016-08-11 14:42:09 +02:00
Maciej Suminski dbf0fd6156 Better normalization rules for SPICE_VALUE 2016-08-11 14:42:07 +02:00
Maciej Suminski bf758dce3e Tuners are common for all plots 2016-08-11 14:42:07 +02:00
Maciej Suminski 5772938a71 New cursor shows up in the center, can be dragged by its axis 2016-08-11 14:42:07 +02:00
Maciej Suminski 2f8f92cf0a Closing tabs with middle button click I could not find a way to make tab close button work in wxWidgets.. 2016-08-11 14:42:07 +02:00
Maciej Suminski fccf71aadd Change 'Run Simulation' button icon when simulation is running 2016-08-11 14:42:06 +02:00
Maciej Suminski 8306cd3b9b Fixed tuners layout after a tuner is removed 2016-08-11 14:42:06 +02:00
Tomasz Wlostowski e691565fe3 sim: updated label generation code to match changes in the mathplot api 2016-08-11 14:42:04 +02:00
Maciej Suminski 7d268d2608 Reset scales upon simulation relaunch 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
Maciej Suminski ba3ce9b566 Fixed tuner autoplacement 2016-08-11 14:42:03 +02:00
Maciej Suminski bc433764fe Fixed layout proportions 2016-08-11 14:42:02 +02:00
Tomasz Wlostowski 36297f84c3 sim: further locale hacks, fixed plot/welcome message sizing 2016-08-11 14:42:02 +02:00
Tomasz Wlostowski 8e4ae1968f sim: working on improved UX [wip] 2016-08-11 14:42:01 +02:00
Tomasz Wlostowski 2bcd8af25c sim: fix trailing zero removal 2016-08-11 14:42:01 +02:00
Tomasz Wlostowski bba57097b7 sim: use C locale for SPICE simulation. Added error callback 2016-08-11 14:42:01 +02:00
Tomasz Wlostowski 8c14f2f6b1 sim: working on UX 2016-08-11 14:42:00 +02:00
Tomasz Wlostowski ec1b8be528 sim: fixed build errors & locale issues 2016-08-11 14:41:58 +02:00
Maciej Suminski 7406aad8ea Display current plots using the current axis 2016-08-11 14:41:57 +02:00
Maciej Suminski ce59b282d3 Display both axis names in the cursor list 2016-08-11 14:41:56 +02:00
Maciej Suminski 973a3d7bcb Fixed a crash when a signal was removed 2016-08-11 14:41:56 +02:00
Maciej Suminski 07b451f4b1 Do not draw cursors outside margins 2016-08-11 14:41:55 +02:00
Maciej Suminski cdf758b173 Automatically update cursor coordinates 2016-08-11 14:41:55 +02:00
Maciej Suminski b25781814d Fixed cursors 2016-08-11 14:41:55 +02:00
Maciej Suminski 65a0327e85 Better normalization rules for SPICE_VALUE 2016-08-11 14:41:55 +02:00
Maciej Suminski 65c7520544 Bulletproof Simulation settings dialog 2016-08-11 14:41:54 +02:00
Maciej Suminski 16fec4d73e Strip comas from a Spice value 2016-08-11 14:41:54 +02:00
Maciej Suminski 920cf09ac1 Fixed plot for DC sweep analysis 2016-08-11 14:41:53 +02:00
Maciej Suminski 38810930ec Removed redundant TRACE_* classes 2016-08-11 14:41:53 +02:00
Maciej Suminski 806b862a5e Corrected Spice vector name for voltages 2016-08-11 14:41:53 +02:00
Maciej Suminski 5fdc32b79a AC analysis plots using linear frequency scale 2016-08-11 14:41:52 +02:00
Maciej Suminski 0f993ba98c Current probing 2016-08-11 14:41:52 +02:00
Maciej Suminski caef84d622 SPICE_SIMULATOR::GetXAxis() 2016-08-11 14:41:51 +02:00
Maciej Suminski 27a7a9b1a5 Spice fields enum values renamed from SPICE_* to SF_* 2016-08-11 14:41:51 +02:00
Maciej Suminski cf28e843ba Fix for crash when AC simulation is relaunched 2016-08-11 14:41:50 +02:00
Maciej Suminski e5604fee1c SPICE_VALUE bugfix 2016-08-11 14:41:50 +02:00
Maciej Suminski ef45cd696d Refresh plots after simulation is relaunched 2016-08-11 14:41:50 +02:00
Tomasz Wlostowski e8d6a42e1a simulator: working on magnitude/phase plots 2016-08-11 14:41:49 +02:00
Tomasz Wlostowski e5bf70996b eeschema: migrate SIM_PLOT_PANEL to improved wxMathPlot [wip] 2016-08-11 14:41:49 +02:00
Maciej Suminski d869771f04 Display an error message if ngspice DLL is missing 2016-08-11 14:41:48 +02:00
Maciej Suminski a717194b1e Enable tuner for RLC components only 2016-08-11 14:41:45 +02:00
Maciej Suminski 92a3e405c2 Tuner tool. 2016-08-11 14:41:45 +02:00
Maciej Suminski 4f9a418694 Moved SPICE_VALUE to a separate source file 2016-08-11 14:41:43 +02:00
Maciej Suminski f62a6425a3 Changed the simulator code license to GPLv3+ 2016-08-11 14:41:43 +02:00
Maciej Suminski 51f0564119 Signals are added using a separate dialog 2016-08-11 14:41:42 +02:00
Maciej Suminski b897af7eb9 Added a few checks for SIM_PLOT_FRAME to improve robustness 2016-08-11 14:41:41 +02:00
Maciej Suminski 6bfe6342fc Simulator fixes for Windows 2016-08-11 14:41:41 +02:00
Maciej Suminski 3e2061158e SIM_PLOT_FRAME: Do not update plots if the just run a different type of simulation 2016-08-11 14:41:39 +02:00
Maciej Suminski 06463252d7 wxMathPlot: Limited zooming and panning 2016-08-11 14:41:37 +02:00
Maciej Suminski 78526ee913 Additional options for netlist exporter (fix passive values, library include paths) 2016-08-11 14:41:36 +02:00
Maciej Suminski 6580a355ab Strip 'stdout' & 'stderr' from ngspice log 2016-08-11 14:41:35 +02:00
Maciej Suminski 90b6112c5d Rearranged SIM_PLOT_FRAME, changed console log from wxRichTextCtrl to wxTextCtrl 2016-08-11 14:41:35 +02:00
Maciej Suminski e90fcaa6d9 New type of simulation opens a new plot 2016-08-11 14:41:35 +02:00
Maciej Suminski ab8c88f10b SIM_TYPE enum 2016-08-11 14:41:34 +02:00
Maciej Suminski 0da13052dd SPICE_SIMULATOR interface allows to obtain different types of plots (mag, phase, real, imag) 2016-08-11 14:41:31 +02:00
Maciej Suminski 2b1784cfc6 Simulation settings combo boxes are filled with net/power source choices 2016-08-11 14:41:30 +02:00
Maciej Suminski a2b16ae640 Initial 'Simulation settings' dialog 2016-08-11 14:41:29 +02:00
Maciej Suminski 17294aaf6a Simulation plot CSV & PNG export 2016-08-11 14:41:28 +02:00
Maciej Suminski 1d4fe279db Menu entries to toggle legend & coordinates 2016-08-11 14:41:27 +02:00
Maciej Suminski 8c138312fb Cursors are updated on request instead of using update UI events Previously CPU was busy updating the list of cursors even though nothing was changing. 2016-08-11 14:41:27 +02:00