summaryrefslogtreecommitdiff
path: root/metawatch
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-03-28 17:38:47 +0100
committerJavier S. Pedro <maemo@javispedro.com>2013-03-28 17:38:47 +0100
commitff3e0c160733707ce0bb835362d2730b407b0126 (patch)
tree5e16781f19f0640f92766b6db0a7ff1c669573df /metawatch
parentdabe9142f241a4ae1f73b124fcd748a7aa09aef3 (diff)
downloadsowatch-ff3e0c160733707ce0bb835362d2730b407b0126.tar.gz
sowatch-ff3e0c160733707ce0bb835362d2730b407b0126.zip
update to the new UpdateLcdDisplay format
Diffstat (limited to 'metawatch')
-rw-r--r--metawatch/metawatch.cpp10
-rw-r--r--metawatch/metawatch.h2
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<bool>& 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);