fix loading GCode task files from remote processes #2767
Merged
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.
This pull request enables file loading when the UI is running on a different host than the milltask.
If the .nml config doesn't contain a "REMOTE" process line, it does nothing. It basically detects when we're running remotely and then transfers the file contents in chunks via the NML API for the milltask to store it in a unique, temporary file.
It contains two aspects:
EMC2_TMP_DIR
at configure time (similar to other EMC2_*_DIR macros)cms->ProcessType == CMS_REMOTE_TYPE
and is named != "emc", thenEMC_TASK_PLAN_OPEN
messages will be sent, each containing a chunk of the file's contents, the filename and the size of the chunk.EMC_TASK_PLAN_CLOSE
As a bonus, usage of hardcoded
/tmp
has been replaced by the newEMC2_TMP_DIR
.