Move final terminator in firmware plugin side
Needs RevisionPublic

Authored by patrickelectric on Oct 13 2018, 5:53 PM.

Details

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
patrickelectric requested review of this revision.Oct 13 2018, 5:53 PM
patrickelectric created this revision.
rizzitello requested changes to this revision.Oct 13 2018, 7:03 PM

Can you please "fix" the other plugins with \r\n so this does not break them

This revision now requires changes to proceed.Oct 13 2018, 7:03 PM

Can you please "fix" the other plugins with \r\n so this does not break them

The others will use the base class function.

rizzitello requested changes to this revision.Oct 13 2018, 9:20 PM

How do we send commands now before connected to a firmware? M115 has to be sent before any firmware connection, It works on Grbl because were looking for the name. This does seam like progress in the correct direction we just need to smooth out this important case.

src/core/ifirmware.cpp
75

Can not append to const

This revision now requires changes to proceed.Oct 13 2018, 9:20 PM

How do we send commands now before connected to a firmware?

There is a generic function when a plugin is not loaded.

M115 has to be sent before any firmware connection.

Yes, you can use the default function like I said before.

This only moves the terminator to the plugin side from the seriallayer.
This is not ready to compile yet, some work is still in progress.

patrickelectric updated this revision to Diff 43565.
rizzitello requested changes to this revision.Oct 14 2018, 2:50 AM

Not sure why but with this patch i get lines cut off and split across a few entries. Im not sure if this is related to auto detect failing for me.

[19:03:34:325]< echo:Com
[19:03:34:330]< piled: Sep 19 2018
[19:03:34:330]< echo: Free Memory: 3034 Plann
[19:03:34:333]< erBufferBytes: 1232
[19:03:34:341]< echo:V47 stored settings retrie
[19:03:34:346]< ved (614 bytes; crc 19530)

This revision now requires changes to proceed.Oct 14 2018, 2:50 AM

Some Issues i've fixed unrelated to this but should be landed first.
D16199 and D16200
Then in atcore::processQueue the one call of serialLayer->pushCommand that does not use translate (since that is the no plugin loaded case) needs to have \r\n appended to it. Then this should work correctly

tcanabrava requested changes to this revision.Oct 16 2018, 11:32 AM
tcanabrava added inline comments.
src/core/ifirmware.cpp
75

const QString& command
const auto ending = QStringLiteral("\n\r");
if (! command.endsWith(ending)

return command + ending;

return command;

src/core/seriallayer.cpp
89

qAsConst(tempList) or create the QStringList as const.

This revision now requires changes to proceed.Oct 16 2018, 11:32 AM
rizzitello added inline comments.Oct 16 2018, 11:47 AM
src/core/ifirmware.cpp
75

This works, a previous diff was failing.

rizzitello requested changes to this revision.Nov 20 2018, 11:52 AM
rizzitello added inline comments.
src/plugins/grblplugin.cpp
57

Is this code retained somewhere or does the reading behavior change where this is no longer needed to correctly send lines made of a few commands? If not why are we removing it?