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

A proposed fix for #306 #606

Merged
merged 2 commits into from
Feb 3, 2018
Merged

A proposed fix for #306 #606

merged 2 commits into from
Feb 3, 2018

Conversation

BarbourSmith
Copy link
Member

This is a proposed fix for the issue where the machine will not move again after pressing the stop button.

The solution is to indicate that when a stop has been sent it will free up the entire buffer. As soon as the OK message is recieved to indicate that the stop command has been processed the entire buffer is marked as free.

One more change I would like to make if we like this solution is to change all of the hard coded 256s in there to be a #define so it is more clear why that number is used and the code can be easily modified for different buffer sizes.

Closes #306

This is a proposed fix for the issue where the machine will not move again after pressing the stop button.

The solution is to indicate that when a stop has been sent it will free up the entire buffer. As soon as the OK message is recieved to indicate that the stop command has been processed the entire buffer is marked as free.

One more change I would like to make if we like this solution is to change all of the hard coded 256s in there to be a #define so it is more clear why that number is used and the code can be easily modified for different buffer sizes.

Closes #306
@krkeegan
Copy link
Collaborator

krkeegan commented Feb 2, 2018

bufferSpace is already defined, we just don't seem to use it.

@BarbourSmith
Copy link
Member Author

I think that bufferSpace is the amount of space available in the buffer so I added a bufferSize variable which is the size of the buffer when empty and added a comment to clear it up

@BarbourSmith BarbourSmith merged commit 0050a58 into master Feb 3, 2018
@BarbourSmith BarbourSmith deleted the fix-stoping-issue branch February 3, 2018 00:00
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.

2 participants