Ensure Machine is Ready; Log Inc Messages Immediately #498
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.
There was no check for the 'ok' command from the firmware before sending the first message. This is likely why PR #405 and commit 6c934aa which sent a blank line on startup helped, becuase only the first command could be sent without an ok. Removed the kludge of a blank command and it seems to work well.
This may also fix the issues reported in this post:
https://forums.maslowcnc.com/t/unable-to-execute-command-machine-settings-not-yet-received/1517
Also added a new child class of Queue which logs the messages to the logger on put rather than waiting for the process to get them out of the queue. The get method was resulting in non-sequential incoming and outgoing messages in the log because outgoing messages were logged immediately. This makes the log much more helpful.