summaryrefslogtreecommitdiff
path: root/metawatch/metawatch.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-03-29 17:49:12 +0100
committerJavier S. Pedro <maemo@javispedro.com>2013-03-29 17:49:12 +0100
commit4683efe227cd1cf81ff7d7ad845e2a6f53bcd6e1 (patch)
tree03448543acdaeddf378f130e9e6847494fcdb5cf /metawatch/metawatch.cpp
parent1fac65b02e813a446d9ae01c90b67c700f18de32 (diff)
downloadsowatch-4683efe227cd1cf81ff7d7ad845e2a6f53bcd6e1.tar.gz
sowatch-4683efe227cd1cf81ff7d7ad845e2a6f53bcd6e1.zip
recognize every mw as digital, workaround btns issuesowatch_0_4_4
Diffstat (limited to 'metawatch/metawatch.cpp')
-rw-r--r--metawatch/metawatch.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp
index 510db2c..a8eab4d 100644
--- a/metawatch/metawatch.cpp
+++ b/metawatch/metawatch.cpp
@@ -514,8 +514,7 @@ void MetaWatch::updateLcdLines(Mode mode, const QImage& image, const QVector<boo
void MetaWatch::configureLcdIdleSystemArea(bool entireScreen)
{
- Message msg(ConfigureLcdIdleBufferSize, QByteArray(26, 0));
- msg.data[0] = entireScreen ? 1 : 0;
+ Message msg(ConfigureLcdIdleBufferSize, QByteArray(1, entireScreen ? 1 : 0));
send(msg);
}
@@ -555,6 +554,9 @@ void MetaWatch::enableButton(Mode mode, Button button, ButtonPress press)
// the pressed button and the event code were.
msg.data[4] = 0x80 | ((press << 4) & 0x30) | (button & 0xF);
+ qDebug() << "enable button" << button << "(" << press << ")" <<
+ "in mode" << mode << "to" << static_cast<unsigned char>(msg.data[4]);
+
send(msg);
}