diff options
author | Christian Hammacher <bmasterc@gmail.com> | 2021-12-15 18:53:41 +0300 |
---|---|---|
committer | Christian Hammacher <bmasterc@gmail.com> | 2021-12-15 18:53:41 +0300 |
commit | 7287c9e66ae49bcdda48e7224161abc2161cd6f5 (patch) | |
tree | ac3270f25b3df6ada2f8371eb10f90138a0ec872 /src/Display/MenuItem.cpp | |
parent | e4cabdd5e3aa1d339118351efc1271de999ddf83 (diff) |
Bug fixes3.4-events
Added note for FindFirst/FindNext in SBC mode
Added new OpenOCD script for memtests on the MB6HC
Bug fix: 12864 displays didn't show certain menu items in SBC mode
Bug fix: When an event was triggered and the corresponding macro wasn't present, the print could not be resumed in SBC mode
Diffstat (limited to 'src/Display/MenuItem.cpp')
-rw-r--r-- | src/Display/MenuItem.cpp | 28 |
1 files changed, 24 insertions, 4 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 |