diff --git a/src/core/atcore.cpp b/src/core/atcore.cpp --- a/src/core/atcore.cpp +++ b/src/core/atcore.cpp @@ -376,7 +376,6 @@ void AtCore::pushCommand(const QString &comm) { - //Append command to the commandQueue d->commandQueue.append(comm); if (d->ready) { //The printer is ready for a command now so push one. @@ -461,8 +460,7 @@ setState(AtCore::STOP); } } - //push command through serial to bypass atcore's queue. - serial()->pushCommand(GCode::toCommand(GCode::M112).toLocal8Bit()); + pushCommand(GCode::toCommand(GCode::M112)); } void AtCore::stopSdPrint() @@ -478,8 +476,10 @@ void AtCore::requestFirmware() { if (serialInitialized()) { + //ensure M115 is sent on cold connect. + d->ready = true; qCDebug(ATCORE_CORE) << "Sending " << GCode::description(GCode::M115); - serial()->pushCommand(GCode::toCommand(GCode::M115).toLocal8Bit()); + pushCommand(GCode::toCommand(GCode::M115)); } else { qCDebug(ATCORE_CORE) << "There is no open device to send commands"; }