Skip to content
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

Prevent extra pin events with luacontrollers, microcontrollers, and FPGAs #593

Merged
merged 2 commits into from Feb 27, 2022

Conversation

TurkeyMcMac
Copy link
Contributor

Fixes #569.

These devices now only run their code when action_change actually changes the state of a port.

I have tested this with circuits from Mesecons Lab.

@Makefile-dot-in, does this fix your issue?

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested a bunch, looks good.

@sfan5 sfan5 added the bugfix label Feb 19, 2022
Copy link
Contributor

@Desour Desour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Code looks good (you could document the new return value though). Also did some quick test, works fine.

@Makefile-dot-in
Copy link

it seems to fix the issue for me too, although I would've preferred a solution that would prevent action_change from being fired in the first place if there is no change. That would probably require larger modifications to track mesecon states though, so I understand why this solution was used. (and overall the effect is rather minor in other effectors)

@sfan5 sfan5 merged commit 0d9e027 into minetest-mods:master Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microcontrollers, luacontrollers and FPGAs get continuously sent events when pushed by a movestone.
4 participants