Details
Diff Detail
- Repository
- R232 AtCore
- Branch
- injectCommands
- Lint
No Linters Available - Unit
No Unit Test Coverage
src/printthread.cpp | ||
---|---|---|
99 | This shouldn't be the same as the one below? |
src/atcore.cpp | ||
---|---|---|
482 | doing the post pause before making the state paused helps keep our states more consistant and provides safer base for injections. | |
src/printthread.h | ||
120 | These commands are ment to call atcore functions not just strictly single gcodes. For instance there is no way to pause a job via a gcode (unless its on an sd card) |
src/atcore.cpp | ||
---|---|---|
533 | These calls are no needed . so i didn't bother to look in to why it crashed. I did check to be sure that the temps are being set correctly . |
Please mark the comments as 'done' when they are done so it's easier to review, there's too many comments on the code (phabricator ones) right now.
I +1 this over D11024:
The main thing is the parser version adds two new includes one member to the private pointer and the string verison has no new includes no no private pointer members . This version is simplier code. It may be safer due to how command and strings are handled by qt (maybe equal)
src/printthread.cpp | ||
---|---|---|
131–134 | why not if (d->cline.startsWith(QStringLiteral(";-"))) { in the first if ? | |
160 | can be QString& ? | |
171 | If a command set the printer to pause state, it'll not be possible to inject more codes ? Right ? | |
172 | You should create a função do decode all this functions, the BCS is to create a class to handle this part of decode, validation, documentation, code functions and etc. | |
src/printthread.h | ||
108 | why this \n ? |
src/printthread.cpp | ||
---|---|---|
131–134 | All comments in gcode start with ; so those need to be handled and that case will be much more common. many slicers like have post command comments
| |
160 | No because we do not want to change the sent command as its used in elsewhere as a full line | |
171 | injected commands will be injected while the print job is paused. | |
172 | This is the function to decode all the functions.. they are documented in the code for this function. |
src/printthread.cpp | ||
---|---|---|
172 | Documented in the header for this function. |
src/printthread.h | ||
---|---|---|
108 | Force new lines :D |
src/printthread.cpp | ||
---|---|---|
131–134 | Every line that contains ; needs to be resized to remove comments many slicerswill do things like G28 ; home all so it make the contains if get hit alot more so i put it first then the other inside as it makes it more readable and the most common case is first.. The other way would be. if (d->cline.startsWith(QStringLiteral(";-"))) { injectCommand(d-cline); } if (d->cline.contains(QChar::fromLatin1(';'))) { d->cline.resize(d->cline.indexOf(QChar::fromLatin1(';'))); } | |
171 | Because it has been designed in such a way. If we are reading a gcode file (i.e printing) if we hit a line that starts with ;- we read it and send it to injectCommand this will push the command out to the printer. I have added in our pause state a check for ;- and if seen it will call nextLine() and send the injectedCommand to the printer. The print job is paused but the injectedCommands are still pushed. this lets you move the head out of the way and then do heat so you can change the filiment without resuming first or sending heat before pause. This also give the user more freedom to put the injected commands before or after an injected pause. Due to how this is made there is no much of a chance of the user triggering this by accident. Pressing pause on the gui will pause the job the only thing that changes is if they press pause on a line starting with ;- that will be send to the buffer while paused... |
src/printthread.cpp | ||
---|---|---|
98–102 | This line will not occur, because of: if (d->cline.contains(QChar::fromLatin1(';'))) { if (d->cline.startsWith(QStringLiteral(";-"))) { injectCommand(d->cline); } d->cline.resize(d->cline.indexOf(QChar::fromLatin1(';'))); } d->cline = d->cline.simplified(); The resize will happen after the injectCommand, the result will be a empty line. Please, correct me if I'm wrong. |
src/printthread.cpp | ||
---|---|---|
98–102 | this only ensures that if we are paused (not busy then changed to pause by injected command thats all the ther check is for) we still can process ;- lines. |