diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-16 23:01:36 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-16 23:01:36 +0200 |
commit | 0dca79a8c15b76ca53617c0ed3396ab6435f0152 (patch) | |
tree | 262d7ade18b53fca3c48646850cf3b40a7a463d6 /main.cpp | |
parent | 5dda71b7bc2611631919d5c0d313f1bdc013030e (diff) | |
download | sowatch-0dca79a8c15b76ca53617c0ed3396ab6435f0152.tar.gz sowatch-0dca79a8c15b76ca53617c0ed3396ab6435f0152.zip |
Making it work for different MAC addresses.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); |