Hi,
I have a URCap with a button starting a Java thread, which moves the robot around its workspace and doing some measurements from the secondary client interface . After the movements and measurements are done, I want to change the datamodel to contain a variable telling whether the operation was successful or not.
However, it is not possible to change the datamodel in other threads than the UI thread (as far as I understand?), which seems to leave me with two options:
I can make the UI thread wait until the movements/measurements are done and then change the datamodel, or I can put a button in my URCap that should be pushed afterwards, which saves the variable to the datamodel. Neither of these options are particular elegant, the first option would freeze the whole controller and the second adds extra an extra unintuitive action to perform.
Is there any way around this problem? E.g. other parts of the code that are run in the UI thread?
Best Regards,
Thomas