summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metawatch/metawatch.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp
index 27f1143..f05e362 100644
--- a/metawatch/metawatch.cpp
+++ b/metawatch/metawatch.cpp
@@ -849,10 +849,14 @@ void MetaWatch::timedReconnect()
void MetaWatch::timedSend()
{
+ // If there are packets to be sent...
if (_toSend.count() > 0) {
+ // Send the packets to the watch
realSend(_toSend.dequeue());
}
+ // If we sent all packets...
if (_toSend.count() == 0) {
+ // Stop the send timer to save battery
_sendTimer->stop();
}
}