summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-16 23:01:36 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-16 23:01:36 +0200
commit0dca79a8c15b76ca53617c0ed3396ab6435f0152 (patch)
tree262d7ade18b53fca3c48646850cf3b40a7a463d6 /main.cpp
parent5dda71b7bc2611631919d5c0d313f1bdc013030e (diff)
downloadsowatch-0dca79a8c15b76ca53617c0ed3396ab6435f0152.tar.gz
sowatch-0dca79a8c15b76ca53617c0ed3396ab6435f0152.zip
Making it work for different MAC addresses.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index fd4347c..d0eae3f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -12,14 +12,18 @@ QTM_USE_NAMESPACE
static Watch *watch;
static WatchServer *server;
-static Watchlet *watchlet;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
- //watch = new MetaWatchSimulator();
- watch = new MetaWatch(QBluetoothAddress("D0:37:61:C3:C7:99"));
+ if (a.arguments().count() > 1) {
+ watch = new MetaWatch(QBluetoothAddress(a.arguments().at(1)));
+ } else {
+ watch = new MetaWatchSimulator();
+ }
+
+ /* D0:37:61:C3:C7:99 */
server = new WatchServer(watch);
new TestDeclarativeWatchlet(server);
new TestWatchlet(server);