Closed ProtonTheFox closed 6 months ago
Thank you for the detailed report. I am glad you have a temporary fix in place for your own use at the moment.
It will probably take me awhile to get back to this to solve this in more detail, but we will take care of it.
Thanks for the quick reply, I'll stay tuned.
I think this has been solved in the latest commit. Please give it a try and reopen the issue if you notice any problems or have additional feedback.
Thank you for your help!
Hi, here's an other issue about the
--batch
option. The last fix did not work for me and the last thread was tagged as closed (#44 ), so I open another one.I noticed that opening the frequency plot window starts the frequency loop automatically if the batch option is activated. I decided to dig further into
main.c
and this piece of code confirms that this behavior is expected:https://github.com/KJ7LNW/xnec2c/blob/master/src/main.c#L627-L637
As
rc_config.main_loop_start
had been set to 1 by the previously modified code.A quick and dirty modification forces the frequency loop to run if
rc_config.main_loop_start
has been set to 1:This now works as it should, so it's good enough for me. But it shows another flaw: it runs the frequency loop at startup even without the
batch
option, because the frequency loop start state is stuck to 1 in myxnec2c.conf
file. That's a 2-bugs-in-1 issue.I also previously thought about forcing the plot window to show up in
--batch
mode, just like it does in--optimize
mode. I didn't manage to do that because my knowledge of xnec2c's source code is very limited, but it would be useful to have a real time preview of your results when doing batch simulations. In addition of that, the logic in the code portion I modified would remain unchanged.Edit: well, a quick fix for the frequency loop start when neither
--batch
nor--optimize
is on would be this little modification. I changed this:https://github.com/KJ7LNW/xnec2c/blob/master/src/main.c#L383-L384
To this:
Still no change in the conf file, but these flags seem to override what's written inside anyway.