From 0dca79a8c15b76ca53617c0ed3396ab6435f0152 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 16 Sep 2011 23:01:36 +0200 Subject: Making it work for different MAC addresses. --- main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'main.cpp') 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); -- cgit v1.2.3