Variable Config ID: I_image_config Section: image_sections[image_chooser] Option: I_image_correct Write Back: I_Gain
GUI Range ID: I_Gain Default: I_image_config I found a question similar to this one on the forum but no one answered it so I hope I can get a response to this one. I have shown above my configuration for two blocks in my flowgraph. I wish to write to and read from an INI file with 5 sections. I can successfully write the value of I_Gain to I_image_correct in a single section when I make an adjustment to the I_Gain Range control. I want to use a Chooser with the ID: image_chooser to select another section to write a value of I_Gain to that section. However, the Chooser callback writes the current value of I_Gain immediately to the file without my making a change to I_Gain. This is a major problem if I wish to select a Section that I had already stored a value in. Whatever the current value of I_Gain happens to be is written to the Section. For example: I change I_Gain to 1.1 for Section 40. I then select Section 80 which immediately upon selection has 1.1 written to it. I then select I_Gain = 1.5 which stores that value in Section 80. I then select Section 40 in hopes of using I_Gain = 1.1 but find that in the process of selection the value of I_Gain has changed to 1.5. This makes no sense since it defeats the purpose of saving a configuration in a file. How do I save parameters to different sections without the sections being overwritten? The other main issue is how do I read from the file so that I can set I_Gain when the Section is selected? I don’t see how to do this. The only time I have seen the file read is on initialization. I presume this is due to the fact that I set the default value of I_Gain to I_image_config. I need to to be able to read a value on demand. By the way, I have 3 parameters to save and recall in each of 5 Sections. Any help will be greatly appreciated. I have been wrestling with this issue for quite some time. -- This email has been checked for viruses by AVG. https://www.avg.com
