Display engine plugins in gcode - #2364
Conversation
Test Results31 tests 31 ✅ 5s ⏱️ Results for commit e164f72. ♻️ This comment has been updated with latest results. |
Casper Lamboo (casperlamboo)
left a comment
There was a problem hiding this comment.
NPM package is failing, I believe we should add #ifdef ENABLE_PLUGINS blocks
CURA-11212 Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
Remco Burema (rburema)
left a comment
There was a problem hiding this comment.
I've got some remarks. I'd be willing to accept as-is if you can explain though :-)
| { | ||
| for (const value_type& plugin : plugins_) | ||
| { | ||
| if (plugin.pluginInfo().has_value()) |
There was a problem hiding this comment.
Would there be a case where there is a plugin without plugin-info?
If so; that partly defeats the purpose of the exercise, since then you can still have a plugin running but get gcode without any indication of that. Another problem in that case is that then, this 'foreach' function isn't really doing what it says in the tin, since it skips those without the info.
If not, then why do the check at all? (And then not throw/indicate some kind of error if an assumption is voided after all?)
There was a problem hiding this comment.
If I am correct, that happens when the proxy is empty, i.e. there is no single plugin actually running for this slot, but then there is still a pseudo-plugin that does the default implementation. I can make sure of that.
| }); | ||
| if (! plugins.empty()) | ||
| { | ||
| prefix << ";ENGINE PLUGINS" << new_line_; |
There was a problem hiding this comment.
This doesn't really fit with the rest of the header. I'd be fine with it, but I wonder what the firmware team thinks regarding parsing/skipping this part.
Robin den Hertog (@robinmdh) ? Would you have a problem with:
;ENGINE PLUGINS
; [blah (bloeh)]
; [bleh (blib blie)]
; ...
in the header? Note the lack of _ and : and the newlines.
There was a problem hiding this comment.
As mentioned in the description, this matches the way the post-processing plugins are mentioned:
;ENGINE PLUGINS
; [valve (GCODE_PATHS_MODIFY)]
;POSTPROCESSED
; [PurgeLinesAndUnload]
There was a problem hiding this comment.
Ah sorry, not sure how I missed that 😅
Add the list of active engine plugins in the generated gcode. Syntax is based on the post-processing plugins: https://github.com/Ultimaker/Cura/blob/05e2c8937da42b48f8502f3ac69bcf8ed44b7307/plugins/PostProcessingPlugin/PostProcessingPlugin.py#L94
Result is something like:
CURA-11212