Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-11 Thread Jonatan Liljedahl
Thank you Wayne! I would of course be very happy if you decide to merge it to 5.1 branch as well, since it's currently the only way to do math on simulation plots, and I understand 6.0 is quite far away. Regarding automatically populating the signal list with available spice vectors, I agree

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-11 Thread Wayne Stambaugh
Hi Jonaton, I pushed your patch into the master branch. I haven't made up my mind on the 5.1 branch. Technically this is a new feature. We have an unwritten policy to not backport new features from the master branch. Given that this is a fairly trivial change, I may consider applying your

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-07 Thread Jonatan Liljedahl
Hi, Here's an updated patch with fixed commit message. Also I removed some unrelated UI tweaks in sim_plot_frame that accidentally was part of the previous patch. This patch applies to both 5.1 and master. Cheers On Thu, Nov 7, 2019 at 12:04 AM Kymatica wrote: > > Oh, this was for 5.1. > I’ll

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Wayne Stambaugh
I forgot to mention in my last response that the commit message is still not correct. You have a line that is 95 characters wide. The limit is 75. I recommend a good text editor that allows you to set the fixed text width to 80 characters so it is obvious when you are violating the line width.

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Wayne Stambaugh
This patch does not apply cleanly against master using `git am`. Did you forget to rebase against the master branch before creating your patch? Wayne On 11/6/19 5:48 PM, Jonatan Liljedahl wrote: > Ok, now I think I've followed the policies correctly, here's the updated > patch. > > Cheers >

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Holger Vogt
If you have just done a single simulation, creating one plot, it will be sufficient to query the current plot by /* return to the caller a pointer to the name of the current plot */ char* ngSpice_CurPlot(void) and then use char** ngSpice_AllVecs(char* plotname) About the 'plot' notion in

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Holger Vogt
Before that you need to know the plots you might have generated during simulation: /* return to the caller a pointer to an array of all plots created by ngspice. Last entry in the array is NULL. */ char** ngSpice_AllPlots(void) Am 06.11.2019 um 22:49 schrieb Holger Vogt: You may invoke the

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Wayne Stambaugh
When in doubt, consult the Oracle of ngspice ;) Thanks Holger! On 11/6/19 4:49 PM, Holger Vogt wrote: > You may invoke the shared ngspice api function > > char** ngSpice_AllVecs(char* plotname) > > /* return to the caller a pointer to an array of vector names in the plot > named by plotname.

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Sylwester Kocjan
Hi, I was working too on pt.4 from 1814188, but frankly, I misunderstood that and I added search textbox to filter signal list. Do you think is it still worth any effort? My code is here: https://github.com/skocjan/kicad_initialconditions/tree/SIM_FindSignalDlg Interaction between searchCtrl

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Holger Vogt
You may invoke the shared ngspice api function char** ngSpice_AllVecs(char* plotname) /* return to the caller a pointer to an array of vector names in the plot named by plotname. Last entry in the array is NULL. */ It would be nice if there was a way to query ngspice for a list of vectors

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Wayne Stambaugh
Hi Jonathon, I tested your original patch on the 5.1 branch and it seems to work as advertised. It would be nice if there was a way to query ngspice for a list of vectors rather than using just the net list to populate add signals dialog. Maybe Holger can weigh in on this. Before you submit

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Jonatan Liljedahl
This patch does not implement all of pt 4 in that bug report, it only allows adding plots of vectors by name, including vectors created by LET statements in a spice text block in the schematic (which are not listed in the signals list, since that list is based on the net names, not the existing

Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Sylwester Kocjan
Hi Jonatan, On 06/11/2019 13:29, Jonatan Liljedahl wrote: useful for plotting calculated vectors ("let AB=V(a)*V(b)"), see for example https://forum.kicad.info/t/ac-analysis-of-op-amp-loop-gain-and-phase/19661/6 Just small remark to limit entropy in bug reports: it looks like you have

[Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name

2019-11-06 Thread Jonatan Liljedahl
useful for plotting calculated vectors ("let AB=V(a)*V(b)"), see for example https://forum.kicad.info/t/ac-analysis-of-op-amp-loop-gain-and-phase/19661/6 -- /Jonatan http://kymatica.com 0001-simulation-allow-entering-signals-spice-vectors-by-n.patch Description: Binary data