summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-01-04 03:46:06 +0100
committerJavier S. Pedro <maemo@javispedro.com>2012-01-04 03:46:06 +0100
commit2399bbe45bfa5a330bef2d4bb63de3af25fe4ad9 (patch)
tree746450b9fca97cf5a9e1e78ed3ffde303c3bde8e
parent7c94b0468a6ea2afcaa0fff9bc833c4eba657c2d (diff)
downloadsowatch-2399bbe45bfa5a330bef2d4bb63de3af25fe4ad9.tar.gz
sowatch-2399bbe45bfa5a330bef2d4bb63de3af25fe4ad9.zip
finally enable NVALs, seems that they work with 0.8.2
-rw-r--r--metawatch/metawatch.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp
index a5836ad..a9718ec 100644
--- a/metawatch/metawatch.cpp
+++ b/metawatch/metawatch.cpp
@@ -554,7 +554,7 @@ void MetaWatch::handleNvalOperationMessage(const Message& msg)
uint id = ((msg.data[1] & 0xFF) << 8) | (msg.data[0] & 0xFF);
NvalValue value = static_cast<NvalValue>(id);
- qDebug() << "nval operation response for value" << value;
+ qDebug() << "nval operation response for value" << hex << value;
switch (msg.options) {
case 0: // Success
@@ -579,9 +579,11 @@ void MetaWatch::handleNvalOperationMessage(const Message& msg)
// Check if there's a pending write for this nval.
if (_nvals.contains(value)) {
int new_data = _nvals[value];
- qDebug() << "nval" << value << "currently =" << data << "is pending write to =" << new_data;
+ qDebug() << "nval" << hex << value << "currently =" << dec << data << "is pending write to =" << new_data;
if (new_data != data) {
realNvalWrite(value, _nvals[value]);
+ } else {
+ qDebug() << " not rewriting it";
}
_nvals.remove(value);
}
@@ -666,10 +668,9 @@ void MetaWatch::socketConnected()
_currentMode = IdleMode;
_paintMode = IdleMode;
-#if FIRMWARE_NOT_BUGGY
// Configure the watch according to user preferences
- //nvalWrite(TimeFormat, _24hMode ? 1 : 0);
-#endif
+ nvalWrite(TimeFormat, _24hMode ? 1 : 0);
+ nvalWrite(DateFormat, _dayMonthOrder ? 1 : 0);
// Sync watch date & time
setDateTime(QDateTime::currentDateTime());
@@ -761,7 +762,7 @@ void MetaWatch::realNvalWrite(NvalValue value, int data)
uint id = static_cast<uint>(value);
Message msg(NvalOperation, QByteArray(3 + size, 0), 2);
- qDebug() << "nval" << value << "will be written with" << data;
+ qDebug() << "nval" << hex << value << "will be written with" << dec << data;
msg.data[0] = id & 0xFF;
msg.data[1] = id >> 8;