-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit piston speed #526
Limit piston speed #526
Conversation
Such a change in behaviour will likely break constructions. Eg. think of piston doors or the double sticky piston driver: http://mesecons.net/uberi/projects/DoublePiston/index.html I'd prefer a solution with overheating:
|
Indeed, double piston becomes unreliable, not due to delays (interrupt times could be adjusted accoddingly) but due to imprecise timings. That’s not easily fixable, so yes, overheating may be better.
Isn’t 1 second too little? |
Yeah, 5 seconds or whatever is fine too. Hmm, action queue might be better. |
That way a piston-oscillator would cool down and resume operation after these 5 seconds. It would overheat again ofc, but only for next 5 seconds after which it would resume again, ad infinitum. OTOH with node timers that would only happen when there is someone nearby (or the block is anchored but that’s admin-controllable). |
Note that adding several single-step delays seems to make the double piston work reliably: piston_delay = 0.15
if event.iid == "pull1" then
port.b = false
interrupt(0, "push2")
elseif event.iid == "push2" then
interrupt(piston_delay, "push3")
elseif event.iid == "push3" then
interrupt(0, "push4")
elseif event.iid == "push4" then
port.c = true
interrupt(0, "pull3")
elseif event.iid == "pull3" then
interrupt(piston_delay, "pull4")
elseif event.iid == "pull4" then
interrupt(0, "pull5")
elseif event.iid == "pull5" then
port.c = false
else
if pin.a then --extend
port.b = true
port.d = true
else --retract
port.d = false
interrupt(0, "pull1")
end
end (not sure are all these delays necessary; also there is no protection against too fast switch toggling) Also it is possible to drive the double piston like that (the diode is used for the same, to add a single-step delay): Also there seems to be a bug in the action queue: when several delayed events expire, it ignores expiration time even if it was different (so an action with later time can fire earlier if it was added earlier); see #551. |
Fix #499.
The delay is configurable. Old behavior can be restored by using special settings, as described.