[Kicad-developers] Odp: Re: SPICE_VALUE behavior
Hi Wayne, Dnia 19 maja 2021 00:32 Wayne Stambaugh stambau...@gmail.com napisał(a): The test cases look correct so I dont see any issues here. Could you please check again with better formatting below? Hertz is a valid SI unit, so strings: 10m and 10mHz are valid, but values ending with Hzz are invalid: Scenario: Input: Actual behavior: Expected behavior: Result: Positive 10m Value parsed correctly Value parsed correctly PASS Positive 10mHz Value parsed correctly Value parsed correctly PASS Negative 10mHzz Value parsed correctly Exception thrown FAIL Positive 10Hz Exception thrown Value parsed correctly FAIL Negative 10Hzz Exception thrown Exception thrown PASS Parsing strings in V7 wouldnt hurt, thats no problem, but the easiest solution is to reject all extra characters: Input: Actual behavior: 10m Value parsed correctly 10mHz Exception thrown 10mHzz Exception thrown 10Hz Exception thrown 10Hzz Exception thrown Best regards, Sylwester Dnia 19 maja 2021 00:32 Wayne Stambaugh stambau...@gmail.com napisał(a): Hi Sylwester, I dont know that we need to support SI units in spice strings but I suppose it wouldnt hurt. That would have to wait until V7 as it is a new feature. The test cases look correct so I dont see any issues here. - Wayne On 5/18/21 2:06 PM, Sylwester Kocjan wrote: Hello! Ive noticed a minor bug in SPICE_VALUE class. Could you please let me know if we should parse SI units in SPICE strings or ignore them, so I can fix it? I think ngspice accepts units like, V, I, Ohm, but this may be an overkill. The easiest solution is to ignore everything after number and prefix. See below the testcases I made on AC tab of Simulation Settings dialog: Input: Actual behavior: Expected behavior: 10m Value parsed correctly Value parsed correctly 10mHz Value parsed correctly Value parsed correctly 10mHzz Value parsed correctly Exception thrown 10Hz Exception thrown Value parsed correctly 10Hzz Exception thrown Exception thrown Best regards, Sylwester __ Mailing list: launchpad.net launchpad.net Post to : kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net __ Mailing list: launchpad.net launchpad.net Post to : kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] SPICE_VALUE behavior
Hello! Ive noticed a minor bug in SPICE_VALUE class. Could you please let me know if we should parse SI units in SPICE strings or ignore them, so I can fix it? I think ngspice accepts units like, V, I, Ohm, but this may be an overkill. The easiest solution is to ignore everything after number and prefix. See below the testcases I made on AC tab of Simulation Settings dialog: Input: Actual behavior: Expected behavior: 10m Value parsed correctly Value parsed correctly 10mHz Value parsed correctly Value parsed correctly 10mHzz Value parsed correctly Exception thrown 10Hz Exception thrown Value parsed correctly 10Hzz Exception thrown Exception thrown Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Questions to the QA code
Hello, Heres a follow-up about mocks in the qa tests. I prepared example use of Turtle library. My observations below: - integrates easily with Boost.Test (HippoMocks didnt require any integration, gmock will be harder, gitlab.com gitlab.com ) - looks similar in use to google mocks - its maintained on GitHub: github.com github.com - it forced me to create more mocks than HippoMocks and rework the code a bit ( gitlab.com gitlab.com ), so: - may require more work to create/maintain tests - but I believe that in exchange it will result in better quality (I found missing virtual keyword before destructor of SCHEMATIC!) Best regards, Sylwester Dnia 21 stycznia 2021 16:38 Jeff Young j...@rokeby.ie napisał(a): Good point. I have only used the Java one (which I guess is the original?). Cheers, Jeff.On 20 Jan 2021, at 21:18, Sylwester Kocjans.koc...@o2.pl wrote: Hi Jeff, Did you use github.com github.com or that one for Java github.com github.com ? Mockitopp has its last code update about ~1,5 year ago, so it looks it has the same downside as HippoMocks. There is also Mockpp, also not actively developed: sourceforge.net sourceforge.net BR, SK Dnia 17 stycznia 2021 16:45 Jeff Youngj...@rokeby.ie napisał(a): I’ve used Mockito. Can’t say I remember a thing about it, though (which could be good?). Cheers, Jeff. On 17 Jan 2021, at 14:49, Sylwester Kocjan s.koc...@o2.pl wrote: Hello, On 17/01/2021 09:47, Alex wrote: ...GTest, Doctest and Catch2, (...) theyll all get the job done They are all testing frameworks without mocking capability. We have already Boost.Test based tests and I find it unnecessary effort to migrate them, and alone they dont solve the problem. On 17/01/2021 09:47, Alex wrote: I wasnt aware that GMock could operate separately from GTest, but if it can, thats pretty neat. On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenko anlutse...@gmail.com wrote: You can also use gmock separately from gtest. Since some time gmock is a part of gtest. Any search results in the topic of gmock with another testing frameworks are quite old. I think there is a risk that it will not work. On 17/01/2021 09:47, Alex wrote: Catch is a single header I was instructed to avoid introducing new dependencies, hence my initial choice of single-header HippoMocks: gitlab.com gitlab.com On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrand s...@kipro-pcb.com wrote: The downside of HippoMocks from what I can gather is that the project appears abandoned.Sadly, this is true. There are also other choices, but I dont have any hands-on experience with them and I dont know which one to choose: - turtle.sourceforge.net turtle.sourceforge.net - github.com github.com - github.com github.com Best regards, Sylwester On 17/01/2021 09:47, Alex wrote: Ive used GTest, Doctest and Catch2, and theyll all get the job done; Doctest is definitely the fastest to compile, but also has the least of features; Catch and GTest have the most features. I wasnt aware that GMock could operate separately from GTest, but if it can, thats pretty neat. I believe Doctest and Catch both are single header - I know at least Catch is a single header; but I think it makes sense to use a git submodule in this case.On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenko anlutse...@gmail.com wrote: I would also suggest to look towards gtest/gmock. Its widely adopted, works with cmake out of the box, has integrations with popular IDEs and a good choice of supporting tools like parallelized runners, GUI inspectors etc. You can also use gmock separately from gtest. Andrew On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrand s...@kipro-pcb.com wrote: Hi Sylwester- I havent used HippoMocks but in general, adding QA tests is always welcome as long as they run as expected under the Fedora docker we use for online QA with GitLab. The downside of HippoMocks from what I can gather is that the project appears abandoned. If Im incorrect here, can you link to the current repository/documentation? Thanks- Seth On Fri, Jan 15, 2021 at 2:49 PM Sylwester Kocjan s.koc...@o2.pl wrote: Hello, I have two questions regarding QA code for KiCad and Id like to ask for your comments about them: 1. I reviewed contents of qa directory in KiCad repo and I saw some issues that can be fixed. Could you
[Kicad-developers] Odp: Re: Questions to the QA code
Hi Jeff, Did you use github.com github.com or that one for Java github.com github.com ? Mockitopp has its last code update about ~1,5 year ago, so it looks it has the same downside as HippoMocks. There is also Mockpp, also not actively developed: sourceforge.net sourceforge.net BR, SK Dnia 17 stycznia 2021 16:45 Jeff Young j...@rokeby.ie napisał(a): I’ve used Mockito. Can’t say I remember a thing about it, though (which could be good?). Cheers, Jeff. On 17 Jan 2021, at 14:49, Sylwester Kocjan s.koc...@o2.pl wrote: Hello, On 17/01/2021 09:47, Alex wrote: ...GTest, Doctest and Catch2, (...) theyll all get the job done They are all testing frameworks without mocking capability. We have already Boost.Test based tests and I find it unnecessary effort to migrate them, and alone they dont solve the problem. On 17/01/2021 09:47, Alex wrote:I wasnt aware that GMock could operate separately from GTest, but if it can, thats pretty neat. On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenko anlutse...@gmail.com wrote:You can also use gmock separately from gtest. Since some time gmock is a part of gtest. Any search results in the topic of gmock with another testing frameworks are quite old. I think there is a risk that it will not work. On 17/01/2021 09:47, Alex wrote:Catch is a single header I was instructed to avoid introducing new dependencies, hence my initial choice of single-header HippoMocks: gitlab.com gitlab.com On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrand s...@kipro-pcb.com wrote:The downside of HippoMocks from what I can gather is that the project appears abandoned. Sadly, this is true. There are also other choices, but I dont have any hands-on experience with them and I dont know which one to choose: - turtle.sourceforge.net turtle.sourceforge.net - github.com github.com - github.com github.com Best regards, Sylwester On 17/01/2021 09:47, Alex wrote: Ive used GTest, Doctest and Catch2, and theyll all get the job done; Doctest is definitely the fastest to compile, but also has the least of features; Catch and GTest have the most features. I wasnt aware that GMock could operate separately from GTest, but if it can, thats pretty neat. I believe Doctest and Catch both are single header - I know at least Catch is a single header; but I think it makes sense to use a git submodule in this case.On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenkoanlutse...@gmail.com wrote: I would also suggest to look towards gtest/gmock. Its widely adopted, works with cmake out of the box, has integrations with popular IDEs and a good choice of supporting tools like parallelized runners, GUI inspectors etc. You can also use gmock separately from gtest. Andrew On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrands...@kipro-pcb.com wrote: Hi Sylwester- I havent used HippoMocks but in general, adding QA tests is always welcome as long as they run as expected under the Fedora docker we use for online QA with GitLab. The downside of HippoMocks from what I can gather is that the project appears abandoned. If Im incorrect here, can you link to the current repository/documentation? Thanks- Seth On Fri, Jan 15, 2021 at 2:49 PM Sylwester Kocjans.koc...@o2.pl wrote: Hello, I have two questions regarding QA code for KiCad and Id like to ask for your comments about them: 1. I reviewed contents of qa directory in KiCad repo and I saw some issues that can be fixed. Could you please take a look at the summary and let me know if they are valid: docs.google.com docs.google.com 2. What do you think about adding mocking library to the KiCad code? I found that PGM object is mocked few times gitlab.com gitlab.com A libary for creating mocks would simplify creting the tests. In this MR and commit: gitlab.com gitlab.com gitlab.com gitlab.com there is added HippoMocks, a single-header mocking tool and it does its job. If thats ok, it could help to get rid of these duplicated mocks (maybe even hand-written mocks at all). Best regards, Sylwester __ Mailing list: launchpad.net launchpad.net
Re: [Kicad-developers] Questions to the QA code
Hello, On 17/01/2021 09:47, Alex wrote: > ...GTest, Doctest and Catch2, (...) they'll all get the job done They are all testing frameworks without mocking capability. We have already Boost.Test based tests and I find it unnecessary effort to migrate them, and alone they don't solve the problem. On 17/01/2021 09:47, Alex wrote: > I wasn't aware that GMock could operate separately from GTest, but if it can, that's pretty neat. On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenko wrote: > You can also use gmock separately from gtest. Since some time gmock is a part of gtest. Any search results in the topic of gmock with another testing frameworks are quite old. I think there is a risk that it will not work. On 17/01/2021 09:47, Alex wrote: > Catch is a single header I was instructed to avoid introducing new dependencies, hence my initial choice of single-header HippoMocks: https://gitlab.com/kicad/code/kicad/-/issues/4446#note_445185505 On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrand wrote: > The downside of HippoMocks from what I can gather is that the project appears abandoned. Sadly, this is true. There are also other choices, but I don't have any hands-on experience with them and I don't know which one to choose: - http://turtle.sourceforge.net/ - https://github.com/tpounds/mockitopp - https://github.com/rollbear/trompeloeil Best regards, Sylwester On 17/01/2021 09:47, Alex wrote: I've used GTest, Doctest and Catch2, and they'll all get the job done; Doctest is definitely the fastest to compile, but also has the least of features; Catch and GTest have the most features. I wasn't aware that GMock could operate separately from GTest, but if it can, that's pretty neat. I believe Doctest and Catch both are single header - I know at least Catch is a single header; but I think it makes sense to use a git submodule in this case. On Sun, Jan 17, 2021, 12:15 AM Andrew Lutsenko <mailto:anlutse...@gmail.com>> wrote: I would also suggest to look towards gtest/gmock. It's widely adopted, works with cmake out of the box, has integrations with popular IDEs and a good choice of supporting tools like parallelized runners, GUI inspectors etc. You can also use gmock separately from gtest. Andrew On Sat, Jan 16, 2021 at 6:47 AM Seth Hillbrand mailto:s...@kipro-pcb.com>> wrote: Hi Sylwester- I haven't used HippoMocks but in general, adding QA tests is always welcome as long as they run as expected under the Fedora docker we use for online QA with GitLab. The downside of HippoMocks from what I can gather is that the project appears abandoned. If I'm incorrect here, can you link to the current repository/documentation? Thanks- Seth On Fri, Jan 15, 2021 at 2:49 PM Sylwester Kocjan mailto:s.koc...@o2.pl>> wrote: Hello, I have two questions regarding QA code for KiCad and I'd like to ask for your comments about them: 1. I reviewed contents of qa directory in KiCad repo and I saw some issues that can be fixed. Could you please take a look at the summary and let me know if they are valid: https://docs.google.com/spreadsheets/d/14QAy9rRIHqRr4YuXfQO2GicURAG1BgJmwKe7B1H6xXI/edit#gid=326687467 2. What do you think about adding mocking library to the KiCad code? I found that PGM object is mocked few times https://gitlab.com/kicad/code/kicad/-/issues/4446#note_342766728 A libary for creating mocks would simplify creting the tests. In this MR and commit: https://gitlab.com/kicad/code/kicad/-/merge_requests/542 https://gitlab.com/kicad/code/kicad/-/merge_requests/542/diffs?commit_id=b7b401d7128057831c049a723ffc895453d65a0e there is added HippoMocks, a single-header mocking tool and it does it's job. If that's ok, it could help to get rid of these duplicated mocks (maybe even hand-written mocks at all). Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net <mailto:kicad-developers@lists.launchpad.net> Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp -- KiCad Services Corporation Logo Seth Hillbrand *Lead Developer* +1-530-302-5483 Long Beach, CA www.kipro-pcb.com <https://www.kipro-pcb.com/> i...@kipro-pcb.com <mailto:i...@kipro-pcb.com> ___ Mailing list: https://launchpad.net/~k
[Kicad-developers] Questions to the QA code
Hello, I have two questions regarding QA code for KiCad and Id like to ask for your comments about them: 1. I reviewed contents of qa directory in KiCad repo and I saw some issues that can be fixed. Could you please take a look at the summary and let me know if they are valid: docs.google.com docs.google.com 2. What do you think about adding mocking library to the KiCad code? I found that PGM object is mocked few times gitlab.com gitlab.com A libary for creating mocks would simplify creting the tests. In this MR and commit: gitlab.com gitlab.com gitlab.com gitlab.com there is added HippoMocks, a single-header mocking tool and it does its job. If thats ok, it could help to get rid of these duplicated mocks (maybe even hand-written mocks at all). Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Odp: broken pipe and a simple commit
Hi Marco, Did you try to push your commit directly on master branch? If yes, this is not correct gitlab workflow. For every change you need to create new branch, which will be merged in pull request. Heres a summary: gitlab.com gitlab.com I couldnt see exact error message. Could you please post it if its not the case? BR, SK Dnia 22 października 2020 10:34 Marco Ciampa ciam...@posteo.net napisał(a): Hello devs! I am a translator. Recently translations migrated to the main sources git repo. No problem with that, but one. I forked the master tree on gitlab, committed a simple fix on my repo to upgrade the translation script that was a little broken, and gitlab says that my commit broke the compilation? 1) that thus prevented me to post a pull request 2) this all, after waiting for more than 1 hour (!) 3) my fix is simple simple enough to not broke anything that was not already broken 4) please grant me write commit rights and spare me all this crap TIA PS: this is the commit SHA: d8da161599065e519cc1a33b8bef01 gitlab.com gitlab.com -- Saluton, Marco Ciampa __ Mailing list: launchpad.net launchpad.net Post to : kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] eeschema for IC design
Hi Pepijn, On 14/10/2020 20:00, pepijn de vos wrote: I think there are a few ways to go about it, which don't exclude each other. One is to extend the logic that adds the currents for voltage sources and resistors to also add transistors. Current release version of KiCad populates simulation signal list based on schematic components. Recently I added function NGSPICE::AllPlots(), which will retrieve names of all vectors from current simulation run. For your transistor issue I believe all you need is to rewrite DIALOG_SIGNAL_LIST::TransferDataToWindow() to use this function. Your NGSPICE object is under aParent->m_simulator. Here's a couple of links: 1. Function to change: https://gitlab.com/kicad/code/kicad/-/blob/16d5f959814f10c64e2d5a8f14fc8357c5de6fee/eeschema/dialogs/dialog_signal_list.cpp#L49 2. Function that should be used: https://gitlab.com/kicad/code/kicad/-/blob/16d5f959814f10c64e2d5a8f14fc8357c5de6fee/eeschema/sim/ngspice.h#L63 3. Simulator object: https://gitlab.com/kicad/code/kicad/-/blob/16d5f959814f10c64e2d5a8f14fc8357c5de6fee/eeschema/sim/sim_plot_frame.h#L354 Best regards & can't wait to see the results :) Sylwester On 15/10/2020 15:15, Tomasz Wlostowski wrote: On 14/10/2020 20:00, pepijn de vos wrote: Hey all, I'm a sw dev and recent IC design graduate, who made it his mission to improve open source tools for IC designers. To this end I've been playing with the recently released Sky130 PDK, which is an open source PDK that does not require any annoying NDA's and will actually allow sharing IC designs. I've been looking at eeschema a bit as one of the options to do schematic entry and simulation. However, I found that the integration with ngspice is very limited at the moment. So I'm interested in making this better! The first problem I ran into is that it can't plot the currents of a transistor no matter what you add in terms of spice directives. More info: https://forum.kicad.info/t/how-can-i-plot-transistor-currents-after-a-simulation/25324/8 So I have several questions. Would this be a good first issue to tackle? Hi Pepijn, Sure, go for it - and if you'll find it too hard as a starter, there's a ton of other issues in the simulator/ngspice integration... https://gitlab.com/kicad/code/kicad/-/issues?scope=all=%E2%9C%93=opened_name[]=ngspice I think there are a few ways to go about it, which don't exclude each other. One is to extend the logic that adds the currents for voltage sources and resistors to also add transistors. Another is to update the simulator UI to populate the signal list from the raw file, rather than its own idea of which signals were saved, so that you can add custom .save statements and plot them. I would by default tell the simulator to log all node voltages/pin currents (including transistor pins). Anything else (that is internal currents, etc.) should be parsed from .save directive (so I'm more in favor of option 2). For example, two other things that would be great to add is a way to plot algebraic expressions of different signals, This looks like a nice feature in the longer term. If you're interested in developing it, I could offer some (but not much) help due to my current workload... Tom ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Odp: Re: New dependency in docker image - tigervnc - xvfb
Thank you so much Dnia 2 września 2020 14:03 Ian McInerney ian.s.mciner...@ieee.org napisał(a): I have added xvfb to the docker images used for CI (both the Fedora 31 image and Ubuntu 18.04 image). -Ian On Fri, Aug 28, 2020 at 8:36 PM Sylwester Kocjans.koc...@o2.pl wrote: Hi again,On 23/08/2020 02:12, Ian McInerney wrote: Are you wanting to add new QA tests that need a window to the main unit test suite? Yes, thats correct. On 23/08/2020 01:28, Seth Hillbrand wrote: Could you explain further why you would need this in the official docker? Can you not specify your own docker for your tests? 1. Based on this great tutorial I made changes in qa tests which allow to use wxFrames in test suite. www.remy.org.uk www.remy.org.uk 2. I used these kind of tests with my development in following merge request (commit 3542e2da9b9 and later): gitlab.com gitlab.com 3. I want to add more of these tests, namely: I want to cover DIALOG_SIM_SETTINGS with tests and add new types of simulation in the future. 4. Sure I can install what I need on my own docker image, but I want to make it working with CI as well. Otherwise it makes no sense. 5. I was hoping that other developers can benefit from this change as well.On 23/08/2020 02:12, Ian McInerney wrote: If so, we should not use a VNC server to run them we should use xvfb to emulate an X server interface. Good point, this can be used as well, but xvfb is not available in official KiCad image. Can we consider adding it? I hope its not a big deal. Are there any obstacles (maybe Im not aware of something)?Best regards, SylwesterOn 23/08/2020 02:12, Ian McInerney wrote: Are you wanting to add new QA tests that need a window to the main unit test suite? If so, we should not use a VNC server to run them we should use xvfb to emulate an X server interface.-Ian On Sat, Aug 22, 2020 at 11:31 PM Sylwester Kocjans.koc...@o2.pl wrote: Hello, Can I ask for updating docker images with additional dependency,according to attached patch? I was trying with running wx frames in qa test application and thischange will be helpful for me. Best regards, Sylwester __ Mailing list: launchpad.net launchpad.net Post to :kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net __ Mailing list: launchpad.net launchpad.net Post to :kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] New dependency in docker image - tigervnc - xvfb
Hi again, On 23/08/2020 02:12, Ian McInerney wrote: Are you wanting to add new QA tests that need a window to the main unit test suite? Yes, that's correct. On 23/08/2020 01:28, Seth Hillbrand wrote: Could you explain further why you would need this in the official docker? Can you not specify your own docker for your tests? 1. Based on this great tutorial I made changes in qa tests which allow to use wxFrames in test suite. http://www.remy.org.uk/tech.php?tech=1407951209 2. I used these kind of tests with my development in following merge request (commit 3542e2da9b9 and later): https://gitlab.com/kicad/code/kicad/-/merge_requests/215 3. I want to add more of these tests, namely: I want to cover DIALOG_SIM_SETTINGS with tests and add new types of simulation in the future. 4. Sure I can install what I need on my own docker image, but I want to make it working with CI as well. Otherwise it makes no sense. 5. I was hoping that other developers can benefit from this change as well. On 23/08/2020 02:12, Ian McInerney wrote: If so, we should not use a VNC server to run them we should use xvfb to emulate an X server interface. Good point, this can be used as well, but xvfb is not available in official KiCad image. Can we consider adding it? I hope it's not a big deal. Are there any obstacles (maybe I'm not aware of something)? Best regards, Sylwester On 23/08/2020 02:12, Ian McInerney wrote: Are you wanting to add new QA tests that need a window to the main unit test suite? If so, we should not use a VNC server to run them we should use xvfb to emulate an X server interface. -Ian On Sat, Aug 22, 2020 at 11:31 PM Sylwester Kocjan <mailto:s.koc...@o2.pl>> wrote: Hello, Can I ask for updating docker images with additional dependency, according to attached patch? I was trying with running wx frames in qa test application and this change will be helpful for me. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net <mailto:kicad-developers@lists.launchpad.net> Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] New dependency in docker image - tigervnc
Hello, Can I ask for updating docker images with additional dependency, according to attached patch? I was trying with running wx frames in qa test application and this change will be helpful for me. Best regards, Sylwester From fd9d5e7589fa69d3b6c2d6215cba50d386d395af Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Sun, 23 Aug 2020 00:26:02 +0200 Subject: [PATCH] Add tigervnc to docker image --- README.md | 7 ++- scripts/install-dependencies.sh | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dd49b9..5ea4ea1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # source_containers -Container images for the source code CI \ No newline at end of file +Container images for the source code CI + +# Cheat sheet + +docker build -f dockerfiles/Dockerfile-ubuntu18.04 -t kicad-u:18.04 . +docker run -it --mount 'type=bind,src=[absolute path to source code],dst=/home/kicad' --expose 5900 kicad-u:18.04 /bin/bash diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 3288d26..0f30639 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -158,6 +158,7 @@ then clang-libs \ clang-tools-extra \ git-clang-format \ +tigervnc-server \ libasan \ doxygen \ graphviz" @@ -275,6 +276,7 @@ then # These are the core dependencies PACKAGES="$PACKAGES \ +tigervnc-standalone-server \ mesa-common-dev \ libcairo2-dev \ libglu1-mesa-dev \ -- 2.26.2 ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Simulation workbook limitations
Hello, I noticed that simulation .wbk files have some limitations. I documented my observations in following issue on Gitlab: https://gitlab.com/kicad/code/kicad/-/issues/2283 As only KiCad Bot is watching that issue, I wanted to advertise it here. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Mocking Kiway
Hello again, You may find it all noob questions, but I have to ask. I finally managed to mock Kiway object, but I noticed that next to virtual member functions it has non-virtual destructor. Wouldn't it cause memory leaks and other issues during deleting objects? This looks like a bug to me. Regards, Sylwester On 07/04/2020 20:26, Sylwester Kocjan wrote: Hello, I try to prepare a test where SIM_PLOT_FRAME() will be used. Constructor of this frame requires Kiway, and I stumbled upon a problem I cannot solve on my own. Could you please answer answer to my questions, so I could move on? 1. There is a Kiway object used in mocks_eeschema.cpp, in PGM_MOCK_EESCHEMA_FRAME::OnPgmExit(). Code compiles fine. 2. I try to use Kiway in test_sch_sheet.cpp, but linking fails (undefined reference to KIWAY Kiway object). 3. It gets linked again when Kiway will be defined in test_sch_sheet.cpp (can be added in mocks_eeschema.cpp as well). Diff with my changes is attached. My questions are following: - why linker doesn't complain in mocks_eeschema.cpp but does in test_sch_sheet.cpp? - why Pgm() or Kiface() can be accessed using function (therefore it is easy to mock them), and Kiway is a static object? Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Mocking Kiway
Hello, I try to prepare a test where SIM_PLOT_FRAME() will be used. Constructor of this frame requires Kiway, and I stumbled upon a problem I cannot solve on my own. Could you please answer answer to my questions, so I could move on? 1. There is a Kiway object used in mocks_eeschema.cpp, in PGM_MOCK_EESCHEMA_FRAME::OnPgmExit(). Code compiles fine. 2. I try to use Kiway in test_sch_sheet.cpp, but linking fails (undefined reference to KIWAY Kiway object). 3. It gets linked again when Kiway will be defined in test_sch_sheet.cpp (can be added in mocks_eeschema.cpp as well). Diff with my changes is attached. My questions are following: - why linker doesn't complain in mocks_eeschema.cpp but does in test_sch_sheet.cpp? - why Pgm() or Kiface() can be accessed using function (therefore it is easy to mock them), and Kiway is a static object? Best regards, Sylwester On 07/04/2020 16:58, Wayne Stambaugh wrote: [1]: https://gitlab.com/kicad/code/kicad/-/issues/4169 On 4/7/20 10:57 AM, Wayne Stambaugh wrote: Adam, No problem. A new macOS crash bug[1] just reared it's ugly head so we will have get this fixed before we freeze for 5.1.6 so you have some time to get the OCC switchover completed. Thanks for working on this and stay safe. Cheers, Wayne On 4/7/20 10:16 AM, Adam Wolf wrote: Hi folks! My KiCad time has been dramatically reduced for the past month due to schools closing for COVID-19. I hope to have the OCC switchover complete this week--there were some fixup_bundle snags again. (I swear this whole fiasco ends with me joining the CMake macOS team...) After the OCC switchover, I need to debug something weird with the 5.1.5 package, so we're ready for 5.1.6. At that point, I have one thing to clear up from a project management (not technical) perspective re the notarization and that should be able to be setup on our nightlies and releases. Thanks for your patience as I continue to improve the macOS package :) I appreciate bug reports and ideas and PRs but I'm currently only able to make time to process my KiCad backlog maybe once or twice a week. Adam Wolf ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp qa/eeschema/test_sch_sheet.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/qa/eeschema/test_sch_sheet.cpp b/qa/eeschema/test_sch_sheet.cpp index b6fadcd49..6b8ab8468 100644 --- a/qa/eeschema/test_sch_sheet.cpp +++ b/qa/eeschema/test_sch_sheet.cpp @@ -28,6 +28,14 @@ #include +#include +#include +#include + +#if 1 +KIWAYKiway( (), KFCTL_STANDALONE ); +#endif + // Code under test #include @@ -40,6 +48,7 @@ class TEST_SCH_SHEET_FIXTURE public: TEST_SCH_SHEET_FIXTURE() : m_sheet(), m_csheet( m_sheet ) { +SIM_PLOT_FRAME* frame = new SIM_PLOT_FRAME( , nullptr ); } SCH_SHEET m_sheet; ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Two patches to submit (eeschema)
Hi Ian, I opened merge request for patch 1: https://gitlab.com/kicad/code/kicad/-/merge_requests/103 Part of second one was submitted by Jean-Pierre before I started to learn gitlab. Thanks JP! Best regards, Sylwester On 10/02/2020 19:37, Ian McInerney wrote: Sylwester, Would it be possible for you to submit these are two merge requests to the KiCad GitLab repository: https://gitlab.com/kicad/code/kicad/-/tree/master. We have started to use the merge requests to better track and review the patches that are submitted. Thanks, -Ian On Mon, Feb 10, 2020 at 5:27 PM Sylwester Kocjan <mailto:s.koc...@o2.pl>> wrote: Hi, I have two patches to submit: 1. Three new types of sources have been implemented in dialog_spice_model. 2. One minor bug is fixed (removing less than zero rows from grid) and one small improvement is added (ESC will close netlist window in simulation). I'd appreciate if you could take a look at it and comment. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net <mailto:kicad-developers@lists.launchpad.net> Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Two patches to submit (eeschema)
Hi, I have two patches to submit: 1. Three new types of sources have been implemented in dialog_spice_model. 2. One minor bug is fixed (removing less than zero rows from grid) and one small improvement is added (ESC will close netlist window in simulation). I'd appreciate if you could take a look at it and comment. Best regards, Sylwester <> <> ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] Three new source types added to DIALOG_SPICE_MODEL
Hi, Evan's patch was merged, but mine with code change for those sources is not included in master currently. Can I kindly ask for update, is there something wrong with my code? https://drive.google.com/file/d/1x_YDsIw6FhgJFEsDgteEl5L5PGwSsCiz/view?usp=sharing Best regards, Sylwester On 13/11/2019 22:48, Wayne Stambaugh wrote: Hi Evan, I think keeping the included project symbol library is the safest bet in case the global library changes. We had to continually update demos in the past so this is the path of least resistance. Cheers, Wayne On 11/13/19 4:24 PM, Evan Shultz wrote: Hi Wayne, Thanks! Yes it is! It was merged in the GH PR I sent above, and is currently at https://github.com/KiCad/kicad-symbols and mirrored at http://kicad-pcb.org/libraries/download/ from the main KiCad website. So you can merge to 5.1. Would it be accepted if I updated the existing demo projects with symbols from this lib instead of the "unique" symbols used in the demo projects now? On Wed, Nov 13, 2019 at 1:18 PM Wayne Stambaugh mailto:stambau...@gmail.com>> wrote: Hi Evan, I merged your patch into the master branch. Thank you for your contribution to KiCad. Just out of curiosity, is the Simulation_SPICE library shipped with the 5.1 build? If so, I can merger this demo into the 5.1 branch. Users might find it useful to demo the sources provided by this library. If not, then there is no reason to merge it into 5.1. Cheers, Wayne On 11/12/19 2:55 PM, Evan Shultz wrote: > Hi Wayne, > > Attached is the patch for the new V and I source simulation demo project > I mentioned. For reference, it was initially posted > at https://github.com/KiCad/kicad-symbols/pull/1473. > > If you like, I can also update the existing simulation demos with > 'standard' library components in the Simulation_SPICE directory instead > of the 'one-off' symbols used now. > > Sorry for the hijacking. > > Evan > > On Tue, Nov 5, 2019 at 5:31 AM Wayne Stambaugh mailto:stambau...@gmail.com> > <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>>> wrote: > > Hi Even, > > I was cleaning my inbox and I noticed I hadn't commented on your > request. If you have a demo project that utilizes the spice library > changes you made, I would be more than happy to include it in master. > Please send a patch with demo project and I will merge it after I've > tested it and made any comments. > > Cheers, > > Wayne > > On 10/23/19 3:55 PM, Evan Shultz wrote: > > Hi, > > > > Apologies for the slight tangent... > > > > When I submitted symbols for all V and I sources supported by ngspice > > at https://github.com/KiCad/kicad-symbols/pull/1473, I created a > > simulation schematic to show off their output waveforms. Some of them > > can use the source control features here. I thought this might be > > helpful when testing this patch > > > > It may also be useful to include the SPICE source simulation as a > demo. > > If so, should I make a bug on launchpad? > > > > On Sun, Oct 20, 2019 at 2:00 PM Sylwester Kocjan mailto:s.koc...@o2.pl> > <mailto:s.koc...@o2.pl <mailto:s.koc...@o2.pl>> > > <mailto:s.koc...@o2.pl <mailto:s.koc...@o2.pl> <mailto:s.koc...@o2.pl <mailto:s.koc...@o2.pl>>>> wrote: > > > > On 20/10/2019 20:53, Seth Hillbrand wrote: > > > On 2019-10-20 08:36, Sylwester Kocjan wrote: > > >> Hi, > > >> > > >> Here is a patch with three additional source models > implemented: > > SFFM, > > >> AM and Random. > > >> > > >> I hope this looks ok, cause I had troubles with configuring > > >> clang-format on Windows. If no, I can correct. > > >> > > >> Best regards, > > >> Sylwester > > >> > > >> ___ > > >> Mailing list: https://launchpad.net/~kicad-developers > > >> Post to : kicad-developers@lists.launchpad.net <mailto:kicad-developers@lists.launchpad.net>
Re: [Kicad-developers] New lead developer announcement
On 07/11/2019 21:14, Wayne Stambaugh wrote: Ian's contributions have earned him this privilege and we are grateful for his efforts. Congratulations :) Cheers, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name
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 and signal list is poor, however filtering works fine. Sorry I'm too busy to take more time to look on your change Jonatan. Regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] simulation: allow entering signals (spice vectors) by name
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 implemented pt. 4 from: https://bugs.launchpad.net/kicad/+bug/1814188 Maybe it's worth to update that bug report if it will be merged. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] .op simulation
Hi Seth, On 23/10/2019 15:39, Seth Hillbrand wrote: > This does bring up, however, that our simulator does not handle .op > well. It won't probe the values or print them easily. LTSpice prints > the DC Operating Point table for all nets after running in this mode. I just looked into ngspice manual and it looks that for tables all we need are additional .print lines in netlist (chapter 15.6.2). Regarding probe: I think it should be grayed in case of .op analysis. Best regards, Sylwester On 23/10/2019 15:39, Seth Hillbrand wrote: On 2019-10-22 23:35, Maciej Suminski wrote: Hi Sylwester, I admit I have not checked your patch in action, but it seems that it will not accept ".op" command, unless it is followed by a space. Since ".op" does not take any parameters, I presume it is a rare case when one adds an extra space after the command. Regards, Orson Thanks Orson! You are right, it was skipping the unpadded .op. I missed this as the .tran command does print the DC operating point and I was checking in a multi-command circuit. Good catch. I've fixed up the command parsing to ensure we pad the command lines. This does bring up, however, that our simulator does not handle .op well. It won't probe the values or print them easily. LTSpice prints the DC Operating Point table for all nets after running in this mode. Not that LTSpice is the model of usability but there may be something to this. -Seth ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] SPICE .option confused with .op simulation
Hi, Thanks for pointing that. Maybe I'll try to prepare some tests in boost for symulation to test my changes better. However, I'd like to share my opinion during this occasion. I think that parsing SPICE commands in KiCad is too much effort. Holger Vogt said once that this is very difficult because SPICE language was designed before lex become popular. I believe optimal way for simulation would be following: - strive to handle all types of simulations on DIALOG_SIM_SETTINGS tabs - get rid of user command in schematic sheet - two additional text fields on simulation options: pre- and post-sim user directives - passing these user directives directly to output netlist - pre-sim can be for example specific .options, post-sim could be .meas either of them can be .control ... .endc - ideally if all these settings could be saved in file and loaded from menu Sure, that's a lot of work but hopefully I can help with some of this. Best regards, Sylwester On 23/10/2019 15:39, Seth Hillbrand wrote: On 2019-10-22 23:35, Maciej Suminski wrote: Hi Sylwester, I admit I have not checked your patch in action, but it seems that it will not accept ".op" command, unless it is followed by a space. Since ".op" does not take any parameters, I presume it is a rare case when one adds an extra space after the command. Regards, Orson Thanks Orson! You are right, it was skipping the unpadded .op. I missed this as the .tran command does print the DC operating point and I was checking in a multi-command circuit. Good catch. I've fixed up the command parsing to ensure we pad the command lines. This does bring up, however, that our simulator does not handle .op well. It won't probe the values or print them easily. LTSpice prints the DC Operating Point table for all nets after running in this mode. Not that LTSpice is the model of usability but there may be something to this. -Seth ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [PATCH] Three new source types added to DIALOG_SPICE_MODEL
On 20/10/2019 20:53, Seth Hillbrand wrote: On 2019-10-20 08:36, Sylwester Kocjan wrote: Hi, Here is a patch with three additional source models implemented: SFFM, AM and Random. I hope this looks ok, cause I had troubles with configuring clang-format on Windows. If no, I can correct. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp Hi Sylwester- There is something odd with your patch. See the attached screenshot. I cannot apply this to test as there are a number of unknown characters at the end of lines and the end of the file. -Seth Seth Hillbrand KiCad Services Corporation https://www.kipro-pcb.com +1 530 302 5483 | +1 212 603 9372 Hi Seth, You are right, this patch is quite big and was truncated by mail servers, something gone wrong during sending mail. I've put it to google drive: https://drive.google.com/file/d/1x_YDsIw6FhgJFEsDgteEl5L5PGwSsCiz/view?usp=sharing Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] [PATCH] Three new source types added to DIALOG_SPICE_MODEL
Hi, Here is a patch with three additional source models implemented: SFFM, AM and Random. I hope this looks ok, cause I had troubles with configuring clang-format on Windows. If no, I can correct. Best regards, Sylwester From 5eb344844c7c246e973b312d0e4413afadbb8977 Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Sun, 20 Oct 2019 17:30:43 +0200 Subject: [PATCH] Eeschema: Adding new source types in SPICE model NEW: Adds support in eeschema for three new source types used in .TRAN simulation: single frequency FM, AM, and random. --- eeschema/dialogs/dialog_spice_model.cpp | 166 +- eeschema/dialogs/dialog_spice_model.h| 5 +- eeschema/dialogs/dialog_spice_model_base.cpp | 650 +- eeschema/dialogs/dialog_spice_model_base.fbp | 24945 - eeschema/dialogs/dialog_spice_model_base.h |73 +- 5 files changed, 12611 insertions(+), 13228 deletions(-) diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp index fa3441040..c14ef1783 100644 --- a/eeschema/dialogs/dialog_spice_model.cpp +++ b/eeschema/dialogs/dialog_spice_model.cpp @@ -148,14 +148,39 @@ void DIALOG_SPICE_MODEL::Init() m_expRiseConst->SetValidator( m_spiceEmptyValidator ); m_expFallDelay->SetValidator( m_spiceEmptyValidator ); m_expFallConst->SetValidator( m_spiceEmptyValidator ); + +m_fmOffset->SetValidator( m_spiceEmptyValidator ); +m_fmAmplitude->SetValidator( m_spiceEmptyValidator ); +m_fmFcarrier->SetValidator( m_spiceEmptyValidator ); +m_fmModIndex->SetValidator( m_spiceEmptyValidator ); +m_fmFsignal->SetValidator( m_spiceEmptyValidator ); +m_fmPhaseC->SetValidator( m_spiceEmptyValidator ); +m_fmPhaseS->SetValidator( m_spiceEmptyValidator ); + +m_amAmplitude->SetValidator( m_spiceEmptyValidator ); +m_amOffset->SetValidator( m_spiceEmptyValidator ); +m_amModulatingFreq->SetValidator( m_spiceEmptyValidator ); +m_amCarrierFreq->SetValidator( m_spiceEmptyValidator ); +m_amSignalDelay->SetValidator( m_spiceEmptyValidator ); +m_amPhase->SetValidator( m_spiceEmptyValidator ); + +m_rnTS->SetValidator( m_spiceEmptyValidator ); +m_rnTD->SetValidator( m_spiceEmptyValidator ); +m_rnParam1->SetValidator( m_spiceEmptyValidator ); +m_rnParam2->SetValidator( m_spiceEmptyValidator ); m_pwlTimeCol = m_pwlValList->AppendColumn( "Time [s]", wxLIST_FORMAT_LEFT, 100 ); m_pwlValueCol = m_pwlValList->AppendColumn( "Value [V/A]", wxLIST_FORMAT_LEFT, 100 ); -m_sdbSizerOK->SetDefault(); -} - - +m_sdbSizerOK->SetDefault(); + +// Hide pages that aren't fully implemented yet +// wxPanel::Hide() isn't enough on some platforms +m_powerNotebook->RemovePage( m_powerNotebook->FindPage( m_pwrTransNoise ) ); +m_powerNotebook->RemovePage( m_powerNotebook->FindPage( m_pwrExtData ) ); +} + + bool DIALOG_SPICE_MODEL::TransferDataFromWindow() { if( !DIALOG_SPICE_MODEL_BASE::TransferDataFromWindow() ) @@ -466,6 +491,52 @@ bool DIALOG_SPICE_MODEL::parsePowerSource( const wxString& aModel ) } } + +else if( tkn == "sffm" ) +{ +m_powerNotebook->SetSelection( m_powerNotebook->FindPage( m_pwrFm ) ); + +genericProcessing = true; +genericReqParamsCount = 4; +genericControls = { m_fmOffset, m_fmAmplitude, +m_fmFcarrier, m_fmModIndex, m_fmFsignal, m_fmFsignal, m_fmPhaseC, m_fmPhaseS }; +} + + +else if( tkn == "am" ) +{ +m_powerNotebook->SetSelection( m_powerNotebook->FindPage( m_pwrAm ) ); + +genericProcessing = true; +genericReqParamsCount = 5; +genericControls = { m_amAmplitude, m_amOffset, +m_amModulatingFreq, m_amCarrierFreq, m_amSignalDelay, m_amPhase }; +} + + +else if( tkn == "trrandom" ) +{ +m_powerNotebook->SetSelection( m_powerNotebook->FindPage( m_pwrRandom ) ); + +// first token will configure drop-down list +if( !tokenizer.HasMoreTokens() ) +return false; + +tkn = tokenizer.GetNextToken().Lower(); +long type; +if( !tkn.ToLong( ) ) +return false; + +m_rnType->SetSelection( type - 1 ); +wxCommandEvent dummy; +onRandomSourceType( dummy ); + +// remaining parameters can be handled in generic way +genericProcessing = true; +genericReqParamsCount = 4; +genericControls = { m_rnTS, m_rnTD, m_rnParam1, m_rnParam2 }; +} + else { @@ -551,7 +622,7 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const return false; genericPro
[Kicad-developers] [RFC] New parameters on simulation dialog
Hi, I believe I will soon be ready to provide a patch with changes including handling initial conditions in SPICE .tran simulation. At the same time some new simulation parameters were prepared. However recently I checked GNOME design principles: https://developer.gnome.org/hig/stable/design-principles.html.en and one of them gave me food for thought: > Every control or piece of information that you add to your application > creates additional work for users, and increases the complexity of > your application — potentially making it more difficult and less > pleasurable to use. Therefore, only include essential controls and > information in your application interface. > When adding a new control or piece of information, always take a > moment to question whether it is necessary. Initially I wanted to add following options: Temp, Tnom, savecurrents, AbsTol, RelTol, Rshunt, VNTol, NoOpAc, TRAN Method, UIC, ChgTol, TRTol. Now I think that at least three of them are questionable: VNTol, ChgTol, TRTol. They are not easy to understand and adjusting them will be rarely necessary. Therefore I'd like to ask for your opinions which of them are OK to include in KiCad. For your reference you can check the sheet I prepared during design (see attachment) and my repository: https://github.com/skocjan/kicad_initialconditions/tree/Sim_InitialConditions_SK Thanks in advance! Sylwester NewParams.ods Description: application/vnd.oasis.opendocument.spreadsheet ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] [PATCH] SPICE .option confused with .op simulation
Hi all, If user wants to add custom SPICE options on schematic, for example .option TEMP=60 .option TNOM=27 It will get confused with .op simulation and will be included on DIALOG_SIM_SETTINGS in custom simulation directive text field. Eventually simulation will fail. Please find the patch attached, where this issue is prevented. Best regards, Sylwester From 96dd3e764cf1a949f6720158c4c97bced6c6fe76 Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Sat, 19 Oct 2019 21:33:43 +0200 Subject: [PATCH] eeschema: fixed recognizing SPICE sim directive --- eeschema/sim/netlist_exporter_pspice_sim.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sim/netlist_exporter_pspice_sim.cpp b/eeschema/sim/netlist_exporter_pspice_sim.cpp index a7ab32470..45aeba85a 100644 --- a/eeschema/sim/netlist_exporter_pspice_sim.cpp +++ b/eeschema/sim/netlist_exporter_pspice_sim.cpp @@ -119,9 +119,9 @@ SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::GetSimType() SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType( const wxString& aCmd ) { const std::map simCmds = { -{ ".ac", ST_AC }, { ".dc", ST_DC }, { ".disto", ST_DISTORTION }, { ".noise", ST_NOISE }, -{ ".op", ST_OP }, { ".pz", ST_POLE_ZERO }, { ".sens", ST_SENSITIVITY }, { ".tf", ST_TRANS_FUNC }, -{ ".tran", ST_TRANSIENT } +{ ".ac ", ST_AC }, { ".dc ", ST_DC }, { ".disto ", ST_DISTORTION }, { ".noise ", ST_NOISE }, +{ ".op ", ST_OP }, { ".pz ", ST_POLE_ZERO }, { ".sens ", ST_SENSITIVITY }, { ".tf ", ST_TRANS_FUNC }, +{ ".tran ", ST_TRANSIENT } }; wxString lcaseCmd = aCmd.Lower(); -- 2.23.0 ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] wxUpdateUIEvent abuse
Hi Wayne, In the light of below finding, is this review comment still valid? It belonged to my changes for initial conditions[1]. Dnia 27 czerwca 2019 21:04 Wayne Stambaugh napisał(a): > Get rid of DIALOG_SIM_SETTINGS::disableCtrlOnCheckboxEvent() and use the > appropriate wxUpdateUIEvent[1] handler to enable and/or disable any > controls. Manually doing this will almost certainly lead to broken > control states. We have done this poorly so many times in the past that > I am not allowing it in new code. As I understand wxUpdateUIEvent is useful for scenarios like this or similar: > 1. Application wants to connect to target hardware. > 2. State of hardware changes - application updates status on GUI. > 3. Connectivity is lost - some functions on GUI become grayed. Thanks to wxUpdateUIEvent GUI update can be processed separate from application logic. When we want to change state of controls depending on other controls we can use simply event handlers. The same logic can be applied to the multiple events or multiple controls, like in dialog_spice_model_base.fbp, field m_modelName, events OnCombobox and OnText. Best regards, Sylwester [1]: https://github.com/skocjan/kicad_initialconditions/tree/Sim_InitialConditions_SK On 18/09/2019 22:01, Wayne Stambaugh wrote: Given the recent rash of odd dialog UI behavior, I did some digging and it appears that we might be abusing wxUpdateUIEvent[1]. This event handler was specifically designed for updating controls that respond to command events such as menus, toolbars, buttons, etc. Using them for anything else is risky. I would avoid using UI control object calls inside a wxUpdaetUIEvent handler other than those provided by the wxUpdateUIEvent object itself. I'm pretty sure making changes to a control inside a wxUpdateUIEvent handler can spawn an event loop where the changes made to the control generate a new wxUpdateUIEvent. A better solution might be to use wxIdleEvent to do any dialog control post processing as a one shot. Cheers, Wayne [1]: https://docs.wxwidgets.org/3.0/classwx_update_u_i_event.html#aa25df58e7047f819f5dd0520eb2cc8ea ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] [patch][eeschema] Show SPICE Netlist window should not be editable
Hi, I prepared another patch for KiCad with two fixes: 1. The same as previously, added ESC handler for "Show SPICE Netlist" window, but this time I didn't change behavior of text field. Still I would like to have handling escape on that window, it will be convenient during testing simulations. 2. When rows were deleted from grid with fields, there was a message generated with number less than zero. I found it during playing with my changes regarding initial conditions. On a Linux it resulted with failed assert and wrong number of rows. On Windows, I don't see message box complaining, but still grid looked bad. This patch fixes that, but I didn't test it on Linux, only on Windows. Best regards, Sylwester On 05/07/2019 23:01, Wayne Stambaugh wrote: Hi Sylwester, There is a minor problem with this patch. You can no longer copy the contents of the netlist viewer window to the clipboard (a least on linux) with your patch so I am reluctant to merge it because I'm sure users will want to be able to copy and paste the generated netlist for bug reporting purposes. Cheers, Wayne On 6/23/19 4:45 PM, Sylwester Kocjan wrote: Hello, I noticed in simulation settings, that window displaying netlist for simulation is editable. I think it is a bug and may be confusing for user (typing random text didn't have influence on simulation) See the attachment for a patch, where I fixed this and also added key handler for wxStyledTextCtrl. Thanks to this window can be dismissed when pressing Escape. Is it OK to share patch directly here or should I rather create bug report? Best regards, Sylwek ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp From bcb5a9968bf09df91f02739b618ac94260913c5e Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Fri, 11 Oct 2019 21:30:35 +0200 Subject: [PATCH] eeschema: fixed removing negative number of rows from grid. eeschema: added ESC handler to 'Show SPICE Netlist' window. --- eeschema/dialogs/dialog_edit_component_in_lib.cpp| 2 +- .../dialogs/dialog_edit_component_in_schematic.cpp | 2 +- eeschema/sim/sim_plot_frame.cpp | 12 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index ea00e1011..31feec555 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -604,7 +604,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnEditSpiceModel( wxCommandEvent& event ) } else if( diff < 0 ) { -wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, diff ); +wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, -diff ); m_grid->ProcessTableMessage( msg ); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 1d7a2b954..5850cf5e9 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -299,7 +299,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSpiceModel( wxCommandEvent& event } else if( diff < 0 ) { -wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, diff ); +wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, -diff ); m_grid->ProcessTableMessage( msg ); } diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index c24b0e165..ece328150 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -1229,6 +1229,12 @@ void SIM_PLOT_FRAME::onShowNetlist( wxCommandEvent& event ) EndModal( GetReturnCode() ); } +void onEscape( wxKeyEvent& evt ) +{ +if( evt.GetKeyCode() == WXK_ESCAPE ) +Close(); +} + NETLIST_VIEW_DIALOG(wxWindow* parent, wxString source) : wxDialog(parent, wxID_ANY, "SPICE Netlist", wxDefaultPosition, wxSize(1500,900), @@ -1252,8 +1258,10 @@ void SIM_PLOT_FRAME::onShowNetlist( wxCommandEvent& event ) sizer->Add( text, 1, wxEXPAND ); SetSizer( sizer ); -Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NETLIST_VIEW_DIALOG::onClose ), NULL, -this ); +Connect( wxEVT_CLOSE_WIN
[Kicad-developers] Multiple delete in dialog_spice_model.cpp
Hi KiCad-devs & Seth, I was looking at the code for handling spice fields and I noticed something that I either don't understand or is unnecessary. In this commit: https://github.com/KiCad/kicad-source-mirror/commit/170ff66cbbd4f17ebf6fddf24efa7b4d227c15a1 there was a change added in dialog_spice_model.cpp:241-246, which is present in current master branch. This is how it looks right now: // Apply the settings for( int i = 0; i < SF_END; ++i ) { if( m_fieldsTmp.count( (SPICE_FIELD) i ) > 0 && !m_fieldsTmp.at( i ).IsEmpty() ) { if( m_useSchFields ) getSchField( i ).SetText( m_fieldsTmp[i] ); else getLibField( i ).SetText( m_fieldsTmp[i] ); } else { // Erase empty fields (having empty fields causes a warning in the properties dialog) const wxString& spiceField = NETLIST_EXPORTER_PSPICE::GetSpiceFieldName( (SPICE_FIELD) i ); if( m_useSchFields ) m_schfields->erase( std::remove_if( m_schfields->begin(), m_schfields->end(), [&]( const SCH_FIELD& f ) { return f.GetName() == spiceField; } ), m_schfields->end() ); else m_libfields->erase( std::remove_if( m_libfields->begin(), m_libfields->end(), [&]( const LIB_FIELD& f ) { return f.GetName() == spiceField; } ), m_libfields->end() ); } } In this loop we iterate over all available SPICE fields while m_fieldsTmp contain new values to be stored. If m_fieldsTmp is non-empty, we add a new value to the field. If it's empty, we will delete this field. My question is, why deletion is repeated: at first there is called remove_if(), and later erase(), which will delete all the fields behind the removed one. From my point of view it looks like remove_if() only should be enough. Best regards, Sylwester ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Additional parameters on simulation dialog
Hi Wayne KiCad devs, I made some progress with simulation changes (see the attached patch). I fixed your findings (hopefully this is what you intended) and made further changes. Currently it is possible to set initial condition for capacitors and inductors in DIALOG_SPICE_MODEL.At the same time I found a bug, I think fixing would require some architectural changes: 1. User adds initial condition to the element - additional field Spice_IC is saved in component. 2. User opens SPICE options for component and removes initial condition. 3. In DIALOG_SPICE_MODEL::TransferDa IC field from instance of DIALOG_EDIT_COMPONENT_IN_SCHEM will be cleared. 4. DIALOG_EDIT_COMPONENT_IN_SCHEM wants to remove a row from wxGrid based on different number of elements in DIALOG_EDIT_COMPONENT_IN_SCHEM 5. Before this happen, grid wants to be updated and calls FIELDS_GRID_TABLET::GetValue for a row that is going to be deleted - wxCHECK( aRow GetNumberRows(), wxEmptyString ) fails. This issue is reproducible in 100% cases on my machine with Linux and I think that something similar can occur with DIALOG_EDIT_COMPONENT_IN_LIBRABest regards, Sylwester Dnia 27 czerwca 2019 21:04 Wayne Stambaugh stambau...@gmail.com napisał(a): Hi Sylwester, I took a look at your repo and I have a few comments on your changes. I did not test it so there may be functional issues as well. Please simplify your logic in DIALOG_SIM_SETTINGS::TransferD Its way more complicated than it needs to be. Get rid of DIALOG_SIM_SETTINGS::disableCt and use the appropriate wxUpdateUIEvent[1] handler to enable and/or disable any controls. Manually doing this will almost certainly lead to broken control states. We have done this poorly so many times in the past that I am not allowing it in new code. If you want to submit your changes for consideration, you should squash you changes into a single patch and submit the output of `git format-patch` to the mailing list. Cheers, Wayne [1]: docs.wxwidgets.org docs.wxwidgets.org On 6/21/19 3:00 PM, Sylwester Kocjan wrote: Hi, I prepared some changes in KiCad simulation dialog. They are about additional simulation parameters. According to tutorial, which Ive found on website, I store them on GitHub repository in branch Sim_InitialConditions_SK here: github.com github.com Could you please have a look and do some review if possible? Id be grateful for feedback if these changes are OK. In future Id like to implement OP analysis using some controls Ive added ( bugs.launchpad.net bugs.launchpad.net Additionally I also prepared polish translation for new strings. My aim was to make simulation with arbitrary initial conditions possible (additionally I added other options). Right now it is possible to enable checkbox UIC on TRAN tab, but there is no possibility to set IC to any arbitrary value in element properties. Im afraid it will involve change in .sch format. Please take note that it is also possible to define initial conditions for entire nodes instead of capacitors or inductors (for example: .ic v(11)=5 v(4)=-5 v(2)=2.2, see ngspice manual, chapter 15.2.2). It is also a challenge. So in current state we can use for initial conditions results of .OP analysis or default zero. From my point of view these are the topics, which should be taken into account during review: - in simulation code sometimes there is used \n, sometimes \r\n. Maybe it should be unified? Is there a common definition for newline in wxWidgets? - I added .option savecurrents: someone added TODO that it doesnt work. Maybe should we hide this control? - something happened to colours on dialog windows, see attached image. I dont know what is it and how to fix it. seems to be unrelated to my changes, but maybe Im wrong? (this is visible on Ubuntu 18.04) - some feedback regarding how to add IC field to capacitors, inductors or nodes will be very appreciated ;) Limitations of my changes: - parsing SPICE .options is not implemented (in bool DIALOG_SIM_SETTINGS::parseComm const wxString aCommand )) Best regards, Sylwek __ Mailing list: launchpad.net launchpad.net Post to : kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net __ Mailing list: launchpad.net launchpad.net Post to : kicad-developers@lists.launchp Unsubscribe : launchpad.net launchpad.net More help : help.launchpad.net help.launchpad.net ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] [patch][eeschema] Show SPICE Netlist window should not be editable
Hello, I noticed in simulation settings, that window displaying netlist for simulation is editable. I think it is a bug and may be confusing for user (typing random text didn't have influence on simulation) See the attachment for a patch, where I fixed this and also added key handler for wxStyledTextCtrl. Thanks to this window can be dismissed when pressing Escape. Is it OK to share patch directly here or should I rather create bug report? Best regards, Sylwek >From 7d3fcfa1a96c95ddab71850db3175e528158a966 Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Sun, 23 Jun 2019 16:28:31 +0200 Subject: [PATCH] eeschema: netlist view findow changed to read only and added ESC key handler --- eeschema/sim/sim_plot_frame.cpp | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 6dfd664b5..751819211 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -1219,6 +1219,12 @@ void SIM_PLOT_FRAME::onShowNetlist( wxCommandEvent& event ) EndModal( GetReturnCode() ); } +void onEscape( wxKeyEvent& evt ) +{ +if( evt.GetKeyCode() == WXK_ESCAPE ) +Close(); +} + NETLIST_VIEW_DIALOG(wxWindow* parent, wxString source) : wxDialog(parent, wxID_ANY, "SPICE Netlist", wxDefaultPosition, wxSize(1500,900), @@ -1236,14 +1242,17 @@ void SIM_PLOT_FRAME::onShowNetlist( wxCommandEvent& event ) text->SetText( source ); text->StyleClearAll(); +text->SetReadOnly( true ); text->SetLexer( wxSTC_LEX_SPICE ); wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL ); sizer->Add( text, 1, wxEXPAND ); SetSizer( sizer ); -Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NETLIST_VIEW_DIALOG::onClose ), NULL, -this ); +Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( NETLIST_VIEW_DIALOG::onClose ), +NULL, this ); +text->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( NETLIST_VIEW_DIALOG::onEscape ), +NULL, this ); } }; -- 2.17.1 ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Additional parameters on simulation dialog
Thanks Seth, > tabs being used instead of spaces and two blank lines between > functions in .cpp files. It looks like retval in > DIALOG_SIM_SETTINGS::TransferDataToWindow() isn't getting initialized > properly. Fixed in commit: e87ee2624892ad51e95cd9b8206e8d408de46939 > Are the "," replacements in DIALOG_SIM_SETTINGS::updateNetlistOpts() > there to provide support for alternate locales? Yes, I believe ngspice requires dot and I think it should be enough for floats representing temperature to just do such replace. > In KiCad's codebase, \n is standard. But we don't really worry (...) I think we have misunderstanding here. I was wondering not about Windows/Unix line endings in source files, but rather line endings used in string literals in KiCad source code, for example: netlist_exporter_pspice_sim.cpp: 100:simCmd += wxString::Format( "%s\r\n", dir ); .. 217:aFormatter->Print( 0, "%s\n", (const char*) m_simCommand.c_str() ); netlist_exporter_pspice.cpp: 410:wxStringTokenizer tokenizer( text, "\r\n" ); .. 483:aFormatter->Print( 0, "%s\n", (const char*) dir.c_str() ); Maybe they should be unified somehow? > The IC field could be added as a key-value parameter (...) I still don't understand how to do it, so it will take some more time. Best regards, Sylwek ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Additional parameters on simulation dialog
Hi, I prepared some changes in KiCad simulation dialog. They are about additional simulation parameters. According to tutorial, which I've found on website, I store them on GitHub repository in branch "Sim_InitialConditions_SK" here: https://github.com/skocjan/kicad_initialconditions.git Could you please have a look and do some review if possible? I'd be grateful for feedback if these changes are OK. In future I'd like to implement OP analysis using some controls I've added (https://bugs.launchpad.net/kicad/+bug/1821360). Additionally I also prepared polish translation for new strings. My aim was to make simulation with arbitrary initial conditions possible (additionally I added other options). Right now it is possible to enable checkbox UIC on TRAN tab, but there is no possibility to set IC to any arbitrary value in element properties. I'm afraid it will involve change in .sch format. Please take note that it is also possible to define initial conditions for entire nodes instead of capacitors or inductors (for example: ".ic v(11)=5 v(4)=-5 v(2)=2.2", see ngspice manual, chapter 15.2.2). It is also a challenge. So in current state we can use for initial conditions results of .OP analysis or default zero. From my point of view these are the topics, which should be taken into account during review: - in simulation code sometimes there is used '\n', sometimes "\r\n". Maybe it should be unified? Is there a common definition for newline in wxWidgets? - I added .option savecurrents: someone added TODO that it doesn't work. Maybe should we hide this control? - something happened to colours on dialog windows, see attached image. I don't know what is it and how to fix it. seems to be unrelated to my changes, but maybe I'm wrong? (this is visible on Ubuntu 18.04) - some feedback regarding how to add IC field to capacitors, inductors or nodes will be very appreciated ;) Limitations of my changes: - parsing SPICE .options is not implemented (in bool DIALOG_SIM_SETTINGS::parseCommand( const wxString& aCommand )) Best regards, Sylwek ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp