If the state of a switch is changed by hand, two signals are triggered. If I change the state of the switch with the computer, only one signal is triggered.
For reproduction you need:
1x Computer
1x EEPROM
1x CPU
1x RAM
1x Modular Control Panel
1x Switch/Lever
How to reproduce the bug:
run the code
go to the modular panel and change the state of the switch
print(x, event.pull()) is executed twice with each change
I used this code for testing:
panel = component.proxy("...")
switch = panel:getModules()[1]
event.ignoreAll()
event.listen(switch)
event.clear()
x=0
while true do
x=x+1
print(x,event.pull())
end
If the state of a switch is changed by hand, two signals are triggered. If I change the state of the switch with the computer, only one signal is triggered.
For reproduction you need:
How to reproduce the bug:
print(x, event.pull())
is executed twice with each changeI used this code for testing: