Changeset View
Standalone View
src/atcore.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 47 | struct AtCorePrivate { | |||
---|---|---|---|---|---|
56 | QStringList commandQueue; //!< @param commandQueue: the list of commands to send to the printer | 56 | QStringList commandQueue; //!< @param commandQueue: the list of commands to send to the printer | ||
57 | bool ready = false; //!< @param ready: True if printer is ready for a command | 57 | bool ready = false; //!< @param ready: True if printer is ready for a command | ||
58 | QTimer *tempTimer = nullptr; //!< @param tempTimer: timer connected to the checkTemperature function | 58 | QTimer *tempTimer = nullptr; //!< @param tempTimer: timer connected to the checkTemperature function | ||
59 | float percentage; //!< @param percentage: print job percent | 59 | float percentage; //!< @param percentage: print job percent | ||
60 | QByteArray posString; //!< @param posString: stored string from last M114 return | 60 | QByteArray posString; //!< @param posString: stored string from last M114 return | ||
61 | AtCore::STATES printerState; //!< @param printerState: State of the Printer | 61 | AtCore::STATES printerState; //!< @param printerState: State of the Printer | ||
62 | QStringList serialPorts; //!< @param seralPorts: Detected serial Ports | 62 | QStringList serialPorts; //!< @param seralPorts: Detected serial Ports | ||
63 | QTimer *serialTimer = nullptr; //!< @param serialTimer: Timer connected to locateSerialPorts | 63 | QTimer *serialTimer = nullptr; //!< @param serialTimer: Timer connected to locateSerialPorts | ||
64 | bool sdCardMounted = false; //!< @param sdCardMounted: True if Sd Card is mounted. | ||||
65 | bool sdCardReadingFileList = false; //!< @param sdCardReadingFileList: True while getting file names from sd card | ||||
66 | bool sdCardPrinting = false; //!< @param sdCardPrinting: True if currently printing from sd card. | ||||
67 | QString sdCardFileName; //!< @param sdCardFileName: name of file being used from sd card. | ||||
tcanabrava: Those (with the exception of the sdCardPrinting) could be a bitmask | |||||
Its only two bools so the gain from making them a bitmask would be negligible. I might remove the check for card mounted since it doesn't really matter one way or the other to the printer or the host . for instance if you request an filelist (m20) with no card mounted you just get an empty list.. rizzitello: Its only two bools so the gain from making them a bitmask would be negligible. I might remove… | |||||
patrickelectric: make the 3 bools one after the other because of the memory alignment. | |||||
68 | QStringList sdCardFileList; //!< @param sdCardFileList: List of files on sd card. | ||||
64 | }; | 69 | }; | ||
65 | 70 | | |||
66 | AtCore::AtCore(QObject *parent) : | 71 | AtCore::AtCore(QObject *parent) : | ||
67 | QObject(parent), | 72 | QObject(parent), | ||
68 | d(new AtCorePrivate) | 73 | d(new AtCorePrivate) | ||
69 | { | 74 | { | ||
70 | qRegisterMetaType<AtCore::STATES>("AtCore::STATES"); | 75 | qRegisterMetaType<AtCore::STATES>("AtCore::STATES"); | ||
71 | setState(AtCore::DISCONNECTED); | 76 | setState(AtCore::DISCONNECTED); | ||
▲ Show 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 303 | { | |||
300 | if (message.startsWith(QString::fromLatin1("X:").toLocal8Bit())) { | 305 | if (message.startsWith(QString::fromLatin1("X:").toLocal8Bit())) { | ||
301 | d->posString = message; | 306 | d->posString = message; | ||
302 | d->posString.resize(d->posString.indexOf('E')); | 307 | d->posString.resize(d->posString.indexOf('E')); | ||
303 | d->posString.replace(':', ""); | 308 | d->posString.replace(':', ""); | ||
304 | } | 309 | } | ||
305 | 310 | | |||
306 | //Check if have temperature info and decode it | 311 | //Check if have temperature info and decode it | ||
307 | if (d->lastMessage.contains("T:") || d->lastMessage.contains("B:")) { | 312 | if (d->lastMessage.contains("T:") || d->lastMessage.contains("B:")) { | ||
308 | temperature().decodeTemp(message); | 313 | temperature().decodeTemp(message); | ||
patrickelectric: this should be handle by the fw plugin. | |||||
patrickelectric: Maybe we should create a messageHaveTemperatureData() in AtCore | |||||
rizzitello: yeah lets discuss that. | |||||
309 | } | 314 | } | ||
310 | emit(receivedMessage(d->lastMessage)); | 315 | emit(receivedMessage(d->lastMessage)); | ||
311 | } | 316 | } | ||
312 | 317 | | |||
313 | void AtCore::setRelativePosition() | 318 | void AtCore::setRelativePosition() | ||
314 | { | 319 | { | ||
315 | pushCommand(GCode::toCommand(GCode::G91)); | 320 | pushCommand(GCode::toCommand(GCode::G91)); | ||
316 | } | 321 | } | ||
317 | 322 | | |||
318 | void AtCore::setAbsolutePosition() | 323 | void AtCore::setAbsolutePosition() | ||
319 | { | 324 | { | ||
320 | pushCommand(GCode::toCommand(GCode::G90)); | 325 | pushCommand(GCode::toCommand(GCode::G90)); | ||
321 | } | 326 | } | ||
322 | 327 | | |||
323 | float AtCore::percentagePrinted() const | 328 | float AtCore::percentagePrinted() const | ||
324 | { | 329 | { | ||
325 | return d->percentage; | 330 | return d->percentage; | ||
326 | } | 331 | } | ||
327 | 332 | | |||
328 | void AtCore::print(const QString &fileName) | 333 | void AtCore::print(const QString &fileName, bool sdPrint) | ||
329 | { | 334 | { | ||
330 | if (state() == AtCore::CONNECTING) { | 335 | if (state() == AtCore::CONNECTING) { | ||
331 | qCDebug(ATCORE_CORE) << "Load a firmware plugin to print."; | 336 | qCDebug(ATCORE_CORE) << "Load a firmware plugin to print."; | ||
332 | return; | 337 | return; | ||
333 | } | 338 | } | ||
334 | //START A THREAD AND CONNECT TO IT | | |||
335 | setState(AtCore::STARTPRINT); | 339 | setState(AtCore::STARTPRINT); | ||
340 | if (sdPrint) { | ||||
341 | pushCommand(GCode::toCommand(GCode::M23, fileName)); | ||||
342 | d->sdCardFileName = fileName; | ||||
343 | pushCommand(GCode::toCommand(GCode::M24)); | ||||
patrickelectric: This if need to be after connecting if | |||||
344 | setState(AtCore::BUSY); | ||||
345 | d->sdCardPrinting = true; | ||||
346 | connect(d->tempTimer, &QTimer::timeout, this, &AtCore::sdCardPrintStatus); | ||||
347 | return; | ||||
348 | } | ||||
349 | //START A THREAD AND CONNECT TO IT | ||||
336 | QThread *thread = new QThread(); | 350 | QThread *thread = new QThread(); | ||
337 | PrintThread *printThread = new PrintThread(this, fileName); | 351 | PrintThread *printThread = new PrintThread(this, fileName); | ||
338 | printThread->moveToThread(thread); | 352 | printThread->moveToThread(thread); | ||
339 | 353 | | |||
340 | connect(printThread, &PrintThread::printProgressChanged, this, &AtCore::printProgressChanged, Qt::QueuedConnection); | 354 | connect(printThread, &PrintThread::printProgressChanged, this, &AtCore::printProgressChanged, Qt::QueuedConnection); | ||
341 | connect(thread, &QThread::started, printThread, &PrintThread::start); | 355 | connect(thread, &QThread::started, printThread, &PrintThread::start); | ||
342 | connect(printThread, &PrintThread::finished, thread, &QThread::quit); | 356 | connect(printThread, &PrintThread::finished, thread, &QThread::quit); | ||
343 | connect(thread, &QThread::finished, printThread, &PrintThread::deleteLater); | 357 | connect(thread, &QThread::finished, printThread, &PrintThread::deleteLater); | ||
344 | if (!thread->isRunning()) { | 358 | if (!thread->isRunning()) { | ||
345 | thread->start(); | 359 | thread->start(); | ||
346 | } | 360 | } | ||
347 | } | 361 | } | ||
348 | 362 | | |||
349 | void AtCore::pushCommand(const QString &comm) | 363 | void AtCore::pushCommand(const QString &comm) | ||
350 | { | 364 | { | ||
351 | d->commandQueue.append(comm); | 365 | d->commandQueue.append(comm); | ||
352 | if (d->ready) { | 366 | if (d->ready) { | ||
patrickelectric: ```
if () {
something
return
}
```
This will remove one indentation level. | |||||
353 | processQueue(); | 367 | processQueue(); | ||
354 | } | 368 | } | ||
355 | } | 369 | } | ||
356 | 370 | | |||
357 | void AtCore::closeConnection() | 371 | void AtCore::closeConnection() | ||
358 | { | 372 | { | ||
359 | if (serialInitialized()) { | 373 | if (serialInitialized()) { | ||
360 | if (state() == AtCore::BUSY) { | 374 | if (AtCore::state() == AtCore::BUSY && !d->sdCardPrinting) { | ||
361 | //we have to clean print if printing. | 375 | //we have to clean print if printing from the host. | ||
376 | //disconnecting from a printer printing via sd card should not affect its print. | ||||
362 | setState(AtCore::STOP); | 377 | setState(AtCore::STOP); | ||
363 | } | 378 | } | ||
364 | if (firmwarePluginLoaded()) { | 379 | if (firmwarePluginLoaded()) { | ||
365 | disconnect(firmwarePlugin(), &IFirmware::readyForCommand, this, &AtCore::processQueue); | 380 | disconnect(firmwarePlugin(), &IFirmware::readyForCommand, this, &AtCore::processQueue); | ||
366 | disconnect(serial(), &SerialLayer::receivedCommand, this, &AtCore::newMessage); | 381 | disconnect(serial(), &SerialLayer::receivedCommand, this, &AtCore::newMessage); | ||
367 | if (firmwarePlugin()->name() != QStringLiteral("Grbl")) { | 382 | if (firmwarePlugin()->name() != QStringLiteral("Grbl")) { | ||
368 | disconnect(d->tempTimer, &QTimer::timeout, this, &AtCore::checkTemperature); | 383 | disconnect(d->tempTimer, &QTimer::timeout, this, &AtCore::checkTemperature); | ||
369 | d->tempTimer->stop(); | 384 | d->tempTimer->stop(); | ||
370 | } | 385 | } | ||
371 | } | 386 | } | ||
372 | QString name = firmwarePlugin()->name(); | 387 | QString name = firmwarePlugin()->name(); | ||
373 | QString msg = d->pluginLoader.unload() ? QStringLiteral("success") : QStringLiteral("FAIL"); | 388 | QString msg = d->pluginLoader.unload() ? QStringLiteral("success") : QStringLiteral("FAIL"); | ||
374 | qCDebug(ATCORE_PLUGIN) << QStringLiteral("Firmware plugin %1 unload: %2").arg(name, msg); | 389 | qCDebug(ATCORE_PLUGIN) << QStringLiteral("Firmware plugin %1 unload: %2").arg(name, msg); | ||
375 | serial()->close(); | 390 | serial()->close(); | ||
391 | clearSdCardFileList(); | ||||
patrickelectric: We should remove the file only if the user want. | |||||
This Clears the list of file we have stored on the sd card. So that our gui list is also cleared because we are no longer connected to a printer. rizzitello: This Clears the list of file we have stored on the sd card. So that our gui list is also… | |||||
376 | setState(AtCore::DISCONNECTED); | 392 | setState(AtCore::DISCONNECTED); | ||
377 | } | 393 | } | ||
378 | } | 394 | } | ||
379 | 395 | | |||
380 | AtCore::STATES AtCore::state(void) | 396 | AtCore::STATES AtCore::state(void) | ||
381 | { | 397 | { | ||
382 | return d->printerState; | 398 | return d->printerState; | ||
383 | } | 399 | } | ||
384 | 400 | | |||
385 | void AtCore::setState(AtCore::STATES state) | 401 | void AtCore::setState(AtCore::STATES state) | ||
386 | { | 402 | { | ||
387 | if (state != d->printerState) { | 403 | if (state != d->printerState) { | ||
388 | qCDebug(ATCORE_CORE) << "Atcore state changed from [" \ | 404 | qCDebug(ATCORE_CORE) << "Atcore state changed from [" \ | ||
389 | << d->printerState << "] to [" << state << "]"; | 405 | << d->printerState << "] to [" << state << "]"; | ||
390 | d->printerState = state; | 406 | d->printerState = state; | ||
407 | if (state == AtCore::FINISHEDPRINT && d->sdCardPrinting) { | ||||
408 | d->sdCardPrinting = false; | ||||
409 | disconnect(d->tempTimer, &QTimer::timeout, this, &AtCore::sdCardPrintStatus); | ||||
410 | } | ||||
391 | emit(stateChanged(d->printerState)); | 411 | emit(stateChanged(d->printerState)); | ||
392 | } | 412 | } | ||
393 | } | 413 | } | ||
394 | 414 | | |||
395 | void AtCore::stop() | 415 | void AtCore::stop() | ||
396 | { | 416 | { | ||
397 | setState(AtCore::STOP); | 417 | setState(AtCore::STOP); | ||
398 | d->commandQueue.clear(); | 418 | d->commandQueue.clear(); | ||
419 | if (d->sdCardPrinting) { | ||||
420 | stopSdPrint(); | ||||
patrickelectric: ```
QStringLiteral()
```
("") will create a stringLiteral from a copy. | |||||
421 | } | ||||
399 | setExtruderTemp(0, 0); | 422 | setExtruderTemp(0, 0); | ||
400 | setBedTemp(0); | 423 | setBedTemp(0); | ||
401 | home(AtCore::X); | 424 | home(AtCore::X); | ||
402 | } | 425 | } | ||
403 | 426 | | |||
404 | void AtCore::emergencyStop() | 427 | void AtCore::emergencyStop() | ||
405 | { | 428 | { | ||
406 | if (state() == AtCore::BUSY) { | 429 | d->commandQueue.clear(); | ||
430 | if (AtCore::state() == AtCore::BUSY) { | ||||
431 | if (!d->sdCardPrinting) { | ||||
432 | //Stop our running print thread | ||||
patrickelectric: Why are you not changing the atcore state ? | |||||
The state is changed in the stop command. The reason that its changed for non sd prints is because the thread will see the change then clean itself up . Sd Prints needs to be stoped a litte differently rizzitello: The state is changed in the stop command. The reason that its changed for non sd prints is… | |||||
407 | setState(AtCore::STOP); | 433 | setState(AtCore::STOP); | ||
408 | } | 434 | } | ||
409 | d->commandQueue.clear(); | 435 | } | ||
410 | serial()->pushCommand(GCode::toCommand(GCode::M112).toLocal8Bit()); | 436 | serial()->pushCommand(GCode::toCommand(GCode::M112).toLocal8Bit()); | ||
411 | } | 437 | } | ||
412 | 438 | | |||
439 | void AtCore::stopSdPrint() | ||||
440 | { | ||||
441 | pushCommand(GCode::toCommand(GCode::M25)); | ||||
442 | d->sdCardFileName = QString(); | ||||
443 | pushCommand(GCode::toCommand(GCode::M23, d->sdCardFileName)); | ||||
444 | AtCore::setState(AtCore::FINISHEDPRINT); | ||||
445 | AtCore::setState(AtCore::IDLE); | ||||
446 | } | ||||
447 | | ||||
413 | void AtCore::requestFirmware() | 448 | void AtCore::requestFirmware() | ||
414 | { | 449 | { | ||
415 | if (serialInitialized()) { | 450 | if (serialInitialized()) { | ||
416 | qCDebug(ATCORE_CORE) << "Sending " << GCode::description(GCode::M115); | 451 | qCDebug(ATCORE_CORE) << "Sending " << GCode::description(GCode::M115); | ||
417 | serial()->pushCommand(GCode::toCommand(GCode::M115).toLocal8Bit()); | 452 | serial()->pushCommand(GCode::toCommand(GCode::M115).toLocal8Bit()); | ||
418 | } else { | 453 | } else { | ||
419 | qCDebug(ATCORE_CORE) << "There is no open device to send commands"; | 454 | qCDebug(ATCORE_CORE) << "There is no open device to send commands"; | ||
420 | } | 455 | } | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
467 | 502 | | |||
468 | void AtCore::detectFirmware() | 503 | void AtCore::detectFirmware() | ||
469 | { | 504 | { | ||
470 | connect(serial(), &SerialLayer::receivedCommand, this, &AtCore::findFirmware); | 505 | connect(serial(), &SerialLayer::receivedCommand, this, &AtCore::findFirmware); | ||
471 | } | 506 | } | ||
472 | 507 | | |||
473 | void AtCore::pause(const QString &pauseActions) | 508 | void AtCore::pause(const QString &pauseActions) | ||
474 | { | 509 | { | ||
510 | if (d->sdCardPrinting) { | ||||
511 | pushCommand(GCode::toCommand(GCode::M25)); | ||||
512 | } | ||||
475 | pushCommand(GCode::toCommand(GCode::M114)); | 513 | pushCommand(GCode::toCommand(GCode::M114)); | ||
476 | setState(AtCore::PAUSE); | | |||
477 | if (!pauseActions.isEmpty()) { | 514 | if (!pauseActions.isEmpty()) { | ||
478 | QStringList temp = pauseActions.split(QChar::fromLatin1(',')); | 515 | QStringList temp = pauseActions.split(QChar::fromLatin1(',')); | ||
479 | for (int i = 0; i < temp.length(); i++) { | 516 | for (int i = 0; i < temp.length(); i++) { | ||
480 | pushCommand(temp.at(i)); | 517 | pushCommand(temp.at(i)); | ||
481 | } | 518 | } | ||
482 | } | 519 | } | ||
520 | setState(AtCore::PAUSE); | ||||
483 | } | 521 | } | ||
484 | 522 | | |||
485 | void AtCore::resume() | 523 | void AtCore::resume() | ||
486 | { | 524 | { | ||
525 | if (d->sdCardPrinting) { | ||||
526 | pushCommand(GCode::toCommand(GCode::M24)); | ||||
527 | } else { | ||||
487 | pushCommand(GCode::toCommand(GCode::G0, QString::fromLatin1(d->posString))); | 528 | pushCommand(GCode::toCommand(GCode::G0, QString::fromLatin1(d->posString))); | ||
529 | } | ||||
almost all users use not sdcard to print, if put sdcard as a first option in this if, almost all users will miss the if and lost this processing time :) patrickelectric: almost all users use not sdcard to print, if put sdcard as a first option in this if, almost… | |||||
rizzitello: We want to push the resume string we saved on pause anyway . | |||||
patrickelectric: I'm talking about branch prediction :) | |||||
488 | setState(AtCore::BUSY); | 530 | setState(AtCore::BUSY); | ||
489 | } | 531 | } | ||
490 | 532 | | |||
491 | /*~~~~~Control Slots ~~~~~~~~*/ | 533 | /*~~~~~Control Slots ~~~~~~~~*/ | ||
492 | 534 | | |||
493 | void AtCore::home() | 535 | void AtCore::home() | ||
494 | { | 536 | { | ||
495 | pushCommand(GCode::toCommand(GCode::G28)); | 537 | pushCommand(GCode::toCommand(GCode::G28)); | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | |||||
617 | } | 659 | } | ||
618 | QStringList AtCore::portSpeeds() const | 660 | QStringList AtCore::portSpeeds() const | ||
619 | { | 661 | { | ||
620 | return serial()->validBaudRates(); | 662 | return serial()->validBaudRates(); | ||
621 | } | 663 | } | ||
622 | 664 | | |||
623 | void AtCore::setIdleHold(uint delay) | 665 | void AtCore::setIdleHold(uint delay) | ||
624 | { | 666 | { | ||
625 | if (delay != 0) { | 667 | if (delay != 0) { | ||
patrickelectric: if(delay) | |||||
626 | pushCommand(GCode::toCommand(GCode::M84, QString::number(delay))); | 668 | pushCommand(GCode::toCommand(GCode::M84, QString::number(delay))); | ||
627 | } else { | 669 | } else { | ||
628 | pushCommand(GCode::toCommand(GCode::M84)); | 670 | pushCommand(GCode::toCommand(GCode::M84)); | ||
629 | } | 671 | } | ||
630 | } | 672 | } | ||
673 | | ||||
674 | bool AtCore::isSdMounted() const | ||||
675 | { | ||||
676 | return d->sdCardMounted; | ||||
677 | } | ||||
678 | | ||||
679 | void AtCore::setSdMounted(bool mounted) | ||||
680 | { | ||||
681 | if (mounted != isSdMounted()) { | ||||
I don't know if this make sense, because isSdMounted can be false and mounted true, or otherwise. patrickelectric: I don't know if this make sense, because isSdMounted can be false and mounted true, or… | |||||
This is our one check that the state were setting it to is not the state it currently is . If they are equal we don't need to set them or do the emit. rizzitello: This is our one check that the state were setting it to is not the state it currently is . If… | |||||
682 | d->sdCardMounted = mounted; | ||||
683 | emit(sdMountChanged(d->sdCardMounted)); | ||||
684 | } | ||||
685 | } | ||||
686 | | ||||
patrickelectric: Check if sd is mounted. | |||||
You would think that matters, but in testing this just returns no list if that is the case. Unfortunatly this is the only way so far to see if an sd card was inserted at boot time since the printer will not other wise report it. Not ideal but working. rizzitello: You would think that matters, but in testing this just returns no list if that is the case. | |||||
687 | void AtCore::getSDFileList() | ||||
688 | { | ||||
689 | pushCommand(GCode::toCommand(GCode::M20)); | ||||
patrickelectric: this function should return the filelist ?
| |||||
No that will the file list will be extracted from the retruns. AtCore has no way to pair sent commands with their returned strings. rizzitello: No that will the file list will be extracted from the retruns. AtCore has no way to pair sent… | |||||
690 | } | ||||
691 | | ||||
692 | QStringList AtCore::sdFileList() | ||||
693 | { | ||||
694 | if (!d->sdCardReadingFileList) { | ||||
695 | getSDFileList(); | ||||
696 | } | ||||
697 | return d->sdCardFileList; | ||||
698 | } | ||||
699 | | ||||
700 | void AtCore::appendSdCardFileList(const QString &fileName) | ||||
patrickelectric: Get the reference | |||||
701 | { | ||||
702 | d->sdCardFileList.append(fileName); | ||||
703 | emit(sdCardFileListChanged(d->sdCardFileList)); | ||||
704 | } | ||||
705 | | ||||
706 | void AtCore::clearSdCardFileList() | ||||
707 | { | ||||
708 | d->sdCardFileList.clear(); | ||||
709 | emit(sdCardFileListChanged(d->sdCardFileList)); | ||||
710 | } | ||||
711 | | ||||
712 | void AtCore::sdDelete(const QString &fileName) | ||||
713 | { | ||||
patrickelectric: should we test if fileName exist in the sdcard ? | |||||
I don't think there is a need todo so. If the file is not found it is not deleted. Clients should only allow you to delete files picked from a list of files on the card not by letting the user type any file name. rizzitello: I don't think there is a need todo so. If the file is not found it is not deleted. Clients… | |||||
One thing is the client, other is atcore. The function need to make sense and not allow this kind of behaviour, this is a library and need to do what make sense, if the file does not exist we should qwarning a message about it and return. patrickelectric: One thing is the client, other is atcore. The function need to make sense and not allow this… | |||||
714 | if (d->sdCardFileList.contains(fileName)) { | ||||
715 | pushCommand(GCode::toCommand(GCode::M30, fileName)); | ||||
716 | getSDFileList(); | ||||
717 | } | ||||
718 | } | ||||
719 | | ||||
patrickelectric: Check if slot is a valid number | |||||
patrickelectric: ? | |||||
There is no way to check this data that I am aware of. Docs say its almost always 0 rizzitello: There is no way to check this data that I am aware of. Docs say its almost always 0 | |||||
720 | void AtCore::mountSd(uint slot) | ||||
721 | { | ||||
722 | pushCommand(GCode::toCommand(GCode::M21, QString::number(slot))); | ||||
723 | } | ||||
724 | | ||||
patrickelectric: same | |||||
725 | void AtCore::umountSd(uint slot) | ||||
726 | { | ||||
727 | pushCommand(GCode::toCommand(GCode::M22, QString::number(slot))); | ||||
728 | } | ||||
729 | | ||||
730 | bool AtCore::isReadingSdCardList() const | ||||
731 | { | ||||
732 | return d->sdCardReadingFileList; | ||||
733 | } | ||||
734 | | ||||
735 | void AtCore::setReadingSdCardList(bool readingList) | ||||
736 | { | ||||
737 | d->sdCardReadingFileList = readingList; | ||||
738 | } | ||||
739 | | ||||
740 | void AtCore::sdCardPrintStatus() | ||||
741 | { | ||||
742 | pushCommand(GCode::toCommand(GCode::M27)); | ||||
743 | } |
Those (with the exception of the sdCardPrinting) could be a bitmask