diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-01-04 21:15:22 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-01-04 21:15:22 +0300 |
commit | 5bd28a1aea25e83e6e1d7a0ca50cd000e7baf1a7 (patch) | |
tree | 059d11bfc384d80c7ff07d3457e994ac50a0c07e /src/Display/Display.cpp | |
parent | 8ded9143fa9d07dcddd525683403980c42881f1a (diff) |
Conditional GCode fixes and exception specifiers
Loops are now working
Added noexcept specifiers to omst of the remaining C++ source files
Diffstat (limited to 'src/Display/Display.cpp')
-rw-r--r-- | src/Display/Display.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Display/Display.cpp b/src/Display/Display.cpp index ba6e16c1..e4e51b55 100644 --- a/src/Display/Display.cpp +++ b/src/Display/Display.cpp @@ -26,13 +26,13 @@ constexpr size_t LargeFontNumber = 1; constexpr uint32_t NormalRefreshMillis = 250; constexpr uint32_t FastRefreshMillis = 50; -Display::Display() +Display::Display() noexcept : lcd(nullptr), menu(nullptr), encoder(nullptr), lastRefreshMillis(0), mboxSeq(0), mboxActive(false), beepActive(false), updatingFirmware(false) { } -void Display::Spin() +void Display::Spin() noexcept { if (lcd != nullptr) { @@ -104,7 +104,7 @@ void Display::Spin() } } -void Display::Exit() +void Display::Exit() noexcept { if (lcd != nullptr) { @@ -123,7 +123,7 @@ void Display::Exit() // NOTE: nothing enforces that this beep concludes before another is begun; // that is, in rapid succession of commands, only the last beep issued will be heard by the user -void Display::Beep(unsigned int frequency, unsigned int milliseconds) +void Display::Beep(unsigned int frequency, unsigned int milliseconds) noexcept { if (lcd != nullptr) { @@ -134,17 +134,17 @@ void Display::Beep(unsigned int frequency, unsigned int milliseconds) } } -void Display::SuccessBeep() +void Display::SuccessBeep() noexcept { Beep(2000, 100); } -void Display::ErrorBeep() +void Display::ErrorBeep() noexcept { Beep(500, 1000); } -GCodeResult Display::Configure(GCodeBuffer& gb, const StringRef& reply) +GCodeResult Display::Configure(GCodeBuffer& gb, const StringRef& reply) noexcept { bool seen = false; @@ -205,7 +205,7 @@ GCodeResult Display::Configure(GCodeBuffer& gb, const StringRef& reply) } // Suspend normal operation and display an "Updating firmware" message -void Display::UpdatingFirmware() +void Display::UpdatingFirmware() noexcept { updatingFirmware = true; if (lcd != nullptr) |