diff options
author | Christian Hammacher <bmasterc@gmail.com> | 2021-07-21 14:50:07 +0300 |
---|---|---|
committer | Christian Hammacher <bmasterc@gmail.com> | 2021-07-21 14:50:07 +0300 |
commit | 72fc1c8ff2be93a31baa7ac57b4e85e4f9533a39 (patch) | |
tree | 6ccd7d04e4b89c5dc0199295ad0289c233fc50dd /src/GCodes/GCodes.cpp | |
parent | 6288d72fb0242a44cf48cc4ca4f4c4af284e2f66 (diff) |
More work towards 3.4
Added new "cancelling" state to state.status
Experimental support for M911/916 is now enabled
Diffstat (limited to 'src/GCodes/GCodes.cpp')
-rw-r--r-- | src/GCodes/GCodes.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index ba83e8b8..e057f9a2 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -1004,7 +1004,7 @@ void GCodes::DoPause(GCodeBuffer& gb, PauseReason reason, const char *msg, uint1 pauseRestorePoint.toolNumber = reprap.GetCurrentToolNumber(); pauseRestorePoint.fanSpeed = lastDefaultFanSpeed; -#if HAS_MASS_STORAGE +#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE if (simulationMode == 0) { SaveResumeInfo(false); // create the resume file so that we can resume after power down @@ -1325,16 +1325,10 @@ bool GCodes::ReHomeOnStall(DriversBitmap stalledDrivers) noexcept #endif -#if HAS_MASS_STORAGE +#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE void GCodes::SaveResumeInfo(bool wasPowerFailure) noexcept { -#if HAS_LINUX_INTERFACE - if (reprap.UsingLinuxInterface()) - { - return; // we can't yet save to the Pi - } -#endif const char* const printingFilename = reprap.GetPrintMonitor().GetPrintingFilename(); if (printingFilename != nullptr) { @@ -4174,13 +4168,8 @@ void GCodes::StopPrint(StopPrintReason reason) noexcept platform.MessageF(LoggedGenericMessage, "%s printing file %s, print time was %" PRIu32 "h %" PRIu32 "m\n", (reason == StopPrintReason::normalCompletion) ? "Finished" : "Cancelled", printingFilename, printMinutes/60u, printMinutes % 60u); -#if HAS_MASS_STORAGE - if ( reason == StopPrintReason::normalCompletion - && simulationMode == 0 -# if HAS_LINUX_INTERFACE - && !reprap.UsingLinuxInterface() -# endif - ) +#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE + if (reason == StopPrintReason::normalCompletion && simulationMode == 0) { platform.DeleteSysFile(RESUME_AFTER_POWER_FAIL_G); } |