Repository navigation
raster: do not show a running raster as disabled mid-cycle - #4684
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
The function cleared enabled at the top of every cycle and set it again in the RUN state, so a non-realtime reader polling the pin could see 0 while the raster ran. After stop() it then saw 0 before the function had handled the stop, wrote the next program header, and the stop's hal_port_clear() wiped it; the next start read pixel data as the header and faulted with InvalidBPP. Write enabled once per state instead, and only clear it once a stop has been handled. Found by Hannes Diethelm's parallel test runs (LinuxCNC#4669). A 2ms delay after the old clear fails tests/raster 2 of 3; with this change it passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
raster's function clearedenabledat the top of every cycle and set it again in the RUN state, so a non-realtime reader polling the pin could see 0 while the raster ran.Programmer.stop()in lib/python/raster.py waits forenabledto go false, so it could return before the function had handled the stop. The nextbegin()then wrote its header, the stop'shal_port_clear()wiped it, and the followingstart()read pixel data as the header and faulted with InvalidBPP.enabledis now written once per state and only cleared once a stop has been handled.Found in @hdiethelm's parallel test runs (#4669). With a 2 ms delay after the old clear, tests/raster fails 2 of 3 runs; with this change it passes 4 of 4 with the delay.