Changeset View
Changeset View
Standalone View
Standalone View
src/atcore.cpp
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Line(s) | 293 | { | |||
---|---|---|---|---|---|
294 | d->lastMessage = message; | 294 | d->lastMessage = message; | ||
295 | if (message.startsWith(QString::fromLatin1("X:").toLocal8Bit())) { | 295 | if (message.startsWith(QString::fromLatin1("X:").toLocal8Bit())) { | ||
296 | d->posString = message; | 296 | d->posString = message; | ||
297 | d->posString.resize(d->posString.indexOf('E')); | 297 | d->posString.resize(d->posString.indexOf('E')); | ||
298 | d->posString.replace(':', ""); | 298 | d->posString.replace(':', ""); | ||
299 | } | 299 | } | ||
300 | 300 | | |||
301 | //Check if have temperature info and decode it | 301 | //Check if have temperature info and decode it | ||
302 | if (d->lastMessage.contains("T:") || d->lastMessage.contains("B:")) { | ||||
302 | temperature().decodeTemp(message); | 303 | temperature().decodeTemp(message); | ||
304 | } | ||||
303 | emit(receivedMessage(d->lastMessage)); | 305 | emit(receivedMessage(d->lastMessage)); | ||
304 | } | 306 | } | ||
305 | 307 | | |||
306 | void AtCore::setRelativePosition() | 308 | void AtCore::setRelativePosition() | ||
307 | { | 309 | { | ||
308 | pushCommand(GCode::toCommand(GCode::G91)); | 310 | pushCommand(GCode::toCommand(GCode::G91)); | ||
309 | } | 311 | } | ||
310 | 312 | | |||
▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines |