diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 03:49:38 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 03:49:38 +0200 |
commit | 3ca9235ddb93b52730099164a0dc387f7a301280 (patch) | |
tree | aa6e74210ce6075fc9e974dd275d28adf5f5d0c5 /metawatch/metawatch.cpp | |
parent | ac182bd9bf076b4d03d4812e85b989edae32d756 (diff) | |
download | sowatch-3ca9235ddb93b52730099164a0dc387f7a301280.tar.gz sowatch-3ca9235ddb93b52730099164a0dc387f7a301280.zip |
weather rendering in metawatchwatchlets
Diffstat (limited to 'metawatch/metawatch.cpp')
-rw-r--r-- | metawatch/metawatch.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index b5aec49..3845817 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -269,8 +269,12 @@ void MetaWatch::setupBluetoothWatch() _currentMode = IdleMode; _paintMode = IdleMode; - connect(_socket, SIGNAL(readyRead()), + if (_socket) { + // If we are running under the simulator, there might not be + // a socket. + connect(_socket, SIGNAL(readyRead()), SLOT(dataReceived())); + } // Configure the watch according to user preferences updateWatchProperties(); @@ -468,9 +472,6 @@ 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); } |