I would like to have the option to read some of the variables created in the get_driver_model upon initialization.
Some variables might be unsafe to read, so this cannot be a default solution, but some might be important: as an example, I have a laser that gets 'armed' upon initialization, but the checkbox in the GUI is created with a default 'False' state. I thus need a first 'read' to set it in the correct state, otherwise I end up in a situation where the display is the inverse of the actual state.
Two possibilitie:
only read the boolean variables (by default). I think this should be safe and helps to start with the GUI in a correct state
add an option to read the value immediately upon instantiation.
Hi! I added an option called 'read_init' in get_driver_model to tell the GUI which variable to read upon device instantiation. Look at commit f42c061 if you are still interested.
I would like to have the option to read some of the variables created in the get_driver_model upon initialization.
Some variables might be unsafe to read, so this cannot be a default solution, but some might be important: as an example, I have a laser that gets 'armed' upon initialization, but the checkbox in the GUI is created with a default 'False' state. I thus need a first 'read' to set it in the correct state, otherwise I end up in a situation where the display is the inverse of the actual state.
Two possibilitie: