Let clients know of new serialPorts
ClosedPublic

Authored by rizzitello on Sep 24 2017, 12:43 AM.

Diff Detail

Repository
R232 AtCore
Branch
checkPorts
Lint
No Linters Available
Unit
No Unit Test Coverage
rizzitello created this revision.Sep 24 2017, 12:43 AM
rizzitello retitled this revision from AtCore will check for new serial ports and emit changes to clients to Let clients know of new serialPorts.Sep 24 2017, 12:44 AM
rizzitello edited the summary of this revision. (Show Details)
rizzitello updated this revision to Diff 19844.Sep 24 2017, 1:21 AM
  • Fix typo
rizzitello updated this revision to Diff 19845.Sep 24 2017, 1:22 AM
  • Use new Atcore methods to get serial Ports
patrickelectric requested changes to this revision.Sep 24 2017, 1:00 PM
patrickelectric added inline comments.
src/atcore.cpp
75

Maybe we should run only once, and than the interface configure the interval.
AtCore::SetSerialTimer()

246

Do not change non-modified lines.

254

else not needed.

This revision now requires changes to proceed.Sep 24 2017, 1:00 PM
rizzitello updated this revision to Diff 19862.Sep 24 2017, 1:51 PM
  • AtCore can optionally check for new serial ports and emit changes to clients
  • Use new Atcore methods to get serial Ports
patrickelectric requested changes to this revision.Sep 24 2017, 1:55 PM

You need to check your else logic.

src/atcore.cpp
265

else not needed.

279

else not nedded..

280

else not needed..

This revision now requires changes to proceed.Sep 24 2017, 1:55 PM
rizzitello updated this revision to Diff 19863.Sep 24 2017, 2:01 PM
  • AtCore can optionally check for new serial ports and emit changes to clients
  • Use new Atcore methods to get serial Ports
patrickelectric requested changes to this revision.Sep 24 2017, 2:06 PM
patrickelectric added inline comments.
src/atcore.cpp
255

if (d->serialPorts != ports)

272

if (d->serialTimer && newTime == 0)

278

And if not nullptr and setSerialTimerInterval is called ? It'll not set the actual timer to a new timer interval.

This revision now requires changes to proceed.Sep 24 2017, 2:06 PM
src/atcore.cpp
278

You have a start in the end, sorry about that.

rizzitello marked 4 inline comments as done.Sep 24 2017, 2:38 PM
rizzitello added inline comments.
src/atcore.cpp
272

If you have a new time of 0 and the serialTimer is not null then. There was a timer and we need to disconnect and delete it.
If the new time is 0 and the serialTimer is null then we just do nothing.

rizzitello updated this revision to Diff 19865.Sep 24 2017, 2:57 PM
  • Patricks adjustments
patrickelectric requested changes to this revision.Sep 24 2017, 2:59 PM
patrickelectric added inline comments.
src/atcore.cpp
270

if(d->serialTimer)

276

if(!d->serialTimer)

This revision now requires changes to proceed.Sep 24 2017, 2:59 PM
rizzitello marked 4 inline comments as done.Sep 24 2017, 3:01 PM
rizzitello updated this revision to Diff 19866.Sep 24 2017, 3:02 PM
  • More patrick suggestions
This revision is now accepted and ready to land.Sep 24 2017, 3:14 PM
rizzitello updated this revision to Diff 19880.Sep 24 2017, 9:16 PM
  • Fix property functions do not get Q_INVOKABLE also
rizzitello closed this revision.Sep 27 2017, 12:34 AM