diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Display/MenuItem.cpp | 28 | ||||
-rw-r--r-- | src/GCodes/GCodes4.cpp | 13 | ||||
-rw-r--r-- | src/Storage/MassStorage.cpp | 1 |
3 files changed, 32 insertions, 10 deletions
diff --git a/src/Display/MenuItem.cpp b/src/Display/MenuItem.cpp index d11db3b7..a2bbe754 100644 --- a/src/Display/MenuItem.cpp +++ b/src/Display/MenuItem.cpp @@ -89,9 +89,29 @@ bool MenuItem::IsVisible() const noexcept return ps == PauseState::pausing || ps == PauseState::paused; } case 7: return reprap.GetGCodes().IsReallyPrintingOrResuming(); -#if HAS_MASS_STORAGE - case 10: return MassStorage::IsDriveMounted(0); - case 11: return !MassStorage::IsDriveMounted(0); +#if HAS_MASS_STORAGE || HAS_SBC_INTERFACE + case 10: return +# if HAS_MASS_STORAGE + MassStorage::IsDriveMounted(0) +# endif +# if HAS_MASS_STORAGE && HAS_SBC_INTERFACE + || +# endif +# if HAS_SBC_INTERFACE + reprap.UsingSbcInterface() +# endif + ; + case 11: return +# if HAS_MASS_STORAGE + !MassStorage::IsDriveMounted(0) +# endif +# if HAS_MASS_STORAGE && HAS_SBC_INTERFACE + && +# endif +# if HAS_SBC_INTERFACE + !reprap.UsingSbcInterface() +# endif + ; #endif case 20: { const auto tool = reprap.GetCurrentOrDefaultTool(); // this can be null, especially during startup @@ -865,7 +885,7 @@ void FilesMenuItem::ListFiles(Lcd& lcd, PixelNumber rightMargin, bool highlight, } --dirEntriesToSkip; } - gotFileInfo = MassStorage::FindNext(oFileInfo); + gotFileInfo = MassStorage::FindNext(oFileInfo); } // We always iterate the entire viewport so that old listing lines that may not be overwritten are cleared diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp index 4324b419..52ac4c03 100644 --- a/src/GCodes/GCodes4.cpp +++ b/src/GCodes/GCodes4.cpp @@ -1514,14 +1514,15 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept HandleReply(gb, stateMachineResult, reply.c_str()); CheckForDeferredPause(gb); + } + #if HAS_SBC_INTERFACE - if (reportPause) - { - fileGCode->Invalidate(); - reprap.GetSbcInterface().ReportPause(); - } -#endif + if (reportPause) + { + fileGCode->Invalidate(); + reprap.GetSbcInterface().ReportPause(); } +#endif } // Do a manual probe. This is in its own function to reduce the amount of stack space needed by RunStateMachine(). See the comment at the top of that function. diff --git a/src/Storage/MassStorage.cpp b/src/Storage/MassStorage.cpp index 4c95caa8..8e21ad70 100644 --- a/src/Storage/MassStorage.cpp +++ b/src/Storage/MassStorage.cpp @@ -698,6 +698,7 @@ bool MassStorage::FindNext(FileInfo &file_info) noexcept return true; } #endif + // TODO implement SBC interface for this dirMutex.Release(); return false; |