From 867793a4626124e385ae5464c259f7ddf378305f Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 28 Mar 2013 19:20:19 +0100 Subject: disable some debug stuff --- metawatch/metawatch.cpp | 2 +- testnotification/testnotification.cpp | 2 +- testnotification/testnotificationprovider.cpp | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index ca6eaa6..510db2c 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -7,7 +7,7 @@ using namespace sowatch; QTM_USE_NAMESPACE #define SINGLE_LINE_UPDATE 0 -#define PROTOCOL_DEBUG 1 +#define PROTOCOL_DEBUG 0 const char MetaWatch::btnToWatch[8] = { 0, 1, 2, 3, 5, 6, -1, -1 diff --git a/testnotification/testnotification.cpp b/testnotification/testnotification.cpp index d541287..c07111f 100644 --- a/testnotification/testnotification.cpp +++ b/testnotification/testnotification.cpp @@ -8,7 +8,7 @@ TestNotification::TestNotification(Type type, const QString &title, const QStrin _time(QDateTime::currentDateTime()), _title(title), _body(body) { - const int high = 30000, low = 10000; + const int high = 5000, low = 1000; int rand = qrand() % ((high + 1) - low) + low; QTimer::singleShot(rand, this, SIGNAL(dismissed())); } diff --git a/testnotification/testnotificationprovider.cpp b/testnotification/testnotificationprovider.cpp index 230237f..687780b 100644 --- a/testnotification/testnotificationprovider.cpp +++ b/testnotification/testnotificationprovider.cpp @@ -9,17 +9,17 @@ TestNotificationProvider::TestNotificationProvider(QObject *parent) : NotificationProvider(parent), _timer(new QTimer(this)) { - QTimer::singleShot(1000, this, SLOT(generateInitialNotification())); - QTimer::singleShot(1200, this, SLOT(generateNotification())); - QTimer::singleShot(1400, this, SLOT(generateNotification())); - QTimer::singleShot(1600, this, SLOT(generateNotification())); - QTimer::singleShot(1800, this, SLOT(generateNotification())); - QTimer::singleShot(2000, this, SLOT(generateNotification())); - QTimer::singleShot(2200, this, SLOT(generateNotification())); - QTimer::singleShot(2400, this, SLOT(generateInitialNotification())); + const int initial_delay = 2000; + const int burst_num = 0; + const int burst_delay = 500; + const int extra_delay = 100 * 1000; + QTimer::singleShot(initial_delay, this, SLOT(generateInitialNotification())); + for (int i = 0; i < burst_num; i++) { + QTimer::singleShot(initial_delay + burst_delay * (i+1), this, SLOT(generateNotification())); + } connect(_timer, SIGNAL(timeout()), SLOT(generateNotification())); - _timer->setInterval(60000); - //_timer->start(); + _timer->setInterval(extra_delay); + _timer->start(); } TestNotificationProvider::~TestNotificationProvider() -- cgit v1.2.3