Skip to content

Add option for piston downward speed - #4779

Open
Endernice61 wants to merge 4 commits into
BEEmod:devfrom
Endernice61:hh/piston_speeds
Open

Add option for piston downward speed#4779
Endernice61 wants to merge 4 commits into
BEEmod:devfrom
Endernice61:hh/piston_speeds

Conversation

@Endernice61

Copy link
Copy Markdown
Contributor

Sets the speed of the segment to move to the appropriate speed
Rename and redescribe original widget to indicate that it is the speed that the piston moves upward
Added new widget for downward piston speed
Gets downward piston speed in vbsp_config and passes it to PistonPlatform
Fixed frame perfect I/O break where the platform doesn't turn around:

  • Sets desired_direction in _up and _dn in segment code
  • If desired_direction is not set in segment code, calls verifyDirection with the original direction and records the time in verify_clock to determine if (strictly) future calls to _up and _dn happen before verifyDirection
  • If desired_direction is set in _up and _dn, checks to make sure it is called in the same tick before preceding, otherwise pushes the call to the end of the I/O queue
  • Added verifyDirection function which resets the direction, but first checks the parameter with the last set direction, and if different, calls _up or _dn depending on the direction it needs to go in after resetting the direction

Signed-off-by: Endernice61 <98556236+Endernice61@users.noreply.github.com>
Signed-off-by: Endernice61 <98556236+Endernice61@users.noreply.github.com>
Signed-off-by: Endernice61 <98556236+Endernice61@users.noreply.github.com>
Signed-off-by: Endernice61 <98556236+Endernice61@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant