From ff3e0c160733707ce0bb835362d2730b407b0126 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 28 Mar 2013 17:38:47 +0100 Subject: update to the new UpdateLcdDisplay format --- metawatch/metawatch.cpp | 10 +++++++--- metawatch/metawatch.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index 5853d10..f9979ed 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -513,10 +513,14 @@ void MetaWatch::configureLcdIdleSystemArea(bool entireScreen) send(msg); } -void MetaWatch::updateLcdDisplay(Mode mode, bool copy) +void MetaWatch::updateLcdDisplay(Mode mode, int startRow, int numRows) { - Message msg(UpdateLcdDisplay, QByteArray(), - (copy ? 0x10 : 0) | (mode & 0xF)); + Message msg(UpdateLcdDisplay, QByteArray(), mode & 0x3); + if (startRow != 0 || numRows != 0) { + msg.data = QByteArray(2, 0); + msg.data[0] = startRow; + msg.data[1] = numRows; + } send(msg); } diff --git a/metawatch/metawatch.h b/metawatch/metawatch.h index 719ec94..5401319 100644 --- a/metawatch/metawatch.h +++ b/metawatch/metawatch.h @@ -227,7 +227,7 @@ protected: void updateLcdLines(Mode mode, const QImage& image, int lineA, int lineB); void updateLcdLines(Mode mode, const QImage& image, const QVector& lines); void configureLcdIdleSystemArea(bool entireScreen); - void updateLcdDisplay(Mode mode, bool copy = true); + void updateLcdDisplay(Mode mode, int startRow = 0, int numRows = 0); void loadLcdTemplate(Mode mode, int templ); void enableButton(Mode mode, Button button, ButtonPress press); void disableButton(Mode mode, Button button, ButtonPress press); -- cgit v1.2.3