Open cromes opened 6 years ago
Is this problem associated with #225? Is the shutter client/server working properly if you pull from https://github.com/CampbellGroup/common/tree/mf/pre_225_shutter_change branch?
@fanmingyu212 this is caused by #225 when you use signals and slots its easy to get loops going where the client updates thene the server replys and continues, this is actually becoming a big problem for us since our oven and loading beams us the switch
@aransfor @cromes do you get a specific error message or the shutter just enters a on/off loop? Does this happen on all of your shutters or some of them? Do you use inverted
in the shutter client configuration? If you have more detailed information it could help.
This happens with at least two channels (we have two channels in use) both are inverted however I dont think this matters, I have seen this happen before with the wavemeter and what can happen is that the server will notify all listeners of a change including the listener that made the change, if you click the button too quickly then you get stuck in this loop see the following commit I made to fix this on the wavemeter to see if it helps
https://github.com/CampbellGroup/common/commit/9728d365bc359aa1b8c0c9e693477edf9bf85c10
@aransfor I think I used getOtherListener
in #225 (https://github.com/CampbellGroup/common/pull/225/files#diff-ecc8c81bac03a8b5cd27f7342133ff0cR124)
@aransfor I could not reproduce this bug on our computer. I tried to click as fast as I can but the shutter behaves normally. Is this issue also hard to reproduce on your side?
@aransfor @cromes could you try the code in https://github.com/CampbellGroup/common/tree/mf/shutter_switch_fix branch and see if it fixed the issue for you?
I can at some point in the not so near future, it's not a big deal right now as we're working around it
shutter client switches shutter on and off repeatedly when it should just be open #225