Allow non reset on connect

Authored by rizzitello on Jun 16 2018, 9:14 PM.


  • Provides the user with an option to attempt to not reset the printer when connecting.
  • Currently will work on Linux and mac os . have not worked on methods for windows yet.
  • Changes AtCore::initSerial to have a bool for disableROC its default is false so current client builds shouldn't break.
  • Allows users to have atcore in a mode that it expects reconnect so this will help even those with Hw mods
  • Doesn't work with firmware autodetect. This is a more advanced setting and should know the firmware.
  • Can be used with D13553 to Allow you to properly monitor re attached sd jobs.
Test Plan

Connect you printer to a linux host.
select your firmware and check the box to attempt to not reset on connect.
First connection should reset the machine, This is normal, and there is not much that can be done about this one.. Users should start SD prints they wish to monitor with atcore with a client of atcore. Connect will spit out a few seconds of resends This is normal and on my machine didn't affect the running print job at all.

Currently this should only work on Unices.

Diff Detail

R232 AtCore
No Linters Available
No Unit Test Coverage
Build Status
Buildable 151
Build 151: arc lint + arc unit
rizzitello requested review of this revision.Jun 16 2018, 9:14 PM
rizzitello created this revision.
rizzitello edited the summary of this revision. (Show Details)Jun 16 2018, 9:29 PM
rizzitello edited the test plan for this revision. (Show Details)
rizzitello added a reviewer: Atelier: AtCore.
rizzitello added a project: Atelier: AtCore.
rizzitello added a subscriber: Atelier: AtCore.
rizzitello updated this revision to Diff 36245.Jun 16 2018, 9:30 PM
rizzitello edited the summary of this revision. (Show Details)
  • fix typo
tcanabrava added inline comments.

cbReset->setHidden(currentText == tr("Autodetect"))

  • tomaz suggestion
  • use 4 clause connect for lambda
rizzitello marked an inline comment as done.
  • 4 clause connect
tcanabrava accepted this revision.Jun 24 2018, 1:05 PM
This revision is now accepted and ready to land.Jun 24 2018, 1:05 PM
patrickelectric requested changes to this revision.Jun 28 2018, 12:49 PM
patrickelectric added a subscriber: patrickelectric.
patrickelectric added inline comments.

I think that a QFuture and a QFutureWatcher will be more suitable.


QStringList args({..., ... })


-F [space] /dev


will this fail in IOS no ?

stty -F /dev/ttyUSB0 -h upcl
stty: invalid argument ‘-h’
Try 'stty --help' for more information.

This command does not work here.

This revision now requires changes to proceed.Jun 28 2018, 12:49 PM
rizzitello marked 3 inline comments as done.Jun 28 2018, 7:21 PM
rizzitello added inline comments.

-F<space> the space is optional and causes errors with the command some times.


-hupcl is the option it is not -h upcl


I don't know if it will work on ios or not . that will depend on if it comes with stty. however much like for android i do not expect this to be run directly on that platform.

rizzitello marked 3 inline comments as done.Jun 28 2018, 7:26 PM
rizzitello updated this revision to Diff 36856.Jun 28 2018, 7:29 PM
  • rebase
  • patrick' suggestions
rizzitello marked an inline comment as done.Jun 28 2018, 7:30 PM
tcanabrava added inline comments.Jun 28 2018, 7:55 PM

do you need to open stty to set the serial stuff?
there's no posix interface for that? (real question, I don't know)

rizzitello added inline comments.Jun 28 2018, 8:09 PM

I tried several methods using various Q methods and connection options. The only way I was able to find that consistently worked (on Linux) was using stty. This method is also flawed and If we can find a better way before merging that would be great. Ideally this would be a solution that works cross platform. I honestly didn't even look at any posix specific calls to do this since i was looking for a solution and only stty worked consistently .

rizzitello edited reviewers, added: laysrodrigues; removed: Atelier: AtCore.
patrickelectric accepted this revision.Aug 27 2018, 11:34 AM
This revision is now accepted and ready to land.Aug 27 2018, 11:34 AM
laysrodrigues accepted this revision.Aug 29 2018, 4:50 PM
This revision was automatically updated to reflect the committed changes.