Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-11-27 02:42:28 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-11-27 02:42:28 +0300
commit6a1e1bdb2dba9ef4a583465f205b963d45d78cec (patch)
tree3ebba932da898e0696141ae6e29a8986d601b8df /src/Display/Display.cpp
parent8517a025917ef5823de26dee39f0065a0059f761 (diff)
Improvements to 12864 display
Corrected processing of button actions Corrected display of speed factor Added support for right- and centre-aligned fields
Diffstat (limited to 'src/Display/Display.cpp')
-rw-r--r--src/Display/Display.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/Display/Display.cpp b/src/Display/Display.cpp
index e47781cc..201370df 100644
--- a/src/Display/Display.cpp
+++ b/src/Display/Display.cpp
@@ -22,7 +22,8 @@ const size_t SmallFontNumber = 0;
const size_t LargeFontNumber = 1;
Display::Display()
- : lcd(LcdCSPin, fonts, ARRAY_SIZE(fonts)), encoder(EncoderPinA, EncoderPinB, EncoderPinSw), menu(lcd), present(false), beepActive(false), updatingFirmware(false)
+ : lcd(LcdCSPin, fonts, ARRAY_SIZE(fonts)), encoder(EncoderPinA, EncoderPinB, EncoderPinSw), menu(lcd),
+ mboxSeq(0), mboxActive(false), present(false), beepActive(false), updatingFirmware(false)
{
}
@@ -49,6 +50,30 @@ void Display::Spin()
{
menu.EncoderAction(0);
}
+
+ const MessageBox& mbox = reprap.GetMessageBox();
+ if (mbox.active)
+ {
+ if (!mboxActive || mboxSeq != mbox.seq)
+ {
+ // New message box to display
+ if (!mboxActive)
+ {
+ menu.ClearHighlighting(); // cancel highlighting and adjustment
+ menu.Refresh();
+ }
+ mboxActive = true;
+ mboxSeq = mbox.seq;
+ menu.DisplayMessageBox(mbox);
+ }
+ }
+ else if (mboxActive)
+ {
+ // Message box has been cancelled from this or another input channel
+ menu.ClearMessageBox();
+ mboxActive = false;
+ }
+
menu.Refresh();
}
lcd.FlushSome();